Throw Unknown if connection times out

bug/bundler_fix
sinn3r 2014-01-23 10:54:45 -06:00
parent 5073d3201f
commit 333229ea7e
1 changed files with 4 additions and 1 deletions

View File

@ -71,7 +71,10 @@ class Metasploit3 < Msf::Exploit::Remote
'uri' => "/cpqlogin.htm"
})
if res and res.code == 200 and res.body =~ /"HP System Management Homepage v(.*)"/
if res.nil?
vprint_error("Connection timed out")
return Exploit::CheckCode::Unknown
elsif res.code == 200 and res.body =~ /"HP System Management Homepage v(.*)"/
version = $1
return Exploit::CheckCode::Appears if version <= "7.1.1.1"
end