Skip to main content

An unofficial Farsight Security DNSDB client

Project description

A full-featured unofficial Python client and CLI for Farsight Security’s DNSDB passive DNS service.

Usage: dnsdb [OPTIONS] COMMAND [ARGS]...

  An unofficial Farsight Security DNSDB client

Options:
  --version  Show the version and exit.
  --verbose  Enable verbose logging.
  --help     Show this message and exit.

Commands:
  forward  Forward DNS lookup.
  inverse  Inverse DNS lookup.
  quotas   Show the API quotas for your API key and exit.
Usage: dnsdb forward [OPTIONS] OWNER_NAME

  Forward DNS lookup.

Options:
  -t, --rrtype TEXT               Filter results by DNS resource record type.
                                  [default: ANY]
  -b, --bailiwick TEXT            Filter results by DNS bailiwick.
  --first-seen-before TEXT        Only show results first seen before this
                                  date.
  --first-seen-after TEXT         Only show results first seen after this
                                  date.
  --first-seen-before TEXT        Only show results first seen before this
                                  date.
  --first-seen-after TEXT         Only show results first seen after this
                                  date.
  --last-seen-before TEXT         Only show results last seen before this
                                  date.
  --last-seen-after TEXT          Only show results last seen after this date.
  -l, --limit INTEGER             Limit the number of results to this number.
  -j, --json                      Output in JSON format.
  -s, --sort [count|time_first|time_last|rrname|rrtype|bailiwick|rdata|source]
                                  Sort JSON results by this field.
  -r, --reverse                   Reverse the sorting.
  --help                          Show this message and exit.
Usage: dnsdb inverse [OPTIONS] [name|ip|raw] VALUE

  Inverse DNS lookup.

Options:
  -t, --rrtype TEXT               Filter results by DNS resource record type.
                                  [default: ANY]
  --first-seen-before TEXT        Only show results first seen before this
                                  date.
  --first-seen-after TEXT         Only show results first seen after this
                                  date.
  --first-seen-before TEXT        Only show results first seen before this
                                  date.
  --first-seen-after TEXT         Only show results first seen after this
                                  date.
  --last-seen-before TEXT         Only show results last seen before this
                                  date.
  --last-seen-after TEXT          Only show results last seen after this date.
  -l, --limit INTEGER             Limit the number of results to this number.
  -j, --json                      Output in JSON format.
  -s, --sort [count|time_first|time_last|rrname|rrtype|bailiwick|rdata|source]
                                  Sort JSON results by this field.
  -r, --reverse                   Reverse the sorting.
  --help                          Show this message and exit.

Features

  • Easy to use Python class covers all DNSDB API endpoints and options

  • Supports hosted and self-hosted instances of DNSDB

  • Full CLI

  • Python 2 and 3 support

  • Parses multiple human date formats for time filtering

  • Output in text (DNS master file format)

  • JSON output
    • Outputs results as a pretty printed JSON list

    • Sort output by any JSON field

    • Automatically converts UNIX epoch timestamps to ISO 8601 timestamps

    • Normalize timestamp fields for sensor and zone file observations

Installation

To install the latest stable version, run

sudo -H pip3 install -U dnsdb-python

To install the latest development version, run

sudo -H pip3 install -U git+https://github.com/domainaware/dnsdb-python.git

Store your API key as an environment variable named DNSDB_KEY.

If you are using a self-hosted instance of DNSDB, store the URL toot as an environment variable named DNSDB_ROOT.

See also

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

dnsdb-python-1.0.1.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

dnsdb_python-1.0.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file dnsdb-python-1.0.1.tar.gz.

File metadata

  • Download URL: dnsdb-python-1.0.1.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.0 CPython/3.7.3rc1

File hashes

Hashes for dnsdb-python-1.0.1.tar.gz
Algorithm Hash digest
SHA256 7000ca966ec2a0b214b566f3b061e7516299d4db5a6801b5661c514ea384ddb2
MD5 656b234c90ca21eee68c5a11760d9d8a
BLAKE2b-256 43ea717fa93798b7edd33bc1a11c6e34509e6298b3b0cafb9a05ca91aab98647

See more details on using hashes here.

File details

Details for the file dnsdb_python-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: dnsdb_python-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.0 CPython/3.7.3rc1

File hashes

Hashes for dnsdb_python-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c12db9cc141a526687de7111e6e8ebd81b0e837ab3c5e90762176ed74aedc751
MD5 4f4099abd962693cfd7a5a27818519c7
BLAKE2b-256 d434047e2fbcbb71b376e4bb307ff9d48b00496923c8f3639ccdda9c8a75f9b6

See more details on using hashes here.

Supported by

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