File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
modules/auxiliary/scanner/http Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -204,7 +204,11 @@ def try_user_pass(opts)
204
204
end
205
205
206
206
#No password change required moving on.
207
- reason = res . headers [ 'location' ] . split ( 'reason=' ) [ 1 ]
207
+ unless location = res . headers [ 'location' ]
208
+ print_error ( "#{ msg } No HTTP redirect. This is not OWA 2013, aborting." )
209
+ return :abort
210
+ end
211
+ reason = location . split ( 'reason=' ) [ 1 ]
208
212
if reason == nil
209
213
headers [ 'Cookie' ] = 'PBack=0;' << res . get_cookies
210
214
else
@@ -220,7 +224,7 @@ def try_user_pass(opts)
220
224
if cookies =~ /#{ necessary_cookie } =([^;]+)/
221
225
cookie_header << "; #{ Regexp . last_match ( 1 ) } "
222
226
else
223
- print_error ( "#{ msg } Missing #{ necessary_cookie } cookie. This is not OWA 2010" )
227
+ print_error ( "#{ msg } Missing #{ necessary_cookie } cookie. This is not OWA 2010, aborting " )
224
228
return :abort
225
229
end
226
230
end
You can’t perform that action at this time.
0 commit comments