Skip to content

Auto login to the Hackney Libraries Wifi network. For Mac OS X only.

Notifications You must be signed in to change notification settings

imclab/hackney_libraries_autologin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

hackney_libraries_autologin

Introduction

CLR James library offers free Wi-Fi. However, every hour my Mac gets booted off; I suspect they either require explicit re-login to demonstrate client liveliness or just don't support Macs.

This tool logs into their web portal when needed; your connection will die for on average 5 seconds before the tool kicks in.

Requirements

Quickstart

  • Clone the repo.
  • (if you installed virtualenv and virtualenvwrapper):
    • mkvirtualenv hackney_libraries_autologin
    • workon hackney_libraries_autologin
  • pip install -r requirements.txt
  • Launch the Keychain Access application.
  • Add a new account called Hackney Libraries.
    • Set the username field to your library card's number.
    • Set the password to your PIN.
  • Quit the Keychain Access application.
  • Execute ./src/auto_login.py.
  • If you want to immediately attempt to login rather than wait for the script, press ENTER.

How it works

  • Use the airport command-line utility to confirm that we are both connected to a Wi-Fi network and that the Wi-Fi network's SSID is LBH-Libraries.
  • If the above is true, determine if we need to re-login by attempting to HTTP GET https://securelogin.arubanetworks.com/; it times out if we don't need to log in, and redirects to a login page if we do need to log in.
  • If we need to log in, HTTP POST to https://securelogin.arubanetworks.com/cgi-bin/login with appropriate x-url-form-encoded content, cookies, and referrer.
  • We get the credentials directly from Keychain Access by executing security.

That should be enough instructions to modify the script if need be; consult the top-most section titled Constants for stuff to change if need be.

About

Auto login to the Hackney Libraries Wifi network. For Mac OS X only.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published