Created
April 16, 2010 12:33
-
-
Save westphahl/368358 to your computer and use it in GitHub Desktop.
Script for HS WLAN login
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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