Last active
August 29, 2015 14:08
-
-
Save gsamat/993166723a933054a6c4 to your computer and use it in GitHub Desktop.
Keep my Kerala internet alive
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 | |
# start it with "caffeinate ./enable-internet.sh", if you want to prevent your Macbook from sleeping | |
# do not forget "chmod +x ./enable-internet.sh" | |
# put your username and password below | |
username= | |
password= | |
count=1 | |
while true | |
do | |
#curl --trace-ascii - -d 'redirurl=%24PORTAL_REDIRURL%24&auth_user=$username&auth_pass=$password&accept=Login+%3E%3E' https://mwcp-spg-01a.adlkerala.com:8003/index.php | |
curl -d "redirurl=%24PORTAL_REDIRURL%24&auth_user=$username&auth_pass=$password&accept=Login+%3E%3E" https://mwcp-spg-01a.adlkerala.com:8003/index.php > last.out | |
/bin/echo -n "$count " && date | |
count=$((count+1)) | |
sleep 290 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment