Module should use OptRegexp for regex pattern option
Instead of using OptString, OptRegexp should be used because this datastore option is a regex pattern.bug/bundler_fix
parent
a815d9277e
commit
58d5cf6faa
|
@ -29,7 +29,7 @@ class Metasploit3 < Msf::Auxiliary
|
|||
register_options(
|
||||
[
|
||||
OptString.new('PATH', [ true, "The test path to the page to analize", '/']),
|
||||
OptString.new('REGEX', [ true, "The regex to use (default regex is a sample to grab page title)", '\<title\>(.*)\<\/title\>']),
|
||||
OptRegexp.new('REGEX', [ true, "The regex to use (default regex is a sample to grab page title)", '\<title\>(.*)\<\/title\>'])
|
||||
|
||||
], self.class)
|
||||
|
||||
|
@ -57,8 +57,6 @@ class Metasploit3 < Msf::Auxiliary
|
|||
return
|
||||
end
|
||||
|
||||
aregex = Regexp.new(datastore['REGEX'].to_s,Regexp::IGNORECASE)
|
||||
|
||||
result = res.body.scan(aregex).flatten.map{ |s| s.strip }.uniq
|
||||
|
||||
result.each do |u|
|
||||
|
|
Loading…
Reference in New Issue