Skip to main content

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.7.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sniffcat-0.1.7-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file sniffcat-0.1.7.tar.gz.

File metadata

  • Download URL: sniffcat-0.1.7.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sniffcat-0.1.7.tar.gz
Algorithm Hash digest
SHA256 33aa0d69c29b52dcab799213afbe8cd4de75546f1e8b576c4118e34c0de76894
MD5 d25e49e5636a1f9b4379fed19df3cff9
BLAKE2b-256 23a0efd603c27c95128d53da0257de656d0257d5a7d447be0d6b9a6a34eafa72

See more details on using hashes here.

File details

Details for the file sniffcat-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: sniffcat-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sniffcat-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3fe4c55e1b930448b3cf14218d6532c4d8c39d6e10c70f2e7ae66890e3c0d736
MD5 f5c7bbe1bdb5ee33b0c02062dbf3f21b
BLAKE2b-256 037ad64af8d542ec8a583b69276976601220604b42d4bcd265b1be4c245f7cfc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page