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
sinn3r 2013-08-19 16:16:34 -05:00
parent a815d9277e
commit 58d5cf6faa
1 changed files with 1 additions and 3 deletions

View File

@ -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|