From 00cd0787243d5bb51e2d25fbcde0d43d7dcbd185 Mon Sep 17 00:00:00 2001 From: Zeno Zeng Date: Thu, 2 Oct 2014 13:25:28 +0800 Subject: [PATCH] remove iconv, fixes #35 --- README.md | 6 ------ build/build.sh | 2 +- lib/wlan.sh | 4 ++-- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 245dfa1..66349df 100644 --- a/README.md +++ b/README.md @@ -18,16 +18,10 @@ Command Line Scripts for ZJU (VPN / WLAN / DNS) ## Requirements -### vpn - - xl2tpd -### wlan - - curl -- iconv - ## Install ### From source diff --git a/build/build.sh b/build/build.sh index 186b284..383d7c7 100755 --- a/build/build.sh +++ b/build/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=0.1.0-17 +VERSION=0.1.0-18 cd debian ./build.sh $VERSION > /dev/null diff --git a/lib/wlan.sh b/lib/wlan.sh index c934660..91844e6 100755 --- a/lib/wlan.sh +++ b/lib/wlan.sh @@ -2,7 +2,7 @@ # wlan.sh -- login/logout for ZJUWLAN # -# Requirements: curl, iconv +# Requirements: curl # # Copyright (C) 2014 Zhang Hai # Copyright (C) 2014 Zeno Zeng @@ -56,7 +56,7 @@ login() { logout $USERNAME $PASSWORD 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 *help.html*)