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 02:22 de 127.0.0.1
 
 
CC Attribution-Share Alike 4.0 International
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