Sha256: 59aad9b9d5df72da61c37d02a7de2bb2a9f4b3abd2ae7f96cd5d239355225fc3
Contents?: true
Size: 704 Bytes
Versions: 25
Compression:
Stored size: 704 Bytes
Contents
# frozen_string_literal: true module WPScan module Finders module Passwords # Password attack against the wp-login.php class WpLogin < CMSScanner::Finders::Finder include CMSScanner::Finders::Finder::BreadthFirstDictionaryAttack def login_request(username, password) target.login_request(username, password) end def valid_credentials?(response) response.code == 302 && Array(response.headers['Set-Cookie'])&.any? { |cookie| cookie =~ /wordpress_logged_in_/i } end def errored_response?(response) response.code != 200 && response.body !~ /login_error/i end end end end end
Version data entries
25 entries across 25 versions & 1 rubygems