Automatically log into Kerio Control or similar captive portals when connecting to a Wi-Fi network — no more typing your username and password every day.
This simple Python tool logs you into a captive Wi-Fi login page (Kerio Control) automatically when you connect to a specific Wi-Fi network (e.g., "keyhan").
It is currently built and tested for Windows, using Task Scheduler to detect Wi-Fi connections and run the script only once when needed.
- ✅ Detects Wi-Fi SSID
- ✅ Auto-sends login request to captive portal
- ✅ Uses Windows Task Scheduler (no resource usage)
- ✅ Configurable with your credentials
- ✅ Easy to set up
git clone git@github.com:Crimson-Amir/KerioControl-AutoLogin.git
cd KerioControl-AutoLogin
Replace USERNAME and PASSWORD with your login information.
adjust LOGIN_URL or field names if your Kerio login page is customized.
replace autologin.py path with your real path:
@echo off
py "C:\full\path\to\autologin.py"
Press Win + S → type: Task Scheduler → Open
Click Create Task (not "basic task")
-
Name: AutoLogin Keyhan
-
Check: Run whether user is logged in or not
-
Check: Run with highest privileges
-
Click New…
-
Begin the task: On an event
-
Settings:
-
Log: Microsoft-Windows-NetworkProfile/Operational
-
Source: NetworkProfile
-
Event ID: 10000 (connected to Wi-Fi)
-
-
Click OK
This will trigger whenever a network is connected
-
Click New
-
Action: Start a program
-
Program/script: "C:\Path\To\login_script.bat"
-
Conditions Tab: Uncheck Start only if on AC power (so it runs on battery too)
We'd love your help to bring support to more platforms!
Also welcome:
🔒 Secure credential storage
🖼️ GUI or tray icon version
🌍 Multi-router/captive-portal compatibility
🧪 Unit testing / CI
Just fork this repo and open a PR or issue — happy to collaborate 💬