Sensible high-level DNS lookups in Python, using DNSpython resolver
Project description
PyNslookup
Sensible high-level DNS lookups in Python, using dnspython dns.resolver, code adopted from XN-Twist
The main purpose and uses of this library:
Arecord 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
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17e8dda04e8259d5a9edf4e641dd1cbffe36b579eee579c11c15db8b81a3b132
|
|
| MD5 |
49a82bd12824a799b5132d2fc864bde4
|
|
| BLAKE2b-256 |
a8dfdffb43e594699ce79a517adb24f43951bba74d7b67a8f21282c43baf312d
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba8d8576b5427fb6705722724d49059327951ed959d175010a0a845723af3de9
|
|
| MD5 |
93932f90c126f1f84e2a45b42294adb7
|
|
| BLAKE2b-256 |
90c30aef4acd33086eb6b54835d4ea1e4b5cdf94c94c0d42cf1618a67c098906
|