Module: WpTarget::WpReadme

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

Instance Method Summary collapse

Instance Method Details

#has_readme?Boolean

Checks to see if the readme.html file exists

This file comes by default in a wordpress installation, and if deleted is reinstated with an upgrade.

Returns:

  • (Boolean)

12
13
14
15
16
17
18
19
# File 'lib/wpscan/wp_target/wp_readme.rb', line 12

def has_readme?
  response = Browser.get(readme_url())

  unless response.code == 404
    return response.body =~ %r{wordpress}i ? true : false
  end
  false
end

#readme_urlString

Returns The readme URL

Returns:

  • (String)

    The readme URL


22
23
24
# File 'lib/wpscan/wp_target/wp_readme.rb', line 22

def readme_url
  @uri.merge('readme.html').to_s
end