A Python CLI tool that reads file hashes from a text file and checks their reputation using the Kaspersky Threat Intelligence Portal (OpenTIP) API.
The tool is designed for SOC analysts, incident responders, malware analysts, and penetration testers who need to enrich large hash datasets safely and reliably.
-
Hash reputation lookup via Kaspersky OpenTIP API
-
Supports SHA-256, SHA-1, and MD5
-
Automatic rate-limit handling (HTTP 429 backoff)
-
Timeout protection (skips slow requests)
-
Resume capability using cache
-
CSV report generation
-
Emoji-based CLI output for quick triage
-
Works on Linux, macOS, and Windows
-
No external dependencies beyond requests
[1/5] e3b0c44298fc1c149afbf4c8996fb924 -> 🟢 SAFE (🟢 Green)
[2/5] 44d88612fea8a8f36de82e1278abb02f -> 🔴 MALICIOUS (🔴 Red)
[3/5] 098f6bcd4621d373cade4e832627b4f6 -> ⚪ UNKNOWN (⚪ Grey)
[4/5] 5d41402abc4b2a76b9719d911017c592 -> 🟡 SUSPICIOUS (🟡 Yellow)
[5/5] d41d8cd98f00b204e9800998ecf8427e -> 🟣 TIMEOUT
git clone https://github.com/0x9Fahad/KChecker
cd KChecker
pip install requests
You need a Kaspersky OpenTIP API key.
export KASPERSKY_API_KEY="YOUR_API_KEY"
setx KASPERSKY_API_KEY "YOUR_API_KEY"
Basic run:
python3 KChecker.py -i hashes.txt
Specify output file
python3 KChecker.py -i hashes.txt -o results.csv
Limit number of hashes (testing)
python3 KChecker.py -i hashes.txt --max 10
Adjust timeout
python3 KChecker.py -i hashes.txt --read-timeout 120
Adjust rate-limit pacing
python3 KChecker.py -i hashes.txt --sleep 1
Disable emojis
python3 KChecker.py -i hashes.txt --no-emoji
hashes.txt should contain one hash per line:
e3b0c44298fc1c149afbf4c8996fb924
44d88612fea8a8f36de82e1278abb02f
098f6bcd4621d373cade4e832627b4f6
Empty lines and comments (#) are ignored.
After execution, the tool creates:
kaspersky_results.csv
kaspersky_cache.json
-
CSV columns
-
hash
-
verdict
-
zone
-
http_status
-
parse_note
-
error
-
kaspersky_portal
The tool uses the OpenTIP Zone field:
Zone Verdict
Green SAFE
Yellow SUSPICIOUS
Red MALICIOUS
Grey UNKNOWN
Cache Behavior
kaspersky_cache.json
-
Safe interruption
-
Resume without re-querying
-
Reduced API usage
-
To start fresh:
-
rm kaspersky_cache.json
-
Rate Limiting
-
The script automatically:
-
Retries HTTP 429 responses
-
Uses exponential backoff
-
Skips hashes that exceed timeout
--sleep 1 --read-timeout 120
-
Prefer SHA-256 hashes
-
Use --max for testing
-
Keep cache enabled for large datasets
-
Stop the run if you see repeated rate-limit errors