Created
January 31, 2020 17:24
-
-
Save NiciDieNase/6becb0ce81dd3445aab8394a0d52cad6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/sh | |
URL=http://www.wifionice.de/de/ | |
COOKIEFILE=$(mktemp /tmp/wifionice_login.XXXXXX) | |
CSRF=$(curl -s $URL -D $COOKIEFILE | grep -oe "<input type=\"hidden\" name=\"CSRFToken\" value=\"[a-z0-9]*\">" | cut -d \" -f 6) | |
curl -S '$URL' -b $COOKIEFILE --data "login=true&CSRFToken=$CSRF&connect=" | |
rm $COOKIEFILE | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment