Skip to content

Instantly share code, notes, and snippets.

@yingted
Created September 14, 2013 04:37
Show Gist options
  • Save yingted/6558859 to your computer and use it in GitHub Desktop.
Save yingted/6558859 to your computer and use it in GitHub Desktop.
Automatically log in to public WiFi and prevent tabs from being redirected.
#!/bin/sh
# place in /etc/NetworkManager/dispatcher.d/50-autologin
if [ "$1" = "wlan0" ]
then
case "$2" in
up)
case "$CONNECTION_ID" in
WirelessMississauga)
curl -so/dev/null --interface "$1" -m60 http://1.1.1.1/login.html -d buttonClicked=4;;
esac;;
esac
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment