Skip to content

Instantly share code, notes, and snippets.

@hakre
Created September 21, 2013 19:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hakre/6653276 to your computer and use it in GitHub Desktop.
Save hakre/6653276 to your computer and use it in GitHub Desktop.
Rough script to connect to Wlan Uni-Hamburg via wpa-supplicant in shell (no Internet Browser required)
#!/bin/bash
#
# edit /etc/wpa_supplicant/wpa_supplicant.conf:
#
# network={
# ssid="GUEST"
# psk="rrz-wlan"
# }
#
echo "Connecting to WPA/WPA2 network uni-hamburg.de"
wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -Dwext
echo "Obtaining IPv4 address via DHCP"
dhclient -4 wlan0
echo "CISCO Webauth Login on rrz.uni-hamburg.de"
curl -sS -i 'https://webauth.rrz.uni-hamburg.de/login.html' -d 'buttonClicked=4&err_flag=0&err_msg=&info_flag=0&info_msg=&redirect_url=&username=USER&password=PASS'| grep Login
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment