mirror of
https://github.com/QSCTech/zjunet.git
synced 2026-01-23 04:04:48 +08:00
update wlan's logout, fixes #20
This commit is contained in:
parent
7e51715f8f
commit
861dbda6bc
5
wlan.sh
5
wlan.sh
@ -26,12 +26,15 @@ logout() {
|
||||
PASSWORD=$2
|
||||
|
||||
echo "Logout: ${USERNAME}"
|
||||
RESPONSE=$(curl "https://net.zju.edu.cn/rad_online.php" -H "Content-Type: application/x-www-form-urlencoded" -d "action=auto_dm&username=${USERNAME}&password=${PASSWORD}" -s | iconv -c -f gbk -t utf8)
|
||||
RESPONSE=$(curl "https://net.zju.edu.cn/cgi-bin/srun_portal" -H "Content-Type: application/x-www-form-urlencoded" -d "action=logout" -s)
|
||||
|
||||
case "${RESPONSE}" in
|
||||
*ok*)
|
||||
echo "Logout: success."
|
||||
;;
|
||||
*成功*)
|
||||
echo "Logout: success."
|
||||
;;
|
||||
*)
|
||||
echo "Logout: ${RESPONSE}"
|
||||
exit 1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user