Skip to content

Instantly share code, notes, and snippets.

@barak
Created August 7, 2012 08:28
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 barak/3283218 to your computer and use it in GitHub Desktop.
Save barak/3283218 to your computer and use it in GitHub Desktop.
Trivial script to log in to Colorado State University (CSU) guest WiFi system instead of manual laborious form filling.
#! /bin/sh
set -e
# Set these appropriately. I had two, so I made a way to get either. You probably only need one.
case "${1}" in
d*)
user="vpsa22638"
password="A34ks52f"
;;
c*|*)
user="vpsa44314"
password="W74x4bcb"
;;
esac
echo "user: ${user}"
form="https://arubamaster.colostate.edu/auth/index.html/u"
outfile="/tmp/netlogin-$$.html"
curl --progress-bar --output "${outfile}" \
--insecure \
--data "user=${user}" \
--data "password=${password}" \
"${form}"
if [ -e "${outfile}" ]; then
echo Result:
lynx -dump "${outfile}"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment