A comprehensive network security toolkit — SSL/TLS analysis, certificate inspection, vulnerability scanning, and deep HTTP/TLS probing via pycurl.
Project description
CyInfo
A comprehensive Python network security toolkit for SSL/TLS analysis, certificate inspection, vulnerability scanning, and deep HTTP/TLS probing.
Features
🔍 Network Scanner (cyinfo.scanner)
Three-tier scanning with increasing depth:
| Level | Method | What it does |
|---|---|---|
| Basic | basic_scan(target) |
IP resolution, DNS records (A/AAAA/MX/NS/TXT/CNAME/SOA), geolocation, HTTP status, reverse DNS |
| Medium | medium_scan(target) |
SSL certificate details, TLS version, cipher suite, security headers grading, port scan with banner grabbing |
| Advanced | advanced_scan(target) |
SSL handshake breakdown, encryption algorithms, PFS analysis, full certificate chain via pyOpenSSL |
| Full | full_scan(target) |
Runs all three levels |
🔐 Certificate Analyzer (cyinfo.cert_analyzer)
Deep certificate and keystore inspection:
analyze_certificate(path)— Parse any cert format (PEM, DER, CRT, CER, P7B). Extracts: type/usage, subject, issuer, dates, fingerprints (SHA-256/SHA-1/MD5), crypto suite, key usage, SANs, extensions, and more.analyze_keystore(path, password)— Parse PKCS12/PFX and JKS keystores. Extracts private key info, certificate chain, and all cert details.test_ssl_with_private_key(key, cert, port)— Bind a private key to a socket and test all TLS versions with 20-field handshake detail extraction.
🌐 PyCurl Inspector (cyinfo.pycurl_inspector)
Low-level HTTP/TLS analysis using only pycurl — 17 parameters tested:
TLS handshake • Certificate chain & fingerprints • TLS version probing (1.0–1.3) • HTTP response & timing breakdown • HTTP/2 & HTTP/3/QUIC detection • Redirect chain tracing • Compression support • Cookie inspection • Security headers (10 checks) • Server/CDN/WAF fingerprinting • SSH banner & key exchange • Keep-alive behavior
Installation
[!IMPORTANT] Please ensure you are using a 64-bit version of Python. If you attempt to install on 32-bit Python, the installation will be blocked.
pip install cyinfo
With JKS keystore support:
pip install cyinfo[jks]
For development:
pip install cyinfo[dev]
Quick Start
Python API
from cyinfo import basic_scan, medium_scan, advanced_scan
# Level 1 — Basic recon
result = basic_scan("example.com")
print(result['ip_info']['resolved_ip'])
print(result['geolocation']['country'])
# Level 2 — Medium analysis
result = medium_scan("example.com")
print(result['ssl_tls_info']['tls_version'])
print(result['security_headers_analysis']['grade'])
# Level 3 — Advanced SSL deep dive
result = advanced_scan("example.com")
print(result['encryption_details']['key_exchange'])
print(result['forward_secrecy']['supported'])
from cyinfo import analyze_certificate, analyze_keystore
# Analyze any certificate
cert = analyze_certificate("server.crt")
print(cert['certificates'][0]['validity']['days_remaining'])
# Parse a PKCS12 keystore
ks = analyze_keystore("keystore.p12", "password123")
print(ks['private_key_info']['bits'])
from cyinfo import pycurl_deep_inspect
# Full 17-parameter inspection
result = pycurl_deep_inspect("https://example.com")
print(result['4_tls_version_support']['supported_versions'])
print(result['13_security_headers']['grade'])
print(result['15_ssh_info']['banner'])
CLI
# Interactive scanner
cyinfo scan
# Quick commands
cyinfo scan --target example.com --level basic
cyinfo scan --target example.com --level full
cyinfo cert --file server.crt
cyinfo inspect --url https://example.com
Project Structure
cyinfo/
├── pyproject.toml # Package metadata & dependencies
├── README.md
├── LICENSE
├── src/
│ └── cyinfo/
│ ├── __init__.py # Public API exports
│ ├── cli.py # CLI entry point
│ ├── scanner.py # 3-tier network scanner
│ ├── cert_analyzer.py # Certificate & keystore analyzer
│ └── pycurl_inspector.py # PyCurl deep inspector
└── tests/
├── __init__.py
└── test_basic.py
Requirements
- Python 3.9+ (64-bit strictly required)
requests— HTTP requestsdnspython— DNS resolutionpyOpenSSL— Certificate chain analysispycurl— Low-level HTTP/TLS probing
[!WARNING] 64-bit Python Required: Because this toolkit relies on advanced cryptographic libraries (
cryptography,twofish), you must use a 64-bit version of Python. 32-bit Python will fail to install due to missing pre-compiled binaries.
License
MIT License — see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cyinfo-1.0.0.tar.gz.
File metadata
- Download URL: cyinfo-1.0.0.tar.gz
- Upload date:
- Size: 40.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70c7050a1db343aa767d3a703d4523a1d2b5b2c650512bcde0668747a14604cc
|
|
| MD5 |
3d2fa817491345ada51748c26ce106c9
|
|
| BLAKE2b-256 |
5575ea8232c3df04bea4a8c708a5d1898177b912b9f0d4d9ace08a0aebe92ecd
|
File details
Details for the file cyinfo-1.0.0-py3-none-any.whl.
File metadata
- Download URL: cyinfo-1.0.0-py3-none-any.whl
- Upload date:
- Size: 38.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2b158b83f5e6025f2be385f487bec1a50b1a501e8f6fc18372269f00bb0521f
|
|
| MD5 |
b88ebf26eb505f2f05b36de378131343
|
|
| BLAKE2b-256 |
6b7eb058139100a35936cd8006f27bcc9c85cfccb06f61aef0a0c8bd722a336a
|