Skip to main content

Sensible high-level DNS lookups in Python, using DNSpython resolver

Project description

PyNslookup

PyPi package

Sensible high-level DNS lookups in Python, using dnspython dns.resolver, code adopted from XN-Twist

The main purpose and uses of this library:

  • A record lookups (typical DNS queries)
  • SOA lookups

Returns an object containing two arrays:

  • response_full: the full DNS response string(s)
  • answer: the parsed DNS answer (list of IPs or SOA string)

Usage

from nslookup import Nslookup

domain = "example.com"

# set optional Cloudflare public DNS server
dns_query = Nslookup(dns_servers=["1.1.1.1"])

ips_record = dns_query.dns_lookup(domain)
print(ips_record.response_full, ips_record.answer)

soa_record = dns_query.soa_lookup(domain)
print(soa_record.response_full, soa_record.answer)

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

nslookup-1.3.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nslookup-1.3.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file nslookup-1.3.0.tar.gz.

File metadata

  • Download URL: nslookup-1.3.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.5

File hashes

Hashes for nslookup-1.3.0.tar.gz
Algorithm Hash digest
SHA256 17e8dda04e8259d5a9edf4e641dd1cbffe36b579eee579c11c15db8b81a3b132
MD5 49a82bd12824a799b5132d2fc864bde4
BLAKE2b-256 a8dfdffb43e594699ce79a517adb24f43951bba74d7b67a8f21282c43baf312d

See more details on using hashes here.

File details

Details for the file nslookup-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: nslookup-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.5

File hashes

Hashes for nslookup-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ba8d8576b5427fb6705722724d49059327951ed959d175010a0a845723af3de9
MD5 93932f90c126f1f84e2a45b42294adb7
BLAKE2b-256 90c30aef4acd33086eb6b54835d4ea1e4b5cdf94c94c0d42cf1618a67c098906

See more details on using hashes here.

Supported by

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