blackwiz4rd / Vodafone-WiFi-AutoLogin

Automatic Login to Vodafone-WiFi hotspots in Italy
Apache License 2.0
17 stars 2 forks source link

Vodafone-WiFi-AutoLogin

Automatic Login to Vodafone-WiFi hotspots in Italy, this script is cross platform so it can be used on any os: Linux, Windows and MacOS.
Thanks to Mirco (https://github.com/Emmegiemme) who helped me making a better script for you.

Versione in italiano - (English version below)

Installazione

Clonate questa repository git clone https://github.com/blackwiz4rd/Vodafone-WiFi-AutoLogin
Requisiti per eseguire lo script python si trovano in install_pip_requirements.sh.
È richiesta l'installazione di python e pip.
Per scaricare python: https://www.python.org/downloads/.
Per scaricare pip su MacOS: curl -o ~/Downloads/get-pip.py https://bootstrap.pypa.io/get-pip.py.
Per scaricare pip su Linux: wget https://bootstrap.pypa.io/get-pip.py ~/Downloads/get-pip.py.
Per scaricare pip su Windows accedete tramite browser a https://bootstrap.pypa.io/get-pip.py e salvate il file nella cartella Downloads.
Per installare pip: cd ~/Downloads/ ed eseguite python get-pip.py.

Dopo aver installato python e pip eseguite
cd ~/Vodafone-WiFi-AutoLogin
chmod +x install_pip_requirements.sh
./install_pip_requirements.sh

Configurazione per utenti

Assicurarsi che vodafone.config e vodafone.py siano nella stessa cartella.
Modificate i campi inserendo i vostri dati, su ambiente unix potete utilizzare nano vodafone.conf.
Esempi di configurazione:
È necessario essere connessi a Vodafone-WiFi affinchè il programma abbia effetto altrimenti verrà interrotta la sua esecuzione.
Usate force=True solo se ottenete NotConnectedToVodafoneWiFiException durante l'esecuzione e siete connessi ad una rete Vodafone-WiFi

  1. vodafone.config Esempio n.1 (Utente Vodafone Italia):
    [config]
    username=your-account@your-provider.com
    password=your-password
    customer=VF_IT
    force=False
  2. vodafone.config Esempio n.2 (Utente Vodafone Spagna):
    [config]
    username=your-account@your-provider.com
    password=your-password
    customer=VF_ES
    force=False
  3. vodafone.config Esempio n.3 (Utente Pass Customer):
    [config]
    username=your-account@your-provider.com
    password=your-password
    customer=
    force=False
  4. vodafone.config Esempio n.4 (Utente Fon Roaming Partner):
    [config]
    username=your-account@your-provider.com
    password=your-password
    customer=FON_ROAM
    force=False

    Uso per utenti

    cd ~/Vodafone-WiFi-AutoLogin/
    python vodafone.py

Per mettere lo script in loop usate crontab -e e configuratelo a vostro piacimento utilizzando il sito https://crontab.guru/#0_*_*_*_*. Esempio di inserimento per metter lo script in loop ad ogni minuto 0 di ogni ora in crontab -e:

0 * * * * python /Users/luca/Documents/github/Vodafone-WiFi-AutoLogin/vodafone.py

English version - (Italian version above)

Installation requirements

Clone this repository git clone https://github.com/blackwiz4rd/Vodafone-WiFi-AutoLogin
Requirements to install the scrip are available in install_pip_requirements.sh.
It is required to install python and pip.
To download python: https://www.python.org/downloads/.
To download pip on MacOS: curl -o ~/Downloads/get-pip.py https://bootstrap.pypa.io/get-pip.py.
To download pip on Linux: wget https://bootstrap.pypa.io/get-pip.py ~/Downloads/get-pip.py.
To download pip on Windows use a web broswer https://bootstrap.pypa.io/get-pip.py and save this file in the Downloads folder.
To install pip: cd ~/Downloads/ and execute python get-pip.py.
After installing pip make sure the requirements are satisfied, run
cd ~/Vodafone-WiFi-AutoLogin
chmod +x install_pip_requirements.sh
./install_pip_requirements.sh

How to setup for users

Be sure vodafone.config and vodafone.py are in the same folder.
Change the fields according to your configuration. On unix enviroment you can use: nano vodafone.conf.
Configuration examples:
It is required to be connected to a Vodafone-WiFi in order to login to the hotspot, otherwise the execution will be interrupted.
Use force=True only if you are getting a NotConnectedToVodafoneWiFiException and you are sure to be connected to a Vodafone-WiFi network.
Configuration examples:

  1. vodafone.config Example n.1 (Vodafone Italia user):
    [config]
    username=your-account@your-provider.com
    password=your-password
    customer=VF_IT
    force=False
  2. vodafone.config Example n.2 (Vodafone Spain user):
    [config]
    username=your-account@your-provider.com
    password=your-password
    customer=VF_ES
    force=False
  3. vodafone.config Example n.3 (Pass Customer user):
    [config]
    username=your-account@your-provider.com
    password=your-password
    customer=
    force=False
  4. vodafone.config Example n.4 (Fon Roaming Partner user):
    [config]
    username=your-account@your-provider.com
    password=your-password
    customer=FON_ROAM
    force=False

    How to run the script for users

    cd ~/Vodafone-WiFi-AutoLogin/
    python vodafone.py

An additional curl script was added if you wish to use curl only to login

nano curl_script.sh
./curl_script.sh

Loop the script with crontab -e and configure it as you like using the site https://crontab.guru/#0_*_*_*_*. Example of usage to loop the script at each minute 0 of every hour in crontab -e:

0 * * * * python /Users/luca/Documents/github/Vodafone-WiFi-AutoLogin/vodafone.py