File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
modules/auxiliary/scanner/http Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ def find_canary
98
98
# in most cases, the canary URI will not exist and will return a 404, but
99
99
# if everything under TARGETURI is protected by auth, a 401 may be OK too.
100
100
# but, regardless, respect the configuration set for this module
101
- return canary if res && res . code . to_s =~ @status_codes_regex
101
+ return [ canary , res . code ] if res && res . code . to_s =~ @status_codes_regex
102
102
end
103
103
nil
104
104
end
@@ -118,7 +118,10 @@ def headers
118
118
# vulnerable.
119
119
def test_misfortune
120
120
# find a usable canary URI (one that returns an acceptable status code already)
121
- unless ( canary_value = find_canary )
121
+ if canary = find_canary
122
+ canary_value , canary_code = canary
123
+ vprint_status ( "#{ peer } canary URI #{ canary_value } with code #{ canary_code } " )
124
+ else
122
125
vprint_error ( "#{ peer } Unable to find a suitable canary URI" )
123
126
return Exploit ::CheckCode ::Unknown
124
127
end
You can’t perform that action at this time.
0 commit comments