Skip to content

Instantly share code, notes, and snippets.

@gsamat
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gsamat/993166723a933054a6c4 to your computer and use it in GitHub Desktop.
Save gsamat/993166723a933054a6c4 to your computer and use it in GitHub Desktop.
Keep my Kerala internet alive
#!/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