Skip to content

Instantly share code, notes, and snippets.

@NiciDieNase
Created January 31, 2020 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NiciDieNase/6becb0ce81dd3445aab8394a0d52cad6 to your computer and use it in GitHub Desktop.
Save NiciDieNase/6becb0ce81dd3445aab8394a0d52cad6 to your computer and use it in GitHub Desktop.
#!/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