File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
modules/auxiliary/scanner/http Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,12 @@ def initialize(info = {})
40
40
OptString . new ( 'TARGETURI' , [ true , 'URI to test' , '/' ] )
41
41
] , Exploit ::Remote ::HttpClient
42
42
)
43
+
44
+ register_advanced_options (
45
+ [
46
+ OptBool . new ( 'REQUIRE_AUTH' , [ true , 'Require that the tested URI require authentication' , false ] )
47
+ ] , self . class
48
+ )
43
49
end
44
50
45
51
def check_host ( _ip )
@@ -98,7 +104,9 @@ def requires_auth?
98
104
end
99
105
100
106
def test_misfortune
101
- return Exploit ::CheckCode ::Unknown unless requires_auth?
107
+ if datastore [ 'REQUIRE_AUTH' ]
108
+ return Exploit ::CheckCode ::Unknown unless requires_auth?
109
+ end
102
110
103
111
# find a usable canary URI (one that 401/404s already)
104
112
unless canary = find_canary_uri
You can’t perform that action at this time.
0 commit comments