Created
March 18, 2017 16:32
-
-
Save klinkby/7644976e44fd8ea00ac16b8a68671816 to your computer and use it in GitHub Desktop.
Shell script for remote reboot the D-Link 921 router
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
curl 'http://192.168.1.1/log/in?un=admin&pw=SECRET&rd=%2Fuir%2Fstatus.htm&rd2=%2Fuir%2Fwanst.htm&Nrd=1' --user-agent 'Mozilla/4.0' --header 'Connection: keep-alive' --header 'Accept: text/html' --cookie-jar /tmp/cookiejar.txt | |
sleep 1 | |
curl 'http://192.168.1.1/uir/rebo.htm?Nrd=0&ZT=1489819874729' --user-agent 'Mozilla/4.0' --header 'Connection: keep-alive' --header 'Accept: text/html' --cookie /tmp/cookiejar.txt | |
rm /tmp/cookiejar.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment