From e7dbf9278d3a148134b189ae971ef7b3064834ec Mon Sep 17 00:00:00 2001 From: erwanlr Date: Tue, 13 Oct 2015 13:17:22 +0100 Subject: [PATCH] Fixes #873 - mu-plugins detection --- lib/wpscan/wp_target/wp_must_use_plugins.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/wpscan/wp_target/wp_must_use_plugins.rb b/lib/wpscan/wp_target/wp_must_use_plugins.rb index f0c82203..edf52fe6 100644 --- a/lib/wpscan/wp_target/wp_must_use_plugins.rb +++ b/lib/wpscan/wp_target/wp_must_use_plugins.rb @@ -2,14 +2,13 @@ class WpTarget < WebSite module WpMustUsePlugins - # Checks to see if the must use plugin folder exists # # @return [ Boolean ] def has_must_use_plugins? response = Browser.get(must_use_url) - if response && WpTarget.valid_response_codes.include?(response.code) + if response && [200, 401, 403].include?(response.code) hash = WebSite.page_hash(response) return true if hash != error_404_hash && hash != homepage_hash end @@ -21,6 +20,5 @@ class WpTarget < WebSite def must_use_url @uri.merge("#{wp_content_dir}/mu-plugins/").to_s end - end end