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.5.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.5.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nslookup-1.5.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.10

File hashes

Hashes for nslookup-1.5.0.tar.gz
Algorithm Hash digest
SHA256 8b485a1984e01219b746483ad0c0eb2855764c6e520a5c850970bc6698ce0f71
MD5 6082f44e33c94c42810d703d21eaf116
BLAKE2b-256 cdd6c19cad05ee8b94eaf20c5748db4fefad252c30d62e64c3a187efd24755aa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nslookup-1.5.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.10

File hashes

Hashes for nslookup-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2addbdda0efc62076102af74051ebb7ddd029fd3a65dce7e7e6866328e2e8e4
MD5 a004a56f309c63a2cb40e43e8df855c4
BLAKE2b-256 3e5614d2212e38270c8d465c6e1b4f14947de6facb4c2d2f8af7d1b6042159fa

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