Skip to main content

Python client for Farsight Security's DNSDB API

Project description

dnsdb

Python client for Farsight Security's DNSDB API.

Features

  • supports all capabilities of DNSDB API
  • sorting of results by last_seen
  • convert epoch to ISO 8601
  • normalize results with regard sensor or zone observation
  • DNSDB API Error codes returned in JSON data structure

Installation

Use the package manager pip to install dnsdb.

pip install dnsdb

Usage

from dnsdb import Dnsdb

api_key="12345"
dnsdb = Dnsdb(api_key)

results = dnsdb.search(name="fsi.io")
results = dnsdb.search(name="mail.fsi.io", inverse=True)
results = dnsdb.search(ip="104.244.14.108")
results = dnsdb.search(ip="104.244.14.0/24")
results = dnsdb.search(ip="2620:11c:f008::108")
results = dnsdb.search(hexadecimal="36757a35")
quota = dnsdb.quota()

Advanced Usage

from dnsdb import Dnsdb

api_key="12345"
dnsdb = Dnsdb(api_key)

results = dnsdb.search(name="fsi.io", type="A")
results = dnsdb.search(name="farsightsecurity.com", bailiwick="com.")
results = dnsdb.search(name="fsi.io", wildcard_left=True)
results = dnsdb.search(name="fsi", wildcard_right=True)
results = dnsdb.search(name="fsi.io", sort=False)
results = dnsdb.search(name="fsi.io", remote_limit=150000, return_limit=1000)
results = dnsdb.search(name="fsi.io", time_last_after=1514764800)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
dnsdb-0.1.2-py3-none-any.whl (16.6 kB) Copy SHA256 hash SHA256 Wheel py3
dnsdb-0.1.2.tar.gz (5.9 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page