Skip to main content

Query network abuse contacts on the command-line for a given ip address on abuse-contacts.abusix.org

Project description

Build Status Test Coverage PyPi Version PyPi License PyPi Versions PyPi Wheel

querycontacts - Query Abuse Contacts

ahocorapy is a pure python implementation of the Aho-Corasick Algorithm. Given a list of keywords one can check if at least one of the keywords exist in a given text in linear time.

Installation

pip install querycontacts

Command line usage

usage: querycontacts [-h] [--provider PROVIDER] [--version] ip

QueryContact - Find the Abuse contact for a IP address

positional arguments:
ip                   query network abuse contacts for a given ip address

optional arguments:
-h, --help           show this help message and exit
--provider PROVIDER  change standard network abuse contacts provider.
                    Defaults to abuse-contacts.abusix.org
--version            show program's version number and exit

Examples

Show version:

$ querycontacts --version
querycontacts 1.0.0

Show abuse contact for your IP:

$ IP=$(curl ipecho.net/plain)
$ querycontacts $IP
abuse@yourisp.example.com

Error when no abuse contact was found:

$ querycontacts 127.0.0.1
querycontacts: error: no contacts for 127.0.0.1

Library usage

>>> from querycontacts import ContactFinder
>>> qf = ContactFinder()
>>> qf.find('127.0.0.2')
['root@localhost', 'abuse@localhost']

>>> qf.find('::ffff:7f00:2')
['root@localhost']

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

querycontacts-1.0.2.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

querycontacts-1.0.2-py2.py3-none-any.whl (18.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file querycontacts-1.0.2.tar.gz.

File metadata

File hashes

Hashes for querycontacts-1.0.2.tar.gz
Algorithm Hash digest
SHA256 94f46e3f45c832efa410a9ff556ac95bb7ba692c4bd5628517d1e293f91826aa
MD5 ceb60ab486256dd405cf8e864de07ad2
BLAKE2b-256 8ffb612b47baf116270aefbaf598fedd556bd2f6a7af90f464b0d08bff9ad8d2

See more details on using hashes here.

File details

Details for the file querycontacts-1.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for querycontacts-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ed35cbb28b8b151b1b273b30b15ea832f1f91952b0c2e83a70b70b1413404de5
MD5 694c80475f740079fe84043120698d12
BLAKE2b-256 10df491aaf7697a416179e05f76871f6cc4fd97fcd77b15bc03b61215c498c1d

See more details on using hashes here.

Supported by

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