Skip to content

Commit

Permalink
remove iconv, fixes #35
Browse files Browse the repository at this point in the history
  • Loading branch information
zenozeng committed Oct 2, 2014
1 parent b614536 commit 00cd078
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,10 @@ Command Line Scripts for ZJU (VPN / WLAN / DNS)

## Requirements

### vpn

- xl2tpd

### wlan

- curl

- iconv

## Install

### From source
Expand Down
2 changes: 1 addition & 1 deletion build/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

VERSION=0.1.0-17
VERSION=0.1.0-18

cd debian
./build.sh $VERSION > /dev/null
Expand Down
4 changes: 2 additions & 2 deletions lib/wlan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# 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 Zeno Zeng <zenoofzeng@gmail.com>
Expand Down Expand Up @@ -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*)
Expand Down

0 comments on commit 00cd078

Please sign in to comment.