add changes proposed by sinn3r
parent
0708ec72fc
commit
cbc778cb47
|
@ -121,8 +121,14 @@ class Metasploit3 < Msf::Exploit::Remote
|
||||||
}, 25)
|
}, 25)
|
||||||
|
|
||||||
if res and res.code == 302 and res.headers['Set-Cookie'] =~ /sid/
|
if res and res.code == 302 and res.headers['Set-Cookie'] =~ /sid/
|
||||||
|
session = res.headers['Set-Cookie'].scan(/sid\=(\w+)\;*/).flatten[0] || ''
|
||||||
|
if session and not session.empty?
|
||||||
|
print_good "#{peer} - Authentication successfully"
|
||||||
|
else
|
||||||
|
print_error "#{peer} - Authentication failed"
|
||||||
|
return
|
||||||
|
end
|
||||||
print_good "#{peer} - Authentication successfully"
|
print_good "#{peer} - Authentication successfully"
|
||||||
session = res.headers['Set-Cookie'].split("sid=")[1].split(";")[0]
|
|
||||||
else
|
else
|
||||||
print_error "#{peer} - Authentication failed"
|
print_error "#{peer} - Authentication failed"
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue