Skip to content

Commit 202b31d

Browse files
wchen-r7jvazquez-r7
authored andcommitted
Better fix based on feedback
Tell daddy how you want it.
1 parent 8eb9266 commit 202b31d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/auxiliary/scanner/http/scraper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def initialize
2929
register_options(
3030
[
3131
OptString.new('PATH', [ true, "The test path to the page to analize", '/']),
32-
OptRegexp.new('REGEX', [ true, "The regex to use (default regex is a sample to grab page title)", '\<title\>(.*)\<\/title\>'])
32+
OptRegexp.new('PATTERN', [ true, "The regex to use (default regex is a sample to grab page title)", %r{<title>(.*)</title>}i])
3333

3434
], self.class)
3535

@@ -57,7 +57,7 @@ def run_host(target_host)
5757
return
5858
end
5959

60-
result = res.body.scan(datastore['REGEX']).flatten.map{ |s| s.strip }.uniq
60+
result = res.body.scan(datastore['PATTERN']).flatten.map{ |s| s.strip }.uniq
6161

6262
result.each do |u|
6363
print_status("[#{target_host}] #{tpath} [#{u}]")

0 commit comments

Comments
 (0)