Metadata-Version: 2.0
Name: querycontacts
Version: 1.0.2
Summary: Query network abuse contacts on the command-line for a given ip address on abuse-contacts.abusix.org
Home-page: https://github.com/abusix/querycontacts
Author: abusix
Author-email: fp@abusix.com
License: GNU General Public License v3 (GPLv3)
Project-URL: Source, https://github.com/abusix/querycontacts
Project-URL: Company, https://www.abusix.com/
Description-Content-Type: UNKNOWN
Keywords: contact,query,dns,abuse contact,abuse,abusix,network
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Customer Service
Classifier: Intended Audience :: System Administrators
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Security
Requires-Python: >=2.7
Requires-Dist: dnspython
Requires-Dist: ipaddr

|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']

.. |Build Status| image:: https://img.shields.io/travis/abusix/querycontacts/master.svg
   :target: https://travis-ci.org/abusix/querycontacts
.. |Test Coverage| image:: https://img.shields.io/coveralls/github/abusix/querycontacts/master.svg
   :target: https://coveralls.io/github/abusix/querycontacts
.. |PyPi Version| image:: https://img.shields.io/pypi/v/querycontacts.svg
   :target: https://pypi.python.org/pypi/querycontacts
.. |PyPi License| image:: https://img.shields.io/pypi/l/querycontacts.svg
   :target: https://pypi.python.org/pypi/querycontacts
.. |PyPi Versions| image:: https://img.shields.io/pypi/pyversions/querycontacts.svg
   :target: https://pypi.python.org/pypi/querycontacts
.. |PyPi Wheel| image:: https://img.shields.io/pypi/wheel/querycontacts.svg
   :target: https://pypi.python.org/pypi/querycontacts


