Skip to main content

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

Project description

soaparse

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"

# DNS servers default to cloudflare public DNS
dns_query = Nslookup(dns_servers=["10.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-0.5.0.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

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

nslookup-0.5.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nslookup-0.5.0.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.9

File hashes

Hashes for nslookup-0.5.0.tar.gz
Algorithm Hash digest
SHA256 1a4420befe3970bf0fefa17c5e9439c3403eb59ceb7c97acf519ef0bc8c2abce
MD5 f869a1e7d9b33d36fb4c7337371895e2
BLAKE2b-256 bfca98027fcb005dd480c54ca26383134d152a1f48d1f0cbf53e31cdd4836cb1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nslookup-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.9

File hashes

Hashes for nslookup-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ac4e05322796ba27dce5393fbede9e7ec2621b17c086cb9150064bbc926c3b8
MD5 3878413847044042e0a283ad396c370b
BLAKE2b-256 3355bde38bbdfeccb11a71ed61ee26509db3d8358cbc7f5702160134e7681f6a

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