A fast, lightweight Certificate Transparency (CT) log tailer for your terminal. Filter domains with regex, run locally for privacy, and monitor in real time—no third-party servers, no tracking. A modern, local, privacy-friendly CertStream alternative.
Project description
CertPatrol
A fast, lightweight Certificate Transparency (CT) log tailer for your terminal. Filter domains with regex, run locally for privacy, and monitor in real time — no third-party servers, no tracking.
A modern, local, privacy-friendly CertStream alternative.
Looking for a more advanced CertStream server alternative?
Check out Certstream Server Go by d-Rickyy-b for a robust, production-grade solution.
Installation
pip install certpatrol
Quick start
# Find domains containing "example"
certpatrol --pattern "example"
# Find shop subdomains of amazon.com
certpatrol --pattern "shop.*\.amazon\.com$"
# Match against base domains only (e.g., example.co.uk)
certpatrol --pattern "argentina" --etld1
Options
Core Options
-p, --pattern PATTERN– Regex pattern to match domains against (required)-l, --logs LOGS– Specific CT logs to monitor (default: all usable logs)-v, --verbose– Verbose output with extra info-h, --help– Show help message and exit
Polling & Performance
-s, --poll-sleep SECONDS– Initial poll interval (default: 3.0, adaptive)-mn, --min-poll-sleep– Minimum poll sleep for adaptive polling (default: 1.0)-mx, --max-poll-sleep– Maximum poll sleep for adaptive polling (default: 60.0)-b, --batch SIZE– Batch size for fetching entries (default: 256)-m, --max-memory-mb– Maximum memory usage in MB (default: 100)
Filtering & Output
-e, --etld1– Match against base domains only (requires tldextract)-q, --quiet-warnings– Suppress parse warnings (only show matches)-x, --quiet-parse-errors– Suppress ASN.1 parsing warnings-d, --debug-all– With -v, print detailed per-entry domain listings
Checkpoint Management
-c, --checkpoint-prefix– Custom prefix for checkpoint files-k, --cleanup-checkpoints– Clean up orphaned checkpoint files and exit
Examples
# Basic monitoring
certpatrol --pattern "petsdeli"
# Multiple patterns with verbose output
certpatrol --pattern "(petsdeli|pet-deli)" --verbose
# API subdomains with quiet mode
certpatrol --pattern "api.*\.google\.com$" --quiet-warnings
# All subdomains of a domain with custom memory limit
certpatrol --pattern ".*\.example\.com$" --max-memory-mb 200
# Base domain matching only
certpatrol --pattern "argentina" --etld1
# Run multiple instances with custom prefixes
certpatrol --pattern "domain1" --checkpoint-prefix "instance1" &
certpatrol --pattern "domain2" --checkpoint-prefix "instance2" &
# Clean up old checkpoint files
certpatrol --cleanup-checkpoints
# Performance tuning for high-volume monitoring
certpatrol --pattern "example" --batch 512 --min-poll-sleep 0.5 --max-poll-sleep 30
# Graceful shutdown examples
kill -TERM $(pgrep -f "certpatrol.*example")
# Or use Ctrl+C for immediate graceful shutdown
Requirements
- Python 3.6+
- requests
- cryptography
- idna
- tldextract (optional, for --etld1)
- psutil (optional, for memory monitoring)
Features
- Real-time monitoring – Starts from current time (no historical data)
- Graceful shutdown – Handles SIGTERM, SIGINT, and SIGHUP signals properly
- Adaptive polling – Automatically adjusts intervals based on activity and errors
- Memory management – Monitors and limits memory usage to prevent excessive consumption
- Connection pooling – Efficient HTTP session management with retry strategies
- Checkpoint persistence – Automatic state saving with atomic writes
- Multi-instance support – Unique checkpoint files per process with custom prefixes
Notes
- Checkpoints saved in
checkpoints/folder with process-specific names - Signal handling ensures clean shutdown and checkpoint saving
- Sleep periods are responsive to shutdown signals (checks every 0.5s)
- Use Ctrl+C,
kill, or system shutdown for graceful termination
License
MIT License — see LICENSE file for details.
Project details
Release history Release notifications | RSS feed
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 certpatrol-0.1.2.tar.gz.
File metadata
- Download URL: certpatrol-0.1.2.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
223af5a11ba0f5740750aa547095d05d964b194f89f106f01aa312c5535ff1e5
|
|
| MD5 |
d5ebaa6bcfedb2c16c3029f16a98dc6d
|
|
| BLAKE2b-256 |
2a7bbd03bb1338482177e589c5cdd18c5fdf14268838b8a41c53ddaadddfcd8d
|
File details
Details for the file certpatrol-0.1.2-py3-none-any.whl.
File metadata
- Download URL: certpatrol-0.1.2-py3-none-any.whl
- Upload date:
- Size: 19.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
872b6ccb52af88b053d0b50755decd4808276184f088bd7156beebc44d278d35
|
|
| MD5 |
980434294b20148de71a6779d3a5affa
|
|
| BLAKE2b-256 |
a287f2c438f2bc60df012f280d5fde7fa21bb37c14db583cd08f73bbc7c3e2ac
|