Skip to content

Instantly share code, notes, and snippets.

@westphahl
Created April 16, 2010 12:33
Show Gist options
  • Save westphahl/368358 to your computer and use it in GitHub Desktop.
Save westphahl/368358 to your computer and use it in GitHub Desktop.
Script for HS WLAN login
#!/bin/bash
# Usage: $./hs-wlan-login username
# Author: Simon Westphahl <[email protected]>
# Required (Ubuntu): zenity, libnotify-bin, curl
if test -z "$1"
then exit
else
USERNAME=$1
fi
if ! PASSWORD=$(zenity --entry --title "Login to HS WLAN" \
--text "Enter password for user $USERNAME" --hide-text)
then exit
fi
if !(curl -d "user=$USERNAME&password=$PASSWORD&cmd=authenticate&Login=Log+In" \
https://securelogin.arubanetworks.com/cgi-bin/login)
then notify-send -i error "Could not log in to HS WLAN with user $USERNAME"
else
notify-send -i checkbox \
"Succesfully logged in to HS WLAN with user $USERNAME"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment