Certificate Transparency log streamer
Project description
Certificate Transparency Log Streamer
crtstream is a lightweight Certificate Transparency (CT) log streamer written in Python.
It continuously monitors CT logs and outputs newly issued certificates in real time.
It supports multiple output modes:
- Domain names only
- Human-readable summaries
- Full structured JSON suitable for pipelines and data analysis
✨ Features
- 📡 Real-time streaming from multiple CT logs
- 📜 Supports X.509 and precert entries (RFC 6962)
- 🧵 Multi-threaded (one thread per log)
- 📦 Installable via
pip - 🔌 Clean CLI interface
- 🧾 JSON output suitable for SIEM, analytics, or storage
- ⚙️ Default bundled
logs.json, no setup required - 🛠 Custom CT log configuration supported via
--logs
📦 Installation
From PyPI (recommended)
pip install crtstream
Or with pipx:
pipx install crtstream
From source (development)
git clone https://github.com/glaubermagal/crtstream.git
cd crtstream
pip install -e .
⚙️ Configuration
crtstream uses a default logs.json bundled with the package.
You do not need to create a file manually.
Use default logs (no setup required)
crtstream
Use a custom CT logs file
crtstream --logs /path/to/logs.json
Example logs.json format
{
"google_us": "https://ct.googleapis.com/logs/us1/argon2025h2",
"google_eu": "https://ct.googleapis.com/logs/eu1/xenon2025h2",
"cloudflare_nimbus": "https://ct.cloudflare.com/logs/nimbus2025",
"digicert_yeti": "https://yeti2025.ct.digicert.com/log",
"digicert_nessie": "https://nessie2025.ct.digicert.com/log"
}
🚀 Usage
Basic usage
crtstream
Print only domains
crtstream --domains-only
Output full JSON (one object per line)
crtstream --json
Custom logs file + JSON output
crtstream --logs /path/to/logs.json --json
🧾 JSON Output Format
Each line is a JSON object when using --json:
{
"log_name": "google_us",
"log_url": "https://ct.googleapis.com/logs/us1/argon2025h2",
"entry_index": 123456,
"timestamp": "2025-01-01T12:00:00Z",
"certificate": {
"domains": ["example.com", "www.example.com"],
"subject": { "commonName": "example.com" },
"issuer": { "commonName": "Google Trust Services" },
"validity": {
"not_before": "2025-01-01T00:00:00",
"not_after": "2025-04-01T23:59:59"
},
"serial_number": "0x123abc",
"public_key": {
"type": "RSAPublicKey",
"key_size": 2048
},
"version": "v3"
},
"raw_entry": { "...": "..." }
}
Ideal for:
- Log ingestion pipelines
- Data analysis
- Security monitoring
- Threat intelligence
🧠 How it works
- Polls each CT log every few seconds
- Fetches new entries using
/ct/v1/get-entries - Parses X.509 or precert entries
- Extracts SAN domains and certificate metadata
- Streams output continuously to stdout
⚠️ Notes & Limitations
- No persistent state (restarts from near-tip by default)
- CT logs may rate-limit or temporarily fail
- No filtering is applied by default
🤝 Contributing
Contributions are welcome!
- Fork the repository
- Create a feature branch
- Submit a pull request
Please keep changes focused and well-documented.
📜 License
This project is licensed under the MIT License. See the LICENSE file for details.
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 crtstream-0.1.5.tar.gz.
File metadata
- Download URL: crtstream-0.1.5.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7938223f9f23d13688bf49f705d39dd145aebc3ddfb8086abce05cf8194a4755
|
|
| MD5 |
0a7e8524c5d49f4154ca09392fc0511d
|
|
| BLAKE2b-256 |
7f0788b7defa3d8db6b4fcb36536d4b1c5fad2faff481e38d44371aaa39a0a74
|
File details
Details for the file crtstream-0.1.5-py3-none-any.whl.
File metadata
- Download URL: crtstream-0.1.5-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5116f7a91bb1d139fe0f0da3ed74e7a2dadaa12a997a9e7eefca25dca9412cda
|
|
| MD5 |
2d4bd990a5637f5332f0c0533bbad38e
|
|
| BLAKE2b-256 |
c0347716238e640dc2d8f8c1d7dcda2641e4185eec4243d6ffa3dc5103701fc8
|