Skip to content

Commit

Permalink
Fixes #873 - mu-plugins detection
Browse files Browse the repository at this point in the history
  • Loading branch information
erwanlr committed Oct 13, 2015
1 parent 6564fdd commit e7dbf92
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/wpscan/wp_target/wp_must_use_plugins.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -21,6 +20,5 @@ def has_must_use_plugins?
def must_use_url
@uri.merge("#{wp_content_dir}/mu-plugins/").to_s
end

end
end

0 comments on commit e7dbf92

Please sign in to comment.