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
 
Haut de page
snippnets/freewifi.txt · Dernière modification: 2009/12/01 03:22 (modification externe)
 
 
CC Attribution-Share Alike 3.0 Unported
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0 Google Analytics