Skip to main content

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

captive_portal_detector-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

captive_portal_detector-0.1.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

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

Hashes for captive_portal_detector-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a390612b2600c96adab90bc7d938ab932b284d93a510953f64c3c044cd266aea
MD5 d2f19fa139bbbb408f3e71175a218d73
BLAKE2b-256 309c6e0abc310e608eb641b1d8c5ff79cec4dd77171fe0ad438e1ebaddde8ca4

See more details on using hashes here.

File details

Details for the file captive_portal_detector-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for captive_portal_detector-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 caf13aab7048974652059f8a02445a1e3636c2a33135a5dd195763ac35c777df
MD5 f7fc1c086a19c2a61d65181106e0693d
BLAKE2b-256 4eb606c99b5ad587cabe9075c991148373fd300ce4937b035e3675594d115a70

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page