Skip to content
Shaban034Public

About

Automated CCIT Portal Login Service for Windows is a lightweight, background daemon that eliminates the need for manual browser re-authentication on campus networks using captive portals (such as Sophos, Cyberoam, or Fortinet gateways)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Campus Gateway Auto-Login Service for Windows

An automated, lightweight Python service designed to maintain continuous internet connectivity through the CCIT / Sophos / Cyberoam captive portal (http://182.43.0.22:347/).

It periodically verifies external internet access, automatically re-authenticates when disconnected, and sends keep-alive pings to prevent idle session logouts—all running silently in the background.


Features

  • Silent Operation: Uses pure Python socket checks instead of system pings (os.system), preventing command prompt windows from flashing every cycle.
  • Automatic Re-Authentication: Detects offline status and sends mode=191 POST requests directly to login.xml.
  • Session Keep-Alive: Sends periodic mode=192 status pings to prevent gateway idle timeouts.
  • Zero Overhead: Consumes minimal CPU and memory resources.
  • Logging: Writes timestamped logs to log.txt for easy troubleshooting.

Prerequisites

  • OS: Windows 10 / 11
  • Python: Python 3.8 or higher
  • Dependencies: requests library

Install requests if you haven't already:

python -m pip install requests

Setup & Installation

Step 1: Script Configuration

  1. Place auto_login.py in your target folder (e.g., C:\AutoLogin\).
  2. Open auto_login.py and set your gateway URL, username, and password.

Step 2: Configure Windows Task Scheduler (Silent Background Execution)

To run the script automatically in the background when you log into Windows without command prompt popups:

Find pythonw.exe Path

Open Command Prompt and run:

where pythonw.exe

Create the Task

  1. Press Win + R, type taskschd.msc, and press Enter.
  2. In the right panel, click Create Task... (do not select Create Basic Task).

Configure the Properties

General Tab:

  • Name: CCIT Auto Login
  • Select: Run only when user is logged on
  • Check: Run with highest privileges

Triggers Tab:

  • Click New... ➜ Begin the task: At log on ➜ Click OK.

Actions Tab:

  • Click New... ➜ Action: Start a program
  • Program/script: Paste the full path to pythonw.exe
  • Add arguments: auto_login.py
  • Start in: C:\AutoLogin\
  • Click OK.
  • Click OK to save the task.

Managing the Background Service

Start Service: Right-click CCIT Auto Login in Task Scheduler and select Run.

Verify Execution: Open Command Prompt and run:

tasklist | findstr python

Look for pythonw.exe in the output.

Check Activity: Inspect C:\AutoLogin\log.txt for live connection logs.

Stop Service: Run the following in Command Prompt:

taskkill /F /IM pythonw.exe

Troubleshooting

  • Task not running? Verify the pythonw.exe path is correct and auto_login.py is in the specified directory.
  • Check logs: Review log.txt for detailed error messages and connection status.
  • Python not found? Ensure Python is installed and added to your system PATH.

License

This project is provided as-is for educational and personal use.

About

Automated CCIT Portal Login Service for Windows is a lightweight, background daemon that eliminates the need for manual browser re-authentication on campus networks using captive portals (such as Sophos, Cyberoam, or Fortinet gateways)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages