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