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.1.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.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: crtstream-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 1065433a36302b28a93d6366c0f9a9cfea4561b04e7e80a7aab08f3c5251a390
MD5 24e88b7ff254466c328decb899180121
BLAKE2b-256 ba82e5efa287233ca9c3d36c6a10b637b454cee9672ec70b5c982fd8013ded75

See more details on using hashes here.

File details

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

File metadata

  • Download URL: crtstream-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 22f5ec1461975a218292003bffa9adc71bac7fafc4aa4d4fbc23c808dcc39988
MD5 7ed770d14732dab71e1c97e32fa0517b
BLAKE2b-256 a9bf4412daa1567ae75ceefee7b3c38f10cb54bfa3ae1a054d68f5940c2d0622

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