Files

WpLoginProtection

Public Instance Methods

has_login_protection?() click to toggle source
# File lib/wpscan/modules/wp_login_protection.rb, line 25
def has_login_protection?
  !login_protection_plugin().nil?
end
login_protection_plugin() click to toggle source

Checks if a login protection plugin is enabled code.google.com/p/wpscan/issues/detail?id=111 return a WpPlugin object or nil if no one is found

# File lib/wpscan/modules/wp_login_protection.rb, line 32
def login_protection_plugin
  unless @login_protection_plugin
    protected_methods.grep(@@login_protection_method_pattern).each do |symbol_to_call|

      if send(symbol_to_call)
        plugin_name = symbol_to_call[@@login_protection_method_pattern, 1].gsub('_', '-')

        return @login_protection_plugin = WpPlugin.new(
            :name => plugin_name,
            :url => @uri.to_s
        )
      end
    end
    @login_protection_plugin = nil
  end
  @login_protection_plugin
end

Protected Instance Methods

better_wp_security_url() click to toggle source
# File lib/wpscan/modules/wp_login_protection.rb, line 67
def better_wp_security_url
  WpPlugin.create_location_url_from_name("better-wp-security", @uri)
end
bluetrait_event_viewer_url() click to toggle source
# File lib/wpscan/modules/wp_login_protection.rb, line 103
def bluetrait_event_viewer_url
  WpPlugin.create_location_url_from_name("bluetrait-event-viewer", @uri)
end
has_better_wp_security_protection?() click to toggle source

wordpress.org/extend/plugins/better-wp-security/

# File lib/wpscan/modules/wp_login_protection.rb, line 63
def has_better_wp_security_protection?
  Browser.instance.get(better_wp_security_url()).code != 404
end
has_bluetrait_event_viewer_protection?() click to toggle source

wordpress.org/extend/plugins/bluetrait-event-viewer/

# File lib/wpscan/modules/wp_login_protection.rb, line 99
def has_bluetrait_event_viewer_protection?
  Browser.instance.get(bluetrait_event_viewer_url()).code != 404
end
has_limit_login_attempts_protection?() click to toggle source

wordpress.org/extend/plugins/limit-login-attempts/

# File lib/wpscan/modules/wp_login_protection.rb, line 90
def has_limit_login_attempts_protection?
  Browser.instance.get(limit_login_attempts_url()).code != 404
end
has_login_lock_protection?() click to toggle source

wordpress.org/extend/plugins/login-lock/

# File lib/wpscan/modules/wp_login_protection.rb, line 58
def has_login_lock_protection?
  Browser.instance.get(login_url()).body =~ %{LOGIN LOCK} ? true : false
end
has_login_lockdown_protection?() click to toggle source

Thanks to Alip Aswalid for providing this method. wordpress.org/extend/plugins/login-lockdown/

# File lib/wpscan/modules/wp_login_protection.rb, line 53
def has_login_lockdown_protection?
  Browser.instance.get(login_url()).body =~ %{Login LockDown} ? true : false
end
has_login_security_solution_protection?() click to toggle source

wordpress.org/extend/plugins/login-security-solution/

# File lib/wpscan/modules/wp_login_protection.rb, line 81
def has_login_security_solution_protection?
  Browser.instance.get(login_security_solution_url()).code != 404
end
has_simple_login_lockdown_protection?() click to toggle source

wordpress.org/extend/plugins/simple-login-lockdown/

# File lib/wpscan/modules/wp_login_protection.rb, line 72
def has_simple_login_lockdown_protection?
  Browser.instance.get(simple_login_lockdown_url()).code != 404
end
limit_login_attempts_url() click to toggle source
# File lib/wpscan/modules/wp_login_protection.rb, line 94
def limit_login_attempts_url
  WpPlugin.create_location_url_from_name("limit-login-attempts", @uri)
end
login_security_solution_url() click to toggle source
# File lib/wpscan/modules/wp_login_protection.rb, line 85
def login_security_solution_url
  WpPlugin.create_location_url_from_name("login-security-solution", @uri)
end
simple_login_lockdown_url() click to toggle source
# File lib/wpscan/modules/wp_login_protection.rb, line 76
def simple_login_lockdown_url
  WpPlugin.create_location_url_from_name("simple-login-lockdown", @uri)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.