Skip to content

Instantly share code, notes, and snippets.

@arselzer
Last active August 29, 2015 13:57
Show Gist options
  • Save arselzer/9482085 to your computer and use it in GitHub Desktop.
Save arselzer/9482085 to your computer and use it in GitHub Desktop.
moodle auth/request scripts
# auth.sh
curl -d username=$1 -d password=$2 https://www.medmood.com/vis/login/index.php -i \
| sed -n '/Set-Cookie:/p' \
| sed -n '$p''
# request.sh
curl -i https://www.medmood.com/vis$1 -H "$2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment