From 333229ea7e2669eb690d51c06123afabdb3a9743 Mon Sep 17 00:00:00 2001 From: sinn3r Date: Thu, 23 Jan 2014 10:54:45 -0600 Subject: [PATCH] Throw Unknown if connection times out --- modules/exploits/linux/http/hp_system_management.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/exploits/linux/http/hp_system_management.rb b/modules/exploits/linux/http/hp_system_management.rb index 81ba676a05..1029c220a0 100644 --- a/modules/exploits/linux/http/hp_system_management.rb +++ b/modules/exploits/linux/http/hp_system_management.rb @@ -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