Skip to main content

dnsdb-python

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

Metadata

Release files for dnsdb-python 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dnsdb-python 1.0.0
File Size Uploaded Provenance Actions
dnsdb-python-1.0.0.tar.gz 8.4 kB Without provenance Details for dnsdb-python-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dnsdb-python 1.0.0
File Interpreter ABI Platform Actions
dnsdb_python-1.0.0-py3-none-any.whl Python 3 none any Details for dnsdb_python-1.0.0-py3-none-any.whl

Total release size: 19.9 kB

Release files / dnsdb-python-1.0.0.tar.gz

Download URL dnsdb-python-1.0.0.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
783455fd1a32b1ef68bd5cfd01fb7148058e5abca41e3bc8cef36c3545c1d50e
BLAKE2b-256 checksum
How to use checksums
e05ce6c8b6d422579705b2e56c822f4be5ea64beaeb2d622ad4d12f408235f2a
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / dnsdb_python-1.0.0-py3-none-any.whl

Download URL dnsdb_python-1.0.0-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
545a186d88043fd7227bf00681abe0fc8a1b3e839bb5cf1b50e13226b6bec755
BLAKE2b-256 checksum
How to use checksums
0a55ae595ce5bf33f66634a434afe116ca7db13b5bdcd8e1d9212f8c93afcba2
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for dnsdb-python 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page