The goal is to connect to the
VOO_HOMESPOT wifi network without login into the web browser.
VOO_HOMESPOT the is the wifree wireless network of
VOO in Belgium.
This should work with any linux using network-manager.
Just copy file below into
/etc/NetworkManager/dispatcher.d/voo-homespot
make it executable and be sure root is the owner
chown root.root /etc/NetworkManager/dispatcher.d/voo-homespot
chmod 700 /etc/NetworkManager/dispatcher.d/voo-homespot
Here is the script
#!/bin/sh
USERNAME=<YOUR VOO USERNAME>
PASSWORD=<YOUR VOO PASSWORD>
ESSID="VOO_HOMESPOT"
TARGET=http://www.google.com/
AUTH_URL=https://wifree.voo.be/authenticate.html
if iwconfig | grep -q $ESSID ; then
wget -qO- --post-data="username=${USERNAME}&password=${PASSWORD}&rememberme=rememberme&accept=accept&target=${TARGET_URL}" $AUTH_URL | grep -q connected_success.png
if [ $? -eq 0 ] ; then
logger "connected to $ESSID "
else
logger "login to $ESSID failed"
fi
else
logger "not ${ESSID}, don't try to login"
fi