Skip to content

Commit c937e80

Browse files
committed
Added Fixes#2 mentioned by Firefart
Details: * MSF's HTTP::Wordpress class included and wordpress related variables are used.
1 parent c90434c commit c937e80

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

modules/auxiliary/scanner/http/wordpress_xmlrpc_login.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
require 'msf/core'
1111
class Metasploit3 < Msf::Auxiliary
12-
include Msf::Exploit::Remote::HttpClient
12+
include Msf::HTTP::Wordpress
1313
include Msf::Auxiliary::Scanner
1414
include Msf::Auxiliary::AuthBrute
1515
include Msf::Auxiliary::Report
@@ -38,7 +38,6 @@ def initialize(info = {})
3838
register_options(
3939
[
4040
Opt::RPORT(80),
41-
OptString.new('TARGETURI', [true, 'The path to wordpress xmlrpc file, default is /xmlrpc.php', '/xmlrpc.php']),
4241
], self.class)
4342

4443
deregister_options('BLANK_PASSWORDS') # we don't need this option
@@ -54,7 +53,7 @@ def xmlrpc_enabled?
5453
xml << '</methodCall>'
5554

5655
res = send_request_cgi(
57-
'uri' => target_uri.path,
56+
'uri' => wordpress_url_xmlrpc,
5857
'method' => 'POST',
5958
'data' => xml
6059
)
@@ -78,7 +77,7 @@ def generate_xml_request(user, pass)
7877
end
7978

8079
def run_host(ip)
81-
print_status("#{peer}:#{target_uri.path} - Sending Hello...")
80+
print_status("#{peer}:#{wordpress_url_xmlrpc} - Sending Hello...")
8281
if xmlrpc_enabled?
8382
vprint_good("XMLRPC enabled, Hello message received!")
8483
else
@@ -98,7 +97,7 @@ def do_login(user, pass)
9897
begin
9998
res = send_request_cgi(
10099
{
101-
'uri' => target_uri.path,
100+
'uri' => wordpress_url_xmlrpc,
102101
'method' => 'POST',
103102
'data' => xml_req
104103
}, 25)

0 commit comments

Comments
 (0)