==== FreeWifi ====
===== Configuration =====
==== /etc/network/interfaces ====
auto wlan0
iface wlan0 inet dhcp
wireless-essid FreeWifi
wireless-mode Managed
post-up /bin/sh PATH/TO/freewifi.sh
==== freewifi.sh ====
#!/bin/bash
password="yourpassword"
login=yourlogin
submit=Valider
url="https://wifi.free.fr/"
echo "Getting POST 'priv' from $url"
priv=`/usr/bin/curl -# $url \
| grep -E 'input.*priv' \
| sed -e 's/^.*value="\(.*\)".*$/\1/' \
&>/dev/null`
echo "Identify against $url"
curl -# \
-d password="$password" \
-d login=$login \
-d priv=$priv \
-d submit=$submit \
$url | grep 'CONNEXION AU SERVICE REUSSIE' && exit 0
exit 1