Clean up code

bug/bundler_fix
jvazquez-r7 2014-05-30 11:44:42 -05:00
parent d60b477f50
commit b0bdfa7680
1 changed files with 89 additions and 89 deletions

View File

@ -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,