跳转到主要内容

为Farsight Security的DNSDB被动DNS服务提供全功能的非官方Python客户端和CLI

项目描述

Farsight Security的DNSDB被动DNS服务提供全功能的非官方Python客户端和CLI。

特性

  • 易于使用的Python类涵盖所有DNSDB API端点和选项

  • 支持DNSDB的托管和自托管实例

  • 完整的CLI

  • 支持Python 2和3

  • 解析多个人类日期格式进行时间过滤

    • 7天

    • 7d

    • 2019-05-20

    • 1个月

    • 1m

  • 自动将UNIX纪元时间戳转换为ISO 8601时间戳

  • 标准化传感器和区域文件观察的时间戳字段

  • 按任何字段排序

  • 多种输出格式

    • 文本(DNS主文件格式)

    • CSV

    • JSON

CLI

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.
  --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.
  -s, --sort [count|first_seen|last_seen|rrname|rrtype|bailiwick|rdata|source]
                                  Sort JSON results by this field.
  -r, --reverse                   Reverse the sorting.
  -f, --format [text|json|csv]    Set the screen output format.  [default:
                                  text]
  -o, --output FILE               One or more output file paths that end in
                                  .csv, .json,  or .txt (suppresses screen
                                  output).
  --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.
  --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.
  -s, --sort [count|first_seen|last_seen|rrname|rrtype|bailiwick|rdata|source]
                                  Sort JSON results by this field.
  -r, --reverse                   Reverse the sorting.
  -f, --format [text|json|csv]    Set the screen output format.  [default:
                                  text]
  -o, --output FILE               One or more output file paths that end in
                                  .csv, .json,  or .txt (suppresses screen
                                  output).
  --help                          Show this message and exit.

安装

要安装最新稳定版本,运行

sudo -H pip3 install -U dnsdb-python

要安装最新开发版本,运行

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

将您的API密钥存储为名为DNSDB_KEY的环境变量。

如果您正在使用DNSDB的自托管实例,将URL根存储为名为DNSDB_ROOT的环境变量。

另请参阅

项目详情


下载文件

下载您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源分布

dnsdb-python-1.2.4.tar.gz (10.2 kB 查看哈希)

上传时间

构建分布

dnsdb_python-1.2.4-py3-none-any.whl (12.6 kB 查看哈希)

上传时间 Python 3

由...

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面