1
0
mirror of https://github.com/QSCTech/zjunet.git synced 2026-01-22 11:44:48 +08:00

remove iconv, fixes #35

This commit is contained in:
Zeno Zeng 2014-10-02 13:25:28 +08:00
parent b614536b6f
commit 00cd078724
3 changed files with 3 additions and 9 deletions

View File

@ -18,16 +18,10 @@ Command Line Scripts for ZJU (VPN / WLAN / DNS)
## Requirements ## Requirements
### vpn
- xl2tpd - xl2tpd
### wlan
- curl - curl
- iconv
## Install ## Install
### From source ### From source

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
VERSION=0.1.0-17 VERSION=0.1.0-18
cd debian cd debian
./build.sh $VERSION > /dev/null ./build.sh $VERSION > /dev/null

View File

@ -2,7 +2,7 @@
# wlan.sh -- login/logout for ZJUWLAN # wlan.sh -- login/logout for ZJUWLAN
# #
# Requirements: curl, iconv # Requirements: curl
# #
# Copyright (C) 2014 Zhang Hai <Dreaming.in.Code.ZH@Gmail.com> # Copyright (C) 2014 Zhang Hai <Dreaming.in.Code.ZH@Gmail.com>
# Copyright (C) 2014 Zeno Zeng <zenoofzeng@gmail.com> # Copyright (C) 2014 Zeno Zeng <zenoofzeng@gmail.com>
@ -56,7 +56,7 @@ login() {
logout $USERNAME $PASSWORD logout $USERNAME $PASSWORD
echo "Login: ${USERNAME}" echo "Login: ${USERNAME}"
RESPONSE=$(curl "https://net.zju.edu.cn/cgi-bin/srun_portal" -H "Content-Type: application/x-www-form-urlencoded" -d "action=login&username=${USERNAME}&password=${PASSWORD}&ac_id=3&type=1&is_ldap=1&local_auth=1" -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=login&username=${USERNAME}&password=${PASSWORD}&ac_id=3&type=1&is_ldap=1&local_auth=1" -s)
case "${RESPONSE}" in case "${RESPONSE}" in
*help.html*) *help.html*)