Add check codes
parent
44db611845
commit
ff6105e55d
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue