Created
February 3, 2018 16:49
-
-
Save hacker-bastl/147718dcc637e150bfa394e7491ff84c to your computer and use it in GitHub Desktop.
WIFIonICE token login automation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# change this to the MAC of your device | |
MAC="XX:XX:XX:XX:XX:XX" | |
# get the CSRF token required for login | |
TOKEN=$(curl --silent --cookie COOKIE --cookie-jar COOKIE 'http://login.wifionice.de/de/' | grep CSRFToken | cut -d '"' -f 12) | |
# perform WIFIonICE login | |
curl -vvv --cookie COOKIE --cookie-jar COOKIE -H "Content-Type: application/x-www-form-urlencoded" -H "Connection: keep-alive" --data "login=true&CSRFToken=$TOKEN&connect=" "http://login.wifionice.de/de/?mac=$MAC" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
test