Fix 'check()' in glossword_upload_exec
parent
1f46b3aa02
commit
d7c0ce4e4a
|
@ -60,13 +60,15 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
print_status("#{peer} - Authenticating as user '#{user}'")
|
||||
begin
|
||||
res = login(base, user, pass)
|
||||
if res and res.code == 200
|
||||
if res
|
||||
if res.code == 200
|
||||
print_error("#{peer} - Authentication failed")
|
||||
return Exploit::CheckCode::Unknown
|
||||
elsif res.code == 301 and res.headers['set-cookie'] =~ /sid([\da-f]+)=([\da-f]{32})/
|
||||
print_good("#{peer} - Authenticated successfully")
|
||||
return Exploit::CheckCode::Appears
|
||||
end
|
||||
end
|
||||
return Exploit::CheckCode::Safe
|
||||
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout
|
||||
print_error("#{peer} - Connection failed")
|
||||
|
|
Loading…
Reference in New Issue