2006-12-02, 21:20
Figured out the post part. Compared KCP to the original WRTKaidCommander and found differences on the HTTP string.If I remove the question mark after apply.cgi and also change the plus symbol before "parameter" to a comma the script now performs a POST operation. Progress!
Unfortunately, still not working.
It seems that when the script runs a GET process it first receives back a 401 unauthorized message. It then GETs again but passing login credentials and receives back a 200 Ok packet. Once I've made the updates to trigger a POST operation I don't get either of these. I can see in the packet that credentials are not being passed, I'm wondering if maybe on a POST operation there is no 401 response? I can't think of a way to recreate this non-logged in POST from my browser, so I can't confirm if the response would be the same. Is there a way to trigger the urllib to pass the credentials on first request?
I also noticed that the newer versions of DD-WRT send a next_page=Diagnostics.asp string in the POST. I've added that to the version of the script I am working with but it hasn't changed anything.
-Whoopin'
Code:
KCP:
self.open("http://" + router_ip + "/apply.cgi?"+ parameter)
WKC:
self.open("http://"+router_ip+"/apply.cgi", parameter)
Unfortunately, still not working.
It seems that when the script runs a GET process it first receives back a 401 unauthorized message. It then GETs again but passing login credentials and receives back a 200 Ok packet. Once I've made the updates to trigger a POST operation I don't get either of these. I can see in the packet that credentials are not being passed, I'm wondering if maybe on a POST operation there is no 401 response? I can't think of a way to recreate this non-logged in POST from my browser, so I can't confirm if the response would be the same. Is there a way to trigger the urllib to pass the credentials on first request?
I also noticed that the newer versions of DD-WRT send a next_page=Diagnostics.asp string in the POST. I've added that to the version of the script I am working with but it hasn't changed anything.
-Whoopin'