Tidy check method

GSoC/Meterpreter_Web_Console
Carsten Maartmann-Moe 2018-11-11 22:53:13 +01:00
parent 8894af58de
commit e06af184c8
1 changed files with 17 additions and 13 deletions

View File

@ -58,7 +58,14 @@ class MetasploitModule < Msf::Exploit::Remote
'method' => 'GET'
})
if res && res.code == 200 && res.body.include?('login_logo_hp.png')
unless res
vprint_error 'Connection failed'
return CheckCode::Unknown
end
unless res.code == 200 && res.body.include?('login_logo_hp.png')
return CheckCode::Safe
end
res = send_request_cgi({
'uri' => normalize_uri(target_uri.path, 'topo', 'WebDMDebugServlet'),
@ -66,13 +73,10 @@ class MetasploitModule < Msf::Exploit::Remote
})
if res && res.code == 500 && res.body.include?('HPE Intelligent Management Center')
return Exploit::CheckCode::Appears
return CheckCode::Appears
end
return Exploit::CheckCode::Detected
end
return Exploit::CheckCode::Safe
CheckCode::Detected
end
def exploit