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.1.0.tar.gz
(2.6 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.1.0.tar.gz.
File metadata
- Download URL: nslookup-1.1.0.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d553ee92574fe271b568d20d7c54da44511982deaa38dea7e957b56641bfb0a
|
|
| MD5 |
1470a9ac6997e025d39be5377470435f
|
|
| BLAKE2b-256 |
248bc7a02177360961181b19e64ae32fdc4f39962c7a27ab342d82df9a478bcb
|
File details
Details for the file nslookup-1.1.0-py3-none-any.whl.
File metadata
- Download URL: nslookup-1.1.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/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29eb5adc60c00409d0a6f30bfb68b69135c3043e9ecc5686562d59aac5f57dc9
|
|
| MD5 |
bb79ee8b2fff3f7065e9cd72e8c2d2b4
|
|
| BLAKE2b-256 |
3f4e7ca0573d77a88622eff2e42c78c64b68f3e32f46587bffb7bb90ce37733d
|