File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
modules/exploits/multi/http Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -60,12 +60,14 @@ def check
60
60
print_status ( "#{ peer } - Authenticating as user '#{ user } '" )
61
61
begin
62
62
res = login ( base , user , pass )
63
- if res and res . code == 200
64
- print_error ( "#{ peer } - Authentication failed" )
65
- return Exploit ::CheckCode ::Unknown
66
- elsif res . code == 301 and res . headers [ 'set-cookie' ] =~ /sid([\d a-f]+)=([\d a-f]{32})/
67
- print_good ( "#{ peer } - Authenticated successfully" )
68
- return Exploit ::CheckCode ::Appears
63
+ if res
64
+ if res . code == 200
65
+ print_error ( "#{ peer } - Authentication failed" )
66
+ return Exploit ::CheckCode ::Unknown
67
+ elsif res . code == 301 and res . headers [ 'set-cookie' ] =~ /sid([\d a-f]+)=([\d a-f]{32})/
68
+ print_good ( "#{ peer } - Authenticated successfully" )
69
+ return Exploit ::CheckCode ::Appears
70
+ end
69
71
end
70
72
return Exploit ::CheckCode ::Safe
71
73
rescue ::Rex ::ConnectionRefused , ::Rex ::HostUnreachable , ::Rex ::ConnectionTimeout
You can’t perform that action at this time.
0 commit comments