sniffl is a Certificate Sniffing & Export Tool designed to fetch, inspect, and export TLS certificates from remote servers using multiple protocols including SMTP, IMAP, POP3, or plain TLS connection. It also supports querying Certificate Transparency logs to discover all issued certificates for a domain.
- Supports multiple protocols: SMTP, IMAP, POP3 (with STARTTLS), HTTP, and plain TLS
- Fetches full certificate chains from remote servers
- Certificate Transparency queries: Discover all issued certificates for a domain and subdomains
- Certificate validity checking: Shows which certificates are currently valid or expired
- Export the DNS names found in certificates to a file
- Exports certificates as individual PEM files, standalone bundles, or full bundles including trusted root CAs (System + Mozilla)
- Exports system-trusted certificate authorities from both macOS and Windows stores for root CA inclusion
- Protocol guessing based on common ports if not explicitly specified
- Visual reconnaissance: Capture screenshots of HTTP/HTTPS services
- Multiple input methods: Single URLs, host:port, file lists, or CIDR ranges
Go to the releases page and download a precompiled binary for your operating system and architecture.
Clone the repository and build the binary with Go:
git clone https://github.com/lesydimitri/sniffl.git
cd sniffl
go build -o dist/sniffl ./cmd/snifflNote
To cross-compile sniffl for Windows from other platforms, use:
GOOS=windows GOARCH=amd64 go build -o dist/sniffl.exe ./cmd/snifflsniffl uses a subcommand-based interface. Use --help with any command for details.
Check certificates from live servers using various protocols.
Options:
-f, --file <file>File with targets (host:port [protocol])-p, --protocol <proto>Connection protocol (smtp|imap|pop3|http|none, auto-detected if omitted)-e, --export <mode>Export certificates (single|bundle|full_bundle)--export-dnsExport DNS names toEXPORT_DIR/dns/<timestamp>_<host_or_list>_dns.txt--https-proxy <url>HTTP proxy URL--dry-runShow what would be done without executing
Global Options:
--config <file>Config file (default: $HOME/.sniffl.yaml)-v, --verboseEnable verbose/debug logging
Supported Protocols:
smtp, imap, pop3- Use STARTTLS to upgrade to TLS connectionhttp- Direct TLS connection (HTTPS)none- Direct TLS connection without protocol negotiation
Protocol Auto-Detection:
25/587→ smtp (STARTTLS),143→ imap (STARTTLS),110→ pop3 (STARTTLS)465/993/995→ none (direct TLS),443/8080/8443→ http (HTTPS)
Query Certificate Transparency logs to discover all issued certificates for a domain.
Options:
--show-expiredShow expired certificates in CT results--export-dnsExport discovered DNS names toEXPORT_DIR/dns/<timestamp>_<domain>_dns.txt--dry-runShow what would be done without executing--verboseVerbose output
Manage sniffl configuration files.
Subcommands:
config init [path]Initialize a new configuration fileconfig showShow current configuration valuesconfig exampleDisplay example configuration with all options
Generate Unix man pages and documentation.
Options:
--generateGenerate documentation files instead of showing man page--format <format>Output format when generating: man, markdown, rest (default: man)--output <directory>Output directory for generated files (default: ./man)
Generate shell completion scripts for various shells.
Subcommands:
completion bashGenerate bash completion scriptcompletion zshGenerate zsh completion scriptcompletion fishGenerate fish completion scriptcompletion powershellGenerate PowerShell completion script
Completion Examples:
# Install bash completion
sniffl completion bash > /etc/bash_completion.d/sniffl
# Install zsh completion (for oh-my-zsh)
sniffl completion zsh > ~/.oh-my-zsh/completions/_snifflExamples:
sniffl man # Show main manual page
sniffl man check # Show check command manual
sniffl man --generate # Generate man pages in ./man/
sniffl man --generate --format markdown # Generate markdown documentation
sniffl man --generate --output /usr/local/share/man # Generate in custom locationNotes:
- CT queries show valid certificates by default
- Use
--show-expiredto include expired certificates in results - Discovered domains are automatically filtered to include only relevant subdomains
Capture screenshots of HTTP/HTTPS services for visual reconnaissance.
Options:
-f, --file <file>File with targets (URLs or host:port)--cidr <range>CIDR range to scan (e.g., 192.168.1.0/24)-o, --output-dir <dir>Output directory for screenshots (default: screenshots)-p, --ports <ports>Comma-separated ports for CIDR scan (default: 80,443,8080,8443)-c, --concurrency <n>Concurrent operations (default: 5)--timeout <duration>Screenshot timeout (default: 30s)--ignore-ssl-errorsIgnore SSL certificate errors (default: true)--skip-port-checkSkip initial port connectivity check--chrome-path <path>Path to Chrome/Chromium executable--auto-downloadAuto-download Chromium if not found (default: true)--dry-runShow what would be done without executing
Requirements:
- Chrome or Chromium (auto-downloaded if not found)
Input Methods:
- Single URL:
https://example.com - Host:port:
example.com:8080(auto-detects HTTP/HTTPS) - File: List of URLs or host:port entries
- CIDR: Network range scanning
Scan a single SMTP server and export each certificate separately:
sniffl check smtp.gmail.com:587 --protocol smtp --export singleScan using an IMAP connection and output the full bundle with roots:
sniffl check imap.mail.yahoo.com:143 --protocol imap --export full_bundleScan multiple targets from a file:
sniffl check --file targets.txt --export bundle --export-dnsUse an HTTP proxy:
sniffl check example.com:443 --https-proxy http://proxy.example.com:8080Preview operations with dry-run mode:
sniffl check example.com:443 --export bundle --dry-runUse verbose logging for debugging:
sniffl check example.com:443 --verboseQuery CT logs for a domain:
sniffl ct example.comQuery CT logs with expired certificates and export domains:
sniffl ct github.com --show-expired --export-dnsPreview CT query with dry-run:
sniffl ct example.com --dry-runCapture screenshot of a single website:
sniffl screenshot https://example.comScan a network range for web services:
sniffl screenshot --cidr 192.168.1.0/24Capture screenshots from a file list:
sniffl screenshot --file targets.txt --output-dir ./screenshotsHigh-speed scanning with custom settings:
sniffl screenshot --cidr 10.0.0.0/24 --concurrency 10 --timeout 15sCreate a configuration file with defaults:
sniffl config initCreate config at specific location:
sniffl config init ~/.config/sniffl/config.yamlView current configuration:
sniffl config showSee example configuration:
sniffl config examplesniffl supports YAML configuration files for default settings. Configuration files are loaded from:
--configflag value~/.sniffl.yaml~/.config/sniffl/config.yaml
Example configuration:
# sniffl configuration file
# This file contains default settings for the sniffl certificate tool
# Place this file at ~/.sniffl.yaml or ~/.config/sniffl/config.yaml
verbose: true
timeout: 30s
concurrency: 5
https_proxy: ""
export_mode: bundle
export_dir: .
retry_attempts: 5
retry_delay: 1s
ct_show_expired: false
# Screenshot settings
screenshot_output_dir: "screenshots"
screenshot_timeout: "30s"
screenshot_concurrency: 5
screenshot_ignore_ssl_errors: true
screenshot_auto_download: true
log_level: info
log_format: text
# Output permissions
output_dir_permissions: 700
output_file_permissions: 600When using sniffl check --file <targets.txt>, each line should contain:
host:port [protocol]
Examples:
smtp.gmail.com:587 smtp
imap.gmail.com:993 imap
example.com:443
pop.gmail.com:995 pop3
When using sniffl screenshot --file <targets.txt>, each line should contain:
URL or host:port
Examples:
https://example.com
http://internal.company.com:8080
example.com:443
192.168.1.100:80
sniffl provides structured logging with configurable levels and formats:
- Log Levels: debug, info, warn, error
- Log Formats: text (human-readable), json (structured)
- Context: Automatic context like target host, protocol, operation type
Examples:
# Debug logging with text format
sniffl check example.com:443 --verbose
# JSON logging (configure in ~/.sniffl.yaml)
log_format: json
log_level: debugContributions, issues, and feature requests are welcome! Feel free to check the issues page or open a pull request.
- Brank, for split-certs-online
- AI chatbots, for quick prototyping and taking the blame for any shitty code
