Skip to content

Instantly share code, notes, and snippets.

@ChatchaiJ
Created December 14, 2015 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ChatchaiJ/5f64436bed7b0990b5b5 to your computer and use it in GitHub Desktop.
Save ChatchaiJ/5f64436bed7b0990b5b5 to your computer and use it in GitHub Desktop.
Minimal PSU Autosigned Script
#!/bin/bash
USER="YOUR-PASSPORT-ID"
PASSWD="YOUR-PASSPORT-PASSWORD"
COOKIES="cookies.txt"
/usr/bin/curl \
--connect-timeout 10 \
--max-time 10 \
-s -k \
-L 'https://cp-ufw.psu.ac.th:6082/php/uid.php?vsys=1' \
-c $COOKIES \
-b $COOKIES \
-d user=$USER \
--data-urlencode "passwd=$PASSWD" \
-d ok=Login
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment