{"id":17212304,"url":"https://github.com/kung-foo/certgrep","last_synced_at":"2025-08-03T19:36:36.238Z","repository":{"id":29765874,"uuid":"33309746","full_name":"kung-foo/certgrep","owner":"kung-foo","description":"certgrep is a cross-platform command line tool that extracts SSL certificates from either a network interface or a local PCAP file.","archived":false,"fork":false,"pushed_at":"2021-11-12T14:40:18.000Z","size":3358,"stargazers_count":17,"open_issues_count":1,"forks_count":5,"subscribers_count":5,"default_branch":"develop","last_synced_at":"2024-06-19T01:58:06.588Z","etag":null,"topics":["go","pcap","ssl","x509"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kung-foo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-02T13:17:19.000Z","updated_at":"2022-11-21T06:13:11.000Z","dependencies_parsed_at":"2022-08-28T10:20:07.889Z","dependency_job_id":null,"html_url":"https://github.com/kung-foo/certgrep","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kung-foo%2Fcertgrep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kung-foo%2Fcertgrep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kung-foo%2Fcertgrep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kung-foo%2Fcertgrep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kung-foo","download_url":"https://codeload.github.com/kung-foo/certgrep/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219845374,"owners_count":16556445,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","pcap","ssl","x509"],"created_at":"2024-10-15T02:59:45.257Z","updated_at":"2024-10-15T02:59:45.915Z","avatar_url":"https://github.com/kung-foo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"certgrep\n========\n\n[![AppVeyor](https://img.shields.io/appveyor/ci/kung-foo/certgrep.svg?logo=appveyor\u0026style=for-the-badge)](https://ci.appveyor.com/project/kung-foo/certgrep)\n\n**certgrep** is a cross-platform command line tool that extracts TLS/SSL certificates from either a network interface or a local PCAP file. The certificates are saved in either JSON, DER and/or PEM format.\n\nUtilizes [google/gopacket] (https://github.com/google/gopacket)\n\nUsage\n-----\n\n```\nUsage:\n    certgrep [options] [-v ...] [--format=\u003cformat\u003e ...] (-p=\u003cpcap\u003e | -i=\u003cinterface\u003e)\n    certgrep [options] [-v ...] -l | --list\n    certgrep -h | --help | --version\n\nOptions:\n    -h --help               Show this screen.\n    --version               Show version.\n    -l --list               List available interfaces\n    -p --pcap=\u003cpcap\u003e        PCAP file to parse\n    -i --interface=\u003ciface\u003e  Network interface to listen on\n    -o --output=\u003coutput\u003e    Resource output directory [default: certs]\n    --log-to-stdout         Write certificate log to stdout\n    -f --format=\u003cformat\u003e    Certificate output format (json|der|pem) [default: pem]\n    -b --bpf=\u003cbpf\u003e          Capture filter (BPF) [default: tcp]\n    --no-color              Disabled colored output\n    -v                      Enable verbose logging (-vv for very verbose)\n    --profile\n    --assembly-memuse-log\n    --assembly-debug-log\n    --dump-metrics\n    --dump-packets\n```\n\nExample\n-------\n\n```\n$ sudo ./dist/certgrep-linux-amd64 -i wlp58s0 --format pem --format json --log-to-stdout\n2018-08-17T10:11:14.340+0200\tINFO\tcertgrep\tcertgrep/extractor.go:86\tsetting output dir to: certs/2018-08-17T08_11_14Z\n2018-08-17T08:11:15Z flowidx:9 flowhash:f1a0fb33d0ef19ba client:192.168.5.14 server:192.30.253.113 port:443 cert:0 cn:\"github.com\" fingerprint:ca06f56b258b7a0d4f2b05470939478651151984 serial:13324412563135569597699362973539517727\n2018-08-17T08:11:15Z flowidx:9 flowhash:f1a0fb33d0ef19ba client:192.168.5.14 server:192.30.253.113 port:443 cert:1 cn:\"DigiCert SHA2 Extended Validation Server CA\" fingerprint:7e2f3a4f8fe8fa8a5730aeca029696637e986f3f serial:16582437038678467094619379592629788035\n^C\n2018-08-17T10:11:17.749+0200\tINFO\tcertgrep\tcertgrep/extractor.go:168\tcapture time: 3 seconds\n2018-08-17T10:11:17.749+0200\tINFO\tcertgrep\tcertgrep/extractor.go:169\tcapture size: 22508 bytes\n2018-08-17T10:11:17.749+0200\tINFO\tcertgrep\tcertgrep/extractor.go:173\taverage capture rate: 64.256 Kbit/s\n2018-08-17T10:11:17.749+0200\tINFO\tcertgrep\tcertgrep/extractor.go:179\tpps: 18\n```\n\nA request to `https://github.com` generates two certificates in the output folder `./certs/2018-08-17T08_11_14Z`.\n\n```\n$ tree certs/2018-08-17T08_11_14Z\ncerts/2018-08-17T08_11_14Z\n├── 7e2f3a4f8fe8fa8a5730aeca029696637e986f3f\n│   ├── cert.json\n│   └── cert.pem\n└── ca06f56b258b7a0d4f2b05470939478651151984\n    ├── cert.json\n    └── cert.pem\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkung-foo%2Fcertgrep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkung-foo%2Fcertgrep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkung-foo%2Fcertgrep/lists"}