Skip to content

Instantly share code, notes, and snippets.

@ngmoviedo
Last active June 22, 2020 11:17
Show Gist options
  • Save ngmoviedo/d65217e822d2e38834c5e3330e01668e to your computer and use it in GitHub Desktop.
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.
#!/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