Detects captive portals and basic network connectivity.
Project description
Captive Portal Detector
A Python utility to detect captive portals and assess real internet connectivity.
Features
- Checks standard captive portals, DNS hijacks, HTTP-only walled gardens
- Uses multiple probes (HTTP/HTTPS/IPv6/DNS)
- Detects TLS interception in limited cases
- Fast: runs probes concurrently
Usage
Install via pip:
pip install captive-portal-detector
CLI Usage
Simply run it with:
capdet
Python Usage
from capdet.detector import NetworkProbe
status = NetworkProbe().network_health()
print(status)
Output
OK → Internet access confirmed
CAPTIVE → Captive portal or DNS hijack detected
NO_INTERNET → No network connectivity
Notes
- Any successful TLS handshake is considered "OK"
- Networks with MITM TLS proxies (e.g., corporate firewalls) may be incorrectly classified as "OK"
- For true MITM detection, certificate pinning would be required (not implemented)
TODO
Certificate pinning to detect HTTPS MITM proxies
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file captive_portal_detector-0.1.0.tar.gz.
File metadata
- Download URL: captive_portal_detector-0.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a390612b2600c96adab90bc7d938ab932b284d93a510953f64c3c044cd266aea
|
|
| MD5 |
d2f19fa139bbbb408f3e71175a218d73
|
|
| BLAKE2b-256 |
309c6e0abc310e608eb641b1d8c5ff79cec4dd77171fe0ad438e1ebaddde8ca4
|
File details
Details for the file captive_portal_detector-0.1.0-py3-none-any.whl.
File metadata
- Download URL: captive_portal_detector-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
caf13aab7048974652059f8a02445a1e3636c2a33135a5dd195763ac35c777df
|
|
| MD5 |
f7fc1c086a19c2a61d65181106e0693d
|
|
| BLAKE2b-256 |
4eb606c99b5ad587cabe9075c991148373fd300ce4937b035e3675594d115a70
|