Skip to content

Commit 8cf62dc

Browse files
author
Brent Cook
committed
Land rapid7#7299, Set defaults in WordpressMulticall login scanner
2 parents e09fe08 + aa193bf commit 8cf62dc

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/metasploit/framework/login_scanner/wordpress_multicall.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ class WordpressMulticall < HTTP
2929

3030

3131
def set_default
32-
self.wordpress_url_xmlrpc = 'xmlrpc.php'
33-
self.block_wait = 6
34-
self.base_uri = '/'
35-
self.chunk_size = 1700
32+
@wordpress_url_xmlrpc ||= 'xmlrpc.php'
33+
@block_wait ||= 6
34+
@base_uri ||= '/'
35+
@chunk_size ||= 1700
3636
end
3737

3838
# Returns the XML data that is used for the login.
@@ -110,6 +110,8 @@ def send_wp_request(xml)
110110
# @param credential [Metasploit::Framework::Credential]
111111
# @return [Metasploit::Framework::LoginScanner::Result]
112112
def attempt_login(credential)
113+
set_default
114+
@passwords ||= [credential.private]
113115
generate_xml(credential.public).each do |xml|
114116
send_wp_request(xml)
115117
req_xml = Nokogiri::Slop(xml)

0 commit comments

Comments
 (0)