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:
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"
# 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
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-0.5.0.tar.gz
(2.3 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-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a4420befe3970bf0fefa17c5e9439c3403eb59ceb7c97acf519ef0bc8c2abce
|
|
| MD5 |
f869a1e7d9b33d36fb4c7337371895e2
|
|
| BLAKE2b-256 |
bfca98027fcb005dd480c54ca26383134d152a1f48d1f0cbf53e31cdd4836cb1
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ac4e05322796ba27dce5393fbede9e7ec2621b17c086cb9150064bbc926c3b8
|
|
| MD5 |
3878413847044042e0a283ad396c370b
|
|
| BLAKE2b-256 |
3355bde38bbdfeccb11a71ed61ee26509db3d8358cbc7f5702160134e7681f6a
|