Module: WpTarget::WpMustUsePlugins

Included in:
WpTarget
Defined in:
lib/wpscan/wp_target/wp_must_use_plugins.rb

Instance Method Summary collapse

Instance Method Details

#has_must_use_plugins?Boolean

Checks to see if the must use plugin folder exists

Returns:

  • (Boolean)

9
10
11
12
13
14
15
16
17
18
# File 'lib/wpscan/wp_target/wp_must_use_plugins.rb', line 9

def has_must_use_plugins?
  response = Browser.get(must_use_url)

  if response && WpTarget.valid_response_codes.include?(response.code)
    hash = WebSite.page_hash(response.body)
    return true if hash != error_404_hash && hash != homepage_hash
  end

  false
end

#must_use_urlString

Returns The must use plugins directory URL

Returns:

  • (String)

    The must use plugins directory URL


21
22
23
# File 'lib/wpscan/wp_target/wp_must_use_plugins.rb', line 21

def must_use_url
  @uri.merge("#{wp_content_dir}/mu-plugins/").to_s
end