Catalog PyPI
PACKAGE EXPLORERView in registry

abuse-whois

PyPI

Find where to report a domain for abuse

Versions collected1
Direct dependencies16From release 0.10.2
Last observed20 Oct, 17:46 UTC

README

Version 0.10.2 documentation

abuse_whois

PyPI version Python CI Coverage Status

A Sigma and RDAP/Whois based abuse contacts finder.

img

This tool is highly inspired from the following libraries:

How It Works

  • Query a given address via RDAP (fallback to Whois is if RDAP fails)
  • Check a query result with Sigma rules and find contacts (fallback to regex if there is no match)

Requirements

  • Python 3.10+

Installation

pip install abuse_whois

# or if you want to use built-in REST API
pip install abuse_whois[api]

Usage

As a library

from abuse_whois import get_abuse_contacts

await get_abuse_contacts("1.1.1.1")
await get_abuse_contacts("github.com")
await get_abuse_contacts("https://github.com")
await get_abuse_contacts("foo@example.com")

As a CLI tool

abuse_whois 1.1.1.1
abuse_whois example.com
abuse_whois foo@example.com
abuse_whois http://example.com

As a REST API

$ uvicorn abuse_whois.api.main:app
INFO:     Started server process [2283]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)

$ http localhost:8000/api/whois/ address=https://github.com

With Docker

git clone https://github.com/ninoseki/abuse_whois
cd abuse_whois
docker build . -t abuse-whois
docker run -i -d -p 8000:8000 abuse-whois

Settings

All settings can be done via environment variables or .env file.

NameTypeDefaultDesc.
QUERY_TIMEOUTint10Timeout value for whois lookup (seconds)
QUERY_CACHE_SIZEint1024Cache size for whois lookup
QUERY_CACHE_TTLint3600Cache TTL value for whois lookup (seconds)
QUERY_MAX_RETRIESint3Max retries on timeout error
ADDITIONAL_WHOIS_RULE_DIRECTORYstrAdditional contains contain whois rule files
ADDITIONAL_SHARED_HOSTING_RULE_DIRECTORYstrAdditional directory contains shared hosting rule files

Contributions

abuse_whois works based on a combination of static rules and a parsing result of whois response.

Please submit a PR (or submit a feature request) if you find something missing.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.10.225 Jan 202516

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
ninoseki/abuse_whois

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:46 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:7a5e32c55967e800563a1964d339ffaf3844e308a8a9cd9fe1c0d9468f5b83af