Python client for Sniffcat API.
Project description
sniffcat
Python client for the SniffCat IP reputation and abuse reporting API.
Features
- Fetch blacklist of suspicious IPs
- Check reputation and abuse score for any IP
- View reports about IP activity
- Report suspicious IPs (e.g., for port scanning, spam, malware, etc.)
Installation
pip install sniffcat
Usage
from sniffcat import SniffCatClient
# Initialize the client with your API token
client = SniffCatClient("your_api_token")
# Example 1: Get blacklist with default confidence
blacklist = client.get_blacklist()
print("Blacklist:", blacklist)
# Example 2: Get blacklist with custom confidence
blacklist_80 = client.get_blacklist(confidence_min=80)
print("Blacklist (confidence >= 80):", blacklist_80)
# Example 3: Check reputation and abuse score for an IP
ip_info = client.check_ip("1.1.1.1")
print("IP info:", ip_info)
# Example 4: Get reports for an IP
reports = client.get_ip_reports("1.1.1.1")
print("IP reports:", reports)
# Example 5: Report an IP for port scanning with default comment
result = client.report_ip_port_scan("1.1.1.1")
print("Report result:", result)
# Example 6: Report an IP for port scanning with custom comment
result_custom = client.report_ip_port_scan("1.1.1.1", comment="Suspicious port scan detected from this IP")
print("Custom report result:", result_custom)
# Example 7: Report IP as spam (category 2) and malware (category 3)
result_multi = client.report_ip("1.2.3.4", [2, 3], comment="Spam and malware activity detected")
print("Multi-category report result:", result_multi)
Categories
See all available categories at https://sniffcat.com/documentation/categories
API Documentation
See full API docs at https://sniffcat.com/documentation/api
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sniffcat-0.1.6.tar.gz
(2.8 kB
view details)
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 sniffcat-0.1.6.tar.gz.
File metadata
- Download URL: sniffcat-0.1.6.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
338ebe6cb3ddd55e1429a7b4727d31d79e5769df4eb4730e88f7f8df3488be1c
|
|
| MD5 |
e9c45aae67ceb0d47938d626aa60d58b
|
|
| BLAKE2b-256 |
c0f9f8a58b4c07e831f40343c2b71b2e0b9be1d7ed5e4088fc1dac3eaca91da6
|
File details
Details for the file sniffcat-0.1.6-py3-none-any.whl.
File metadata
- Download URL: sniffcat-0.1.6-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8354392eec3091372b4471b5a8b769c8a5c8df74bad9768a7086a85ac631b0c
|
|
| MD5 |
dd622707fb4cd1dfcaca9040208e10e0
|
|
| BLAKE2b-256 |
30a818ec3a1559aa293f0e9b4bdf8e9a9d92b77bc4fc4be0224d3845f2f77a13
|