Clean up code
parent
d60b477f50
commit
b0bdfa7680
|
@ -51,10 +51,10 @@ def is_app_popad?
|
|||
})
|
||||
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout, ::Rex::ConnectionError
|
||||
vprint_error("#{peer} - HTTP Connection Failed...")
|
||||
false return
|
||||
return false
|
||||
end
|
||||
|
||||
if (res and res.code == 200 and res.headers['Server'].include?("Smeagol") and res.body.include?("PocketPAD"))
|
||||
if res && res.code == 200 && res.headers['Server'] && res.headers['Server'].include?("Smeagol") && res.body.include?("PocketPAD")
|
||||
vprint_good("#{peer} - Running PocketPAD application ...")
|
||||
return true
|
||||
else
|
||||
|
@ -84,7 +84,7 @@ def do_login(user, pass)
|
|||
return :abort
|
||||
end
|
||||
|
||||
if (res and res.code == 200 and res.body.include?("Home Page") and res.headers['Server'].include?("Smeagol"))
|
||||
if (res && res.code == 200 && res.body.include?("Home Page") && res.headers['Server'] && res.headers['Server'].include?("Smeagol"))
|
||||
print_good("#{peer} - SUCCESSFUL LOGIN - #{user.inspect}:#{pass.inspect}")
|
||||
report_hash = {
|
||||
:host => rhost,
|
||||
|
|
Loading…
Reference in New Issue