Skip to main content

Certificate Transparency log streamer

Project description

crtstream

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 can output:

  • domain names only
  • human-readable summaries
  • full structured JSON suitable for pipelines and storage

✨ 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 for SIEM / data pipelines
  • ⚙️ Simple configuration via logs.json

📦 Installation

From PyPI (recommended)

pip install crtstream

Or with pipx:

pipx install crtstream

From source (development)

git clone https://github.com/yourname/crtstream.git
cd crtstream
pip install -e .

⚙️ Configuration

crtstream reads CT log endpoints from a local JSON file.

logs.json (default)

Create a file named logs.json in the directory where you run crtstream:

{
  "google_us": "https://ct.googleapis.com/logs/us1/argon2025h2",
  "google_eu": "https://ct.googleapis.com/logs/eu1/xenon2025h2",
  "cloudflare": "https://ct.cloudflare.com/logs/nimbus2025",
  "digicert_yeti": "https://yeti2025.ct.digicert.com/log"
}

You may also specify a custom file:

crtstream --logs /path/to/logs.json

🚀 Usage

Basic usage

crtstream

Print only domains

crtstream --domains-only

Output full JSON (one object per line)

crtstream --json

Custom logs file

crtstream --logs logs.json --json

🧾 JSON Output Format

When using --json, each line is a JSON object:

{
  "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": { "...": "..." }
}

This format is ideal for:

  • log ingestion
  • data analysis
  • security monitoring
  • threat intelligence pipelines

🧠 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 metadata
  • Streams output continuously

⚠️ Notes & Limitations

  • This tool does not persist state (restarts from near-tip)
  • CT logs may rate-limit or temporarily fail
  • No filtering is applied by default

🤝 Contributing

Contributions are welcome.

  1. Fork the repository
  2. Create a feature branch
  3. 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

crtstream-0.1.2.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

crtstream-0.1.2-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file crtstream-0.1.2.tar.gz.

File metadata

  • Download URL: crtstream-0.1.2.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for crtstream-0.1.2.tar.gz
Algorithm Hash digest
SHA256 eeee2aa4d59afc9bb8faddcbdcb07b52ec29fa66e594d915f5c2919438624e42
MD5 b1a2b96db21f51727cd2f8bb4defd351
BLAKE2b-256 b1653183a4f9317100c69ced45cd1162b8d0c9758dfd5342dd706b446513964f

See more details on using hashes here.

File details

Details for the file crtstream-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: crtstream-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for crtstream-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 efb526ba03277422c52d40a5fde56de669c478e4282272441fcc360ec32775a6
MD5 df07f059bbde7f29615223ce46934af6
BLAKE2b-256 b9b6f6061b5853bd1dcb01145340e1061e04bb797dba447b4d7c14714445dca1

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