Unverified Commit d746f333 authored by Satori Komeiji's avatar Satori Komeiji Committed by GitHub
Browse files

Update website in the script

I tried https://cas.sustc.edu.cn/cas/login and it is not found. Changing to sustech.edu.cn solved the problem. However the php file is still named as sustc_cas.php, which should remain unchanged.
parent 38c37efe
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ sidebar: auto
#!/bin/bash
source /etc/profile
set -e
curl https://cas.sustc.edu.cn/cas/login?service=http%3A%2F%2F172.16.16.20%3A803%2Fsustc_cas.php > a.txt
curl https://cas.sustech.edu.cn/cas/login?service=http%3A%2F%2F172.16.16.20%3A803%2Fsustc_cas.php > a.txt
s=$(grep -o -E "on\"\ value=\"(.+?)\"" a.txt)
echo $s
s=${s#*\"}
@@ -47,7 +47,7 @@ s=${s%%\"*}
echo $s
unm=此处填入教/学工号
pwd=此处填入密码
curl "https://cas.sustc.edu.cn/cas/login?service=http%3A%2F%2F172.16.16.20%3A803%2Fsustc_cas.php" --data "username=$unm&password=$pwd&execution=$s&_eventId=submit&geolocation="
curl "https://cas.sustech.edu.cn/cas/login?service=http%3A%2F%2F172.16.16.20%3A803%2Fsustc_cas.php" --data "username=$unm&password=$pwd&execution=$s&_eventId=submit&geolocation="
```
[给路由器写了一个登录南科大校园网的脚本](https://www.whexy.com/post/openwrt-zhi-jie-jue-nan-ke-da-xiao-yuan-wang-deng-lu-nan-ti/)