quick start
Two ways in. Grab a binary from tashifkhan/sophos-auto-login if you do not want a Python install, or clone and run autologin.py.
You still need to be on the campus network that can reach http://172.16.68.6:8090/httpclient.html. Off campus this script has nothing to talk to.
Pre-built executable#
- Open tashifkhan/sophos-auto-login.
- Download the build for your OS.
- Run it.
Windows. Double-click autologin.exe.
macOS. Extract autologin-mac.zip (release zips have also been named autologin_script-mac.zip). Gatekeeper will block an unsigned binary. Either:
- In Terminal,
cdto the extract folder and runxattr -d com.apple.quarantine autologin, then run./autologin. - Right-click the file, choose Open, confirm the dialog. Or allow it under System Settings, Privacy & Security.
Linux. Extract autologin-linux.zip (or autologin_script-linux.zip), cd there, run ./autologin.
The frozen binary carries its own deps. First launch copies credentials.db into the persistent path if that file is still empty.
From source#
git clone https://github.com/tashifkhan/sophos-auto-login.git
cd sophos-auto-login
pip install -r requirements.txt
python autologin.py
python3 works the same. No flags opens the interactive menu. Add at least one ID before you start auto-login. Empty database, run_auto_login() prints an error and returns.
Pinned packages live in requirements.txt. The ones the script actually imports:
requestsfor the portal POSTsrichfor the TUIspeedtest-clifor--speedtestwin10toaston Windows,notify2listed for Linux (the notifier itself shells out tonotify-send)
sqlite3 is in the stdlib. README still mentions lxml and colorama. Login parsing uses xml.etree.ElementTree, not lxml.
First session#
- Add an ID: menu option 1, or
python autologin.py --add. - Start the loop: menu option 2, or
python autologin.py --start. - Leave that terminal open, or on Unix use daemon mode.
Ctrl+C hits exit_handler / signal_handler, which POSTs logout for the active credential before the process dies.