Make auth checking optional and off by default

bug/bundler_fix
Jon Hart 2015-01-11 12:15:57 -08:00
parent 9491e4c977
commit d4843f46ed
No known key found for this signature in database
GPG Key ID: 2FA9F0A3AFA8E9D3
1 changed files with 9 additions and 1 deletions

View File

@ -40,6 +40,12 @@ class Metasploit4 < Msf::Auxiliary
OptString.new('TARGETURI', [true, 'URI to test', '/'])
], Exploit::Remote::HttpClient
)
register_advanced_options(
[
OptBool.new('REQUIRE_AUTH', [true, 'Require that the tested URI require authentication', false])
], self.class
)
end
def check_host(_ip)
@ -98,7 +104,9 @@ class Metasploit4 < Msf::Auxiliary
end
def test_misfortune
if datastore['REQUIRE_AUTH']
return Exploit::CheckCode::Unknown unless requires_auth?
end
# find a usable canary URI (one that 401/404s already)
unless canary = find_canary_uri