Skip to content

Instantly share code, notes, and snippets.

@hupili
Last active October 8, 2015 01:48
Show Gist options
  • Save hupili/3258159 to your computer and use it in GitHub Desktop.
Save hupili/3258159 to your computer and use it in GitHub Desktop.
CUHK Wireless Portal Login Scripts
#!/bin/bash
login_url="https://securelogin.wlan.cuhk.edu.hk/cgi-bin/login"
post_data="user=<username>&password=<password>&cmd=authenticate&Login=Log+In"
mkdir -p tmp
wget --secure-protocol=sslv3 $login_url --post-data="$post_data" -O tmp/login.html
#!/bin/bash
logout_url="https://securelogin.wlan.cuhk.edu.hk/auth/logout.html?logout=Logout"
mkdir -p tmp
wget --secure-protocol=sslv3 --tries=1 --timeout=5 $logout_url -O tmp/logout.html
@hupili
Copy link
Author

hupili commented Aug 4, 2012

Substitute and with corresponding information.

@hupili
Copy link
Author

hupili commented Aug 4, 2012

Substitute the following and with corresponding information.

<username>
<password>

@hupili
Copy link
Author

hupili commented Aug 17, 2013

We recently had this error: routines:SSL23_GET_SERVER_HELLO:reason(1112).

See a related post, http://carnivore.it/2011/10/07/error_14077458_ssl_routines_ssl23_get_server_hello_reason_1112

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment