Skip to content

Commit 9ed2840

Browse files
committed
Favor check_host for a scanner
1 parent 62b74ae commit 9ed2840

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/auxiliary/scanner/http/apache_mod_cgi_bash_env.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ def initialize(info = {})
4646
@marker = marker
4747
end
4848

49-
def check
49+
def check_host(ip)
5050
res = req("echo #{@marker}")
5151

5252
if res && res.body.include?(@marker * 3)
5353
report_vuln(
54-
:host => rhost,
54+
:host => ip,
5555
:port => rport,
5656
:name => self.name,
5757
:refs => self.references
@@ -63,7 +63,7 @@ def check
6363
end
6464

6565
def run_host(ip)
66-
return unless check == Exploit::CheckCode::Vulnerable
66+
return unless check_host(ip) == Exploit::CheckCode::Vulnerable
6767

6868
res = req(datastore['CMD'])
6969

0 commit comments

Comments
 (0)