Skip to content

Commit 7ca4ba2

Browse files
committed
Show more helpful vprint messages when login fails
1 parent bce8f34 commit 7ca4ba2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/auxiliary/scanner/http/owa_login.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def try_user_pass(opts)
209209
headers['Cookie'] = 'PBack=0;' << res.get_cookies
210210
else
211211
#Login didn't work. no point on going on.
212-
vprint_error("#{msg} FAILED LOGIN. '#{user}' : '#{pass}'")
212+
vprint_error("#{msg} FAILED LOGIN. '#{user}' : '#{pass}' (HTTP redirect with reason #{reason})")
213213
return :Skip_pass
214214
end
215215
else
@@ -243,8 +243,8 @@ def try_user_pass(opts)
243243
return :abort
244244
end
245245

246-
if res.code == 302
247-
vprint_error("#{msg} FAILED LOGIN. '#{user}' : '#{pass}'")
246+
if res.redirect?
247+
vprint_error("#{msg} FAILED LOGIN. '#{user}' : '#{pass}' (response was a #{res.code} redirect)")
248248
return :skip_pass
249249
end
250250

@@ -263,7 +263,7 @@ def try_user_pass(opts)
263263
report_auth_info(report_hash)
264264
return :next_user
265265
else
266-
vprint_error("#{msg} FAILED LOGIN. '#{user}' : '#{pass}'")
266+
vprint_error("#{msg} FAILED LOGIN. '#{user}' : '#{pass}' (response body did not match)")
267267
return :skip_pass
268268
end
269269
end

0 commit comments

Comments
 (0)