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.5.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.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b485a1984e01219b746483ad0c0eb2855764c6e520a5c850970bc6698ce0f71
|
|
| MD5 |
6082f44e33c94c42810d703d21eaf116
|
|
| BLAKE2b-256 |
cdd6c19cad05ee8b94eaf20c5748db4fefad252c30d62e64c3a187efd24755aa
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2addbdda0efc62076102af74051ebb7ddd029fd3a65dce7e7e6866328e2e8e4
|
|
| MD5 |
a004a56f309c63a2cb40e43e8df855c4
|
|
| BLAKE2b-256 |
3e5614d2212e38270c8d465c6e1b4f14947de6facb4c2d2f8af7d1b6042159fa
|