Skip to content

Instantly share code, notes, and snippets.

@bigeagle
Last active March 11, 2016 03:50
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bigeagle/efeffe1cbc1ffb833698 to your computer and use it in GitHub Desktop.
Save bigeagle/efeffe1cbc1ffb833698 to your computer and use it in GitHub Desktop.
tunet.sh
#!/bin/bash
USER="username"
PASSWORD="password"
PASSWORD=`echo -n $PASSWORD|md5sum|cut -d' ' -f1`
curl 'https://net.tsinghua.edu.cn/do_login.php' -X 'POST' -H 'Origin: http://net.tsinghua.edu.cn' \
--data "action=login&username=${USER}&password={MD5_HEX}${PASSWORD}&ac_id=1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment