File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
modules/auxiliary/scanner/http Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -221,7 +221,7 @@ def try_user_pass(opts)
221
221
cookies = res . get_cookies
222
222
cookie_header = 'PBack=0'
223
223
%w( sessionid cadata ) . each do |necessary_cookie |
224
- if cookies =~ /#{ necessary_cookie } =([^;]+ )/
224
+ if cookies =~ /#{ necessary_cookie } =([^;]* )/
225
225
cookie_header << "; #{ Regexp . last_match ( 1 ) } "
226
226
else
227
227
print_error ( "#{ msg } Missing #{ necessary_cookie } cookie. This is not OWA 2010, aborting" )
@@ -247,11 +247,6 @@ def try_user_pass(opts)
247
247
return :abort
248
248
end
249
249
250
- if res . redirect?
251
- vprint_error ( "#{ msg } FAILED LOGIN. '#{ user } ' : '#{ pass } ' (response was a #{ res . code } redirect)" )
252
- return :skip_pass
253
- end
254
-
255
250
if res . body =~ login_check
256
251
print_good ( "#{ msg } SUCCESSFUL LOGIN. '#{ user } ' : '#{ pass } '" )
257
252
@@ -266,6 +261,12 @@ def try_user_pass(opts)
266
261
267
262
report_auth_info ( report_hash )
268
263
return :next_user
264
+
265
+ if res . redirect?
266
+ vprint_error ( "#{ msg } FAILED LOGIN. '#{ user } ' : '#{ pass } ' (response was a #{ res . code } redirect)" )
267
+ return :skip_pass
268
+ end
269
+
269
270
else
270
271
vprint_error ( "#{ msg } FAILED LOGIN. '#{ user } ' : '#{ pass } ' (response body did not match)" )
271
272
return :skip_pass
You can’t perform that action at this time.
0 commit comments