Handle bracketed and unbracketed results, add more useful logging

This commit is contained in:
Jon Hart 2015-01-08 17:51:31 -08:00
parent 14db112c32
commit f13e56aef8
No known key found for this signature in database
GPG Key ID: 2FA9F0A3AFA8E9D3
1 changed files with 8 additions and 2 deletions

View File

@ -120,7 +120,13 @@ class Metasploit3 < Msf::Exploit::Remote
end
def parse_result(res)
unless res && res.code == 200 && res.body
unless res
vprint_error("#{peer} no response")
return nil
end
unless res.code == 200 && res.body
vprint_error("#{peer} responded with HTTP code #{res.code} (with#{res.body ? '' : 'out'} a body)")
return nil
end
@ -136,7 +142,7 @@ class Metasploit3 < Msf::Exploit::Remote
return nil
end
result
result.is_a?(::Array) ? result.first : result
end
def java_sum(summands)