Sophos Automatic Login & Authentication Mobile Application
This project provides scripts and applications to automate the login process for Sophos captive portals, specifically targeting mobile platforms (iOS and Android).
Features
- Store Multiple Credentials: Securely store username/password pairs.
- Automatic Login: Attempt login using stored credentials until success.
- Logout Functionality: Log out currently active sessions.
- Platform-Specific Implementations:
- iOS: Uses Scriptable app for running JavaScript-based login/logout scripts. Stores credentials in iCloud Drive.
- Android: Uses Kivy framework for a simple GUI application and a command-line interface (CLI) script. Stores credentials locally.
Setup
iOS (Scriptable)
- Install the Scriptable app from the App Store.
- Copy the
login.jsandlogout.jsfiles from theios/directory into Scriptable's iCloud Drive folder (iCloud Drive/Scriptable/). - Run the
login.jsscript once to create thecredentials.jsonfile and add your credentials when prompted.
Android (Kivy App / CLI)
- CLI:
- Ensure you have Python 3 installed.
- Navigate to the
android/directory. - Run
python cli.pyto manage credentials and perform login/logout.
- Kivy App (Build):
- Install Buildozer:
pip install buildozer - Navigate to the
android/directory. - Run
buildozer android debugto build the APK. (Requires Android SDK/NDK setup). - Install the generated APK on your Android device.
- Install Buildozer:
Usage
iOS
- Run the
login.jsscript from Scriptable to log in. - Run the
logout.jsscript from Scriptable to log out. - You can create home screen widgets or Siri shortcuts in Scriptable for easier access.
Android
- CLI: Use the commands
l(login),o(logout),a(add),q(quit) in the interactive prompt. - App: Launch the "SophosAutoLogin" app and use the buttons to Login, Logout, or Add Credentials.