Last active
June 22, 2020 11:17
-
-
Save ngmoviedo/d65217e822d2e38834c5e3330e01668e to your computer and use it in GitHub Desktop.
Remotely disables WiFi on Amper-EG663, and possibly other ISP routers lacking support for wireless scheduling.
This file contains hidden or 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 | |
| if [ $1 = "enable" -o $1 = "disable" ]; then | |
| sh << EOF | nc 192.168.1.1 23 ## router's IP | |
| #sh << EOF | telnet 192.168.1.1 # using telnet, instead of netcat | |
| sleep 1 | |
| echo user ## router's telnet user | |
| sleep 1 | |
| echo password ## router's telnet password | |
| sleep 1 | |
| echo wlan $1 | |
| sleep 10 | |
| echo exit | |
| sleep 1 | |
| EOF | |
| else | |
| echo Invalid argument. | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment