From 709befea5c83c99d6d95b8815898e0209f43c44a Mon Sep 17 00:00:00 2001 From: Brendan Coles Date: Fri, 16 Nov 2018 20:19:23 +0100 Subject: [PATCH] Update modules/exploits/windows/http/hp_imc_java_deserialize.rb Fixed if/else block return Co-Authored-By: carmaa --- modules/exploits/windows/http/hp_imc_java_deserialize.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/exploits/windows/http/hp_imc_java_deserialize.rb b/modules/exploits/windows/http/hp_imc_java_deserialize.rb index bc84bde5e8..8a0b927c24 100644 --- a/modules/exploits/windows/http/hp_imc_java_deserialize.rb +++ b/modules/exploits/windows/http/hp_imc_java_deserialize.rb @@ -80,7 +80,12 @@ class MetasploitModule < Msf::Exploit::Remote t2 = Time.now.to_i diff = t2 - t1 - if res && res.code == 500 && res.body.include?('HPE Intelligent Management Center') && diff >= 10 + unless res + vprint_error 'Connection failed' + return CheckCode::Detected + end + + if res.code == 500 && res.body.include?('HPE Intelligent Management Center') && diff >= 10 print_good("Response received after #{diff} seconds.") return CheckCode::Vulnerable else