Add check codes

bug/bundler_fix
jvazquez-r7 2014-04-04 09:13:43 -05:00
parent 44db611845
commit ff6105e55d
1 changed files with 7 additions and 2 deletions

View File

@ -53,7 +53,7 @@ class Metasploit4 < Msf::Auxiliary
'uri' => normalize_uri(target_uri.path, 'ossim', 'session', 'login.php')
})
unless res
unless res and res.code == 200
print_error("#{peer} - Server did not respond in an expected way")
return
end
@ -82,7 +82,7 @@ class Metasploit4 < Msf::Auxiliary
'cookie' => cookie
})
unless res
unless res and res.code == 302
print_error("#{peer} - Server did not respond in an expected way")
return
end
@ -94,6 +94,11 @@ class Metasploit4 < Msf::Auxiliary
cookie = res.get_cookies
if cookie.blank?
print_error("#{peer} - Could not retrieve the authenticated cookie")
return
end
i = 0
full = ''
filename = datastore['FILEPATH'].unpack("H*")[0]