Skip to content

Instantly share code, notes, and snippets.

@dguihal
Created February 15, 2018 13:40
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 dguihal/9e3c7235c8e2d1854af89f3992fa1124 to your computer and use it in GitHub Desktop.
Save dguihal/9e3c7235c8e2d1854af89f3992fa1124 to your computer and use it in GitHub Desktop.
#!/bin/bash
COOKIE="faab_id=PLOP"
if ! curl -s 'http://faab.euromussels.eu' --cookie "$COOKIE" --compressed | grep -q 'Vous êtes'
then
curl 'http://faab.euromussels.eu/loginA.php' -H 'Host: faab.euromussels.eu' --compressed --data 'login=login&password=password&action=Login'
echo "Relog at $(time)" > $HOME/bin/reauth.log
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment