Olaverse-Labs/SSL-Checker-API

GitHub: Olaverse-Labs/SSL-Checker-API

一个基于 FastAPI 的 SSL 证书检测 REST API,支持批量查询域名的证书详情与协议密码套件信息。

Stars: 0 | Forks: 0

# SSL Checker API [![Olaverse API](https://img.shields.io/badge/Olaverse-API%20Doc-blue?style=flat-square)](https://www.olaverse.co.uk/ssl-checker-api) [![在 Vibeland 上体验](https://img.shields.io/badge/Vibeland-Try%20Live-orange?style=flat-square)](https://www.vibeland.co.uk/tools/ssl-checker) 一个基于 FastAPI 的 Web API,用于检查一个或多个域名的 SSL 证书详细信息,完全使用 Python 从头构建。 ## 功能 - 检查任意域名的 SSL 证书详细信息 - 返回颁发者、有效期、SHA1、序列号、算法等信息 - 返回主体备用名称、公钥信息、签名 OID、完整的颁发者/主体信息、自签名状态、所有扩展、密码套件、会话重用情况等 - 支持在单个请求中处理多个域名 - 简单的 REST API - Docker 化,方便部署 - 健康检查端点 ## 环境要求 - Python 3.11+ - 或 Docker ## 安装说明 (Python) 1. 克隆代码库并进入项目目录。 2. 安装依赖: pip install -r requirements.txt 3. 运行 API: uvicorn main:app --reload ## 安装说明 (Docker) 1. 构建 Docker 镜像: docker build -t ssl-checker-api . 2. 运行容器: docker run -p 8000:8000 ssl-checker-api ## API 用法 ### 端点 - `POST /check-ssl` ### 请求体 发送一个包含 URL 列表的 JSON 对象: ``` { "urls": ["https://example.com", "https://google.com"] } ``` ### 使用 curl 的示例 ``` curl -X POST "http://localhost:8000/check-ssl" \ -H "Content-Type: application/json" \ -d '{"urls": ["https://example.com", "https://google.com"]}' ``` ### 响应 返回每个域名的证书详细信息,例如: ``` { "version": "1.0", "response_time_sec": null, "status": "ok", "results": [ { "host": "example.com", "status": "ok", "result": { "host": "example.com", "resolved_ip": "93.184.216.34", "issued_to": "example.com", "issuer_c": "US", "issuer_o": "Let's Encrypt", "cert_sn": "0x123456...", "cert_sha1": "abcdef...", "cert_alg": "sha256", "cert_exp": false, "cert_valid": true, "valid_from": "May 1 00:00:00 2024 GMT", "valid_till": "Jul 30 23:59:59 2024 GMT", "validity_days": 90, "days_left": 60, "version": "TLSv1.3", "subject_alt_names": ["example.com", "www.example.com"], "public_key_algorithm": "RSAPublicKey", "public_key_size": 2048, "signature_algorithm_oid": "1.2.840.113549.1.1.11", "issuer_full": "CN=R3,O=Let's Encrypt,C=US", "subject_full": "CN=example.com", "is_self_signed": false, "extensions": { "subjectAltName": "<...>", "basicConstraints": "<...>", "keyUsage": "<...>" }, "cipher": ["TLS_AES_256_GCM_SHA384", "TLSv1.3", 256], "session_reused": false } }, ... ] } ``` ### 健康检查端点 - `GET /health` 返回: ``` {"status": "ok"} ``` ## 许可证 MIT
标签:AV绕过, Docker, FastAPI, Python, SSL/TLS证书, Web API, 安全防御评估, 无后门, 网络工具, 请求拦截, 运维监控, 逆向工具