There is a need
Mozilla Firefox Live HTTP Headers
cURL
IP router
http://username:password @ IP of the router
POST / login.php username = username & password = password
This would be of the following cURL call:
curl "http://192.168.1.1/login.php"-d "username = username & password = password"-c "Cookies"
The parameter c cURL stores all cookies in the specified file . In order to use them later, you must use the-b "cookies.txt".
Reconnect record
If you're logged in, go to the page "disconnect" in which a button labeled or something like that is.
Now here are all POST and GET requests sent to the router listed. You have to figure out now what lines you need it. This is basically very simple. In my case a couple of Javascript files (. Js) and an image (. Gif) was requested. These lines are designed to reconnect completely unimportant. Only the first and the fifth line are required. When you know which lines you need, you copied this out and opens a text editor. (Eg Windows Notepad) adds the line there once a stable. In my case, two POST requests sent to the router, the first to separate the compound and the second to restore it. That this is POST, POST can be recognized by keyword at the beginning of the line. Basically just get POST and GET in question.
Now you have to rebuild the whole thing so that curl the two requests may be sent to the router. Let us take the first line before:
POST /? Ce = 1 & be = 0 & l0 =- 1 & l1 =- 1 0 = 13 & 1 & 5 = 2 = Shared_InternetThe first part before the space (red) shows where the request was sent. In the second part after the space (blue) is the post data. The whole thing looks as curl-call as follows:
curl "? Http://Benutzer:Passwort @ 10.0.0.138 / ce = 1 & be = 0 & l0 =- 1 & l1 =- 1"-d "0 = 13 & 1 = Shared_Internet & 5 = 2 "The parameter d is the blue part will be sent as POST. If you log in you do not need the router, then user: password @ of course be omitted. Exactly the same must be done now with the second row and one is as good as the goal.
For these two lines
POST /? Ce = 1 & be = 0 & l0 =- 1 & l1 =- 1 0 = 13 & 1 & 5 = 2 = Shared_Internetthen, is the grown here:
POST /? Ce = 1 & be = 0 & l0 =- 1 & l1 =- 1 0 = 12 & 1 & 5 = 2 = Shared_Internet
curl "http://Benutzer:Passwort @ 10.0.0.138 / ce = 1 &? ; & be = 0 & l0 =- 1 & l1 =- 1-d 0 = 13 & 1 = 5 = 2 Shared_Internet "This looks very complicated, but basically very simple.
curl" http://Benutzer:Passwort @ 10.0.0.138 / ce = 1 &? be = 0 & l0 =- 1 & l1 =- 1 " -D "0 = 12 & 1 = Shared_Internet & 5 = 2"
The text file you have just now asked to save with the extension and already you can try if it works.
special characters special characters from the cmd.exe command line interpreter (the black screen with gray text ;-)), but interpreted differently. This can be unhardened by the individual parts (URL, post data ...) is in double quotes. Not so with the percent sign, this will not be interpreted as a mere string. To solve this problem, all you have to double percent sign, behind each percent sign another insert.
example
curl-d "MODEM_LOG = dial & message = & Session = Connect + is + being terminated +% 0D% 0A" "http://192.168.0.1/st_poe.cgi"
.. . is "message & = & MODEM_LOG dial = Connect = session + is + being terminated% +% 0D% 0A%" to
curl-d "http://192.168.0.1/st_poe.cgi"
test result
can to test it for example on the page go http://whatismyip.org and remember you the current IP. Then performs the reconnect.bat by double and see if the IP changed.
The
curl.exe must (obviously) in the same folder as the reconnect.bat!
Good luck!
http://www.paehl.de/php/contact/
If it all works send me the result so that I can take on the whole in my database: see http://www.paehl.de/reconnect Incorporated
it will be in this program