A Python tool to check an IP address against popular IP and DNS blacklists for threat intelligence.
- Async/Parallel Checks: Fast parallel DNS and HTTP lookups
- DNS-based Blacklists (DNSBLs): Checks against 15+ reliable DNSBLs including Spamhaus, SpamCop, Barracuda, and more
- HTTP Threat Feeds: Queries multiple threat intelligence feeds including Emerging Threats, Abuse.ch, Blocklist.de, and more
- GeoIP Lookup: Shows geographic information for the IP
- TOR Exit Node Detection: Identifies if an IP is a TOR exit node
- Multiple Output Formats: Table, JSON, and CSV output
- Batch Processing: Check multiple IPs from a file
- Modern CLI: Beautiful terminal output with progress bars and color-coded results
- Threat Level Scoring: Automatic threat level classification (Clean, Low, Medium, High, Critical)
pip install -r requirements.txt
pip install -e .pip install -r requirements-dev.txt
pip install -e .# Check a single IP
isthisipbad check 8.8.8.8
# Interactive mode (detects your public IP)
isthisipbad check
# Show all results including clean
isthisipbad check 8.8.8.8 --show-clean# JSON output
isthisipbad check 8.8.8.8 --format json
# Save to JSON file
isthisipbad check 8.8.8.8 --output results.json
# CSV output
isthisipbad check 8.8.8.8 --format csv --output results.csv# Check multiple IPs from a file
isthisipbad check --file ips.txt
# With output
isthisipbad check --file ips.txt --output results.jsonThe input file should have one IP per line. Lines starting with # are treated as comments.
# Show version
isthisipbad version
# List all threat intelligence sources
isthisipbad sources
# Get help
isthisipbad --help
isthisipbad check --help| Option | Description |
|---|---|
--file, -f |
File containing IPs to check |
--output, -o |
Output file (.json or .csv) |
--format |
Output format: table, json, csv |
--show-clean, -a |
Show clean (not listed) results |
--timeout, -t |
HTTP timeout in seconds (default: 10) |
--dns-timeout |
DNS timeout in seconds (default: 5) |
--no-info |
Skip FQDN and GeoIP lookup |
--quiet, -q |
Minimal output |
0: Clean or Low threat level1: Medium threat level2: High or Critical threat level
The original isthisipbad.py script is still available for backward compatibility:
python3 isthisipbad.py -i 8.8.8.8 --success- Spamhaus (ZEN, SBL, XBL, PBL)
- SpamCop
- Barracuda
- SORBS
- UCEPROTECT
- DroneRL
- Mailspike
- And more...
- Emerging Threats (Proofpoint)
- Blocklist.de
- Abuse.ch (Feodo Tracker, SSL Blacklist)
- CI Army
- IPsum
- Spamhaus DROP
- TOR Exit Nodes
- Python 3.8+
- httpx
- dnspython
- typer
- rich
# Run tests
pytest
# Run with coverage
pytest --cov=isthisipbadYou can also use isthisipbad as a library:
import asyncio
from isthisipbad import IPChecker
async def main():
async with IPChecker() as checker:
report = await checker.check_ip("8.8.8.8")
print(f"Threat Level: {report.threat_level.value}")
print(f"Blacklisted: {report.blacklist_count}/{report.total_checks}")
asyncio.run(main())Or synchronously:
from isthisipbad import IPChecker
checker = IPChecker()
report = checker.check_ip_sync("8.8.8.8")
print(report.to_dict())Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - See license file for details.
This tool is for informational purposes only. Results should be used as one data point in your security analysis, not as the sole basis for blocking decisions. Some blacklists may have false positives.