9
9
10
10
require 'msf/core'
11
11
class Metasploit3 < Msf ::Auxiliary
12
- include Msf ::Exploit :: Remote :: HttpClient
12
+ include Msf ::HTTP :: Wordpress
13
13
include Msf ::Auxiliary ::Scanner
14
14
include Msf ::Auxiliary ::AuthBrute
15
15
include Msf ::Auxiliary ::Report
@@ -38,7 +38,6 @@ def initialize(info = {})
38
38
register_options (
39
39
[
40
40
Opt ::RPORT ( 80 ) ,
41
- OptString . new ( 'TARGETURI' , [ true , 'The path to wordpress xmlrpc file, default is /xmlrpc.php' , '/xmlrpc.php' ] ) ,
42
41
] , self . class )
43
42
44
43
deregister_options ( 'BLANK_PASSWORDS' ) # we don't need this option
@@ -54,7 +53,7 @@ def xmlrpc_enabled?
54
53
xml << '</methodCall>'
55
54
56
55
res = send_request_cgi (
57
- 'uri' => target_uri . path ,
56
+ 'uri' => wordpress_url_xmlrpc ,
58
57
'method' => 'POST' ,
59
58
'data' => xml
60
59
)
@@ -78,7 +77,7 @@ def generate_xml_request(user, pass)
78
77
end
79
78
80
79
def run_host ( ip )
81
- print_status ( "#{ peer } :#{ target_uri . path } - Sending Hello..." )
80
+ print_status ( "#{ peer } :#{ wordpress_url_xmlrpc } - Sending Hello..." )
82
81
if xmlrpc_enabled?
83
82
vprint_good ( "XMLRPC enabled, Hello message received!" )
84
83
else
@@ -98,7 +97,7 @@ def do_login(user, pass)
98
97
begin
99
98
res = send_request_cgi (
100
99
{
101
- 'uri' => target_uri . path ,
100
+ 'uri' => wordpress_url_xmlrpc ,
102
101
'method' => 'POST' ,
103
102
'data' => xml_req
104
103
} , 25 )
0 commit comments