Skip to content

Commit 2c028ca

Browse files
committed
Move redirect check before body check -- a redirect won't have a body
1 parent 7855ede commit 2c028ca

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

modules/auxiliary/scanner/http/owa_login.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,11 @@ def try_user_pass(opts)
248248
return :abort
249249
end
250250

251+
if res.redirect?
252+
vprint_error("#{msg} FAILED LOGIN. '#{user}' : '#{pass}' (response was a #{res.code} redirect)")
253+
return :skip_pass
254+
end
255+
251256
if res.body =~ login_check
252257
print_good("#{msg} SUCCESSFUL LOGIN. '#{user}' : '#{pass}'")
253258

@@ -262,12 +267,6 @@ def try_user_pass(opts)
262267

263268
report_auth_info(report_hash)
264269
return :next_user
265-
266-
if res.redirect?
267-
vprint_error("#{msg} FAILED LOGIN. '#{user}' : '#{pass}' (response was a #{res.code} redirect)")
268-
return :skip_pass
269-
end
270-
271270
else
272271
vprint_error("#{msg} FAILED LOGIN. '#{user}' : '#{pass}' (response body did not match)")
273272
return :skip_pass

0 commit comments

Comments
 (0)