added check for valid credentials

This commit is contained in:
Christian Mehlmauer
2014-11-19 10:50:04 +01:00
parent 0a53c52645
commit bc4f0c002b

View File

@@ -95,6 +95,12 @@ def main
raise 'Basic authentication is required, please provide it with --basic-auth <login:password>'
end
# test for valid credentials
unless wpscan_options.basic_auth.nil?
res = Browser.get_and_follow_location(wp_target.url)
raise 'Invalid credentials supplied' if res && res.code == 401
end
# Remote website is wordpress?
unless wpscan_options.force
unless wp_target.wordpress?