Add a check. I decided not to try to login in the check function in order to remain non-malicious.

However, this decision doesn't represent how modules should write their own check.
unstable
sinn3r 2011-12-22 13:16:54 -06:00
parent 262fe75e0a
commit b5b24a1fbf
1 changed files with 13 additions and 0 deletions

View File

@ -102,6 +102,19 @@ class Metasploit3 < Msf::Exploit::Remote
handler handler
end end
def check
res = send_request_cgi(
{
'uri' => '/en-US/account/login',
'method' => 'GET'
}, 25)
if res.body =~ /Splunk Inc\. Splunk 4\.[0-2]\.[0-4] build [\d+]/
return Exploit::CheckCode::Appears
else
return Exploit::CheckCode::Safe
end
end
def do_login def do_login
res = send_request_cgi( res = send_request_cgi(