QSCTech / zjunet

Command Line Scripts for ZJU (VPN / WLAN / DNS)
GNU General Public License v3.0
302 stars 48 forks source link

wlan web adress question #20

Closed xqyww123 closed 10 years ago

xqyww123 commented 10 years ago

I can't use your wlan script and I think the url may be wrong. That's the url I get : logout: RESPONSE=$(curl "https://net.zju.edu.cn/cgi-bin/srun_portal" -H "Content-Type: application/x-www-form-urlencoded" -d "action=logout" -s | iconv -c -f gbk -t gbk) login: 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)

xqyww123 commented 10 years ago

Current location: Weat 1, ZIjingang

zenozeng commented 10 years ago
    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)

    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)