[](https://travis-ci.org/abusix/querycontacts)
[](https://coveralls.io/github/abusix/querycontacts)
[](https://pypi.python.org/pypi/querycontacts)
[](https://pypi.python.org/pypi/querycontacts)
[](https://pypi.python.org/pypi/querycontacts)
[](https://pypi.python.org/pypi/querycontacts)
# 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']
```
[](https://coveralls.io/github/abusix/querycontacts)
[](https://pypi.python.org/pypi/querycontacts)
[](https://pypi.python.org/pypi/querycontacts)
[](https://pypi.python.org/pypi/querycontacts)
[](https://pypi.python.org/pypi/querycontacts)
# 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']
```
Metadata
Release files for querycontacts 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| querycontacts-1.0.0.tar.gz | 15.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| querycontacts-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.6 kB
Release files / querycontacts-1.0.0.tar.gz
| Download URL | querycontacts-1.0.0.tar.gz |
|---|---|
| Size | 15.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
241cdeb40952ae1877dad3c4f4a09cdc491f161750d2843a8b1c5391fd2a6e3e
|
|
BLAKE2b-256 checksum How to use checksums |
41ff9a53410517fe7cae5767aec4a04eddb2c0f907c66df6c8164ebdc6f04c17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / querycontacts-1.0.0-py3-none-any.whl
| Download URL | querycontacts-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a8c98b14cddd2c9cedd3763c9a3db20210a1ec2201cca61a2dd2895edd2445b6
|
|
BLAKE2b-256 checksum How to use checksums |
fe0eaecedba03d7a0573717004d4f1fded5f30269b6b094e8f9c323d33b38d22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |