Skip to main content

A powerful Python CLI tool for querying and analyzing DNS records across multiple domains with advanced search, custom DNS servers, and color-coded output for network troubleshooting and auditing.

Project description

🔍 dnschecker

A powerful and flexible Python CLI tool for querying and inspecting DNS records across multiple domains, supporting custom DNS servers, advanced search, and color highlighting.


🚀 Overview

dnschecker lets you:

  • Query DNS records (A, MX, TXT, SPF, CNAME, etc.) for one or more domains
  • Use custom DNS servers for queries
  • Search for specific values, IPv4, or IPv6 addresses within records
  • Highlight and summarize search results for quick analysis
  • Handle SPF records with special logic (extracted from TXT records)
  • Get clear, color-coded output for easy interpretation

Perfect for sysadmins, DevOps, and anyone needing to audit or troubleshoot DNS configurations!


✨ Features

  • 🔎 Flexible Record Support: Query any DNS record type (A, MX, TXT, SPF, CNAME, etc.)
  • 🌐 Custom DNS Servers: Specify one or more DNS servers to use for queries
  • 🕵️ Advanced Search: Find specific values, IPv4, or IPv6 addresses within DNS records
  • 🎨 Color Highlighting: Results are color-coded for fast visual scanning
  • 🛡️ Robust Error Handling: Graceful handling of NXDOMAIN, timeouts, and other DNS errors
  • 📋 Batch Domain Support: Check multiple domains in a single run
  • 🧪 SPF Logic: Accurately extracts SPF records from TXT records

📦 Installation

Install from PyPI:

pip install dnschecker

📝 Usage

Run the tool from the command line:

pip install dnschecker

dnschecker --domains example.com example.org --type MX


**Main options:**

- `--domains`: List of domains to check (required)
- `--type`: DNS record type (A, MX, TXT, SPF, CNAME, etc.) (default: A)
- `--dns-servers`: Space-separated list of DNS server IPs to use (default: 1.1.1.1 1.0.0.1)
- `--find`: Search for a specific value in the records
- `--find-ipv4`: Search for a specific IPv4 address in the records
- `--find-ipv6`: Search for a specific IPv6 address in the records

**Examples:**

Query A records for multiple domains using default DNS servers:

dnschecker --domains example.com example.org


Query MX records using Google DNS:

dnschecker --domains example.com --type MX --dns-servers 8.8.8.8 8.8.4.4


Search for a specific value in TXT records:

dnschecker --domains example.com --type TXT --find "google-site-verification"


Find a particular IPv4 address in SPF records:

dnschecker --domains example.com --type SPF --find-ipv4 192.0.2.1


---

## 📚 Output Example

Using DNS servers: 8.8.8.8 Record type: MX Domain: example.com → 10 mail.example.com. → 20 backup.example.com.


With search highlighting:

Searching for: google-site-verification Domain: example.com ✅ google-site-verification in: v=spf1 include:_spf.google.com ~all "google-site-verification=abc123"


---

## ⚙️ Dependencies

- Python 3.6+
- [dnspython](https://pypi.org/project/dnspython/)

Install dependencies with:

pip install dnspython


---

## 🛡️ License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

---

## 🤝 Contributing

Contributions, bug reports, and feature requests are welcome!  
Please open an issue or submit a pull request on GitHub.

---

## 🙋 Support

For questions or support, open an issue on GitHub or contact [your.email@example.com](mailto:your.email@example.com).

---

> _Effortlessly audit and troubleshoot DNS records across your domains!_

---

**Replace placeholder links and emails with your actual information before publishing to PyPI.**

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

dnschecker-0.1.1.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dnschecker-0.1.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file dnschecker-0.1.1.tar.gz.

File metadata

  • Download URL: dnschecker-0.1.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for dnschecker-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4bd848b18bf0bcc9ffea59a0a88149f97572597d21835bf13df745865873e29d
MD5 842a39ca62b29165824e402d197a553b
BLAKE2b-256 96d2a98db3c69d0dd3470a85f9d9f7f7557d9f1449a01d0132ec86d7c9841526

See more details on using hashes here.

Provenance

The following attestation bundles were made for dnschecker-0.1.1.tar.gz:

Publisher: publish-to-pypi.yml on fuhdan/dnschecker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dnschecker-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: dnschecker-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for dnschecker-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3c883d67ac14ea10e0a535f23a53eca1c844f98b8b1f9bddff0db1b6757a90bc
MD5 8fe016e7c860e718960ec173baac27a3
BLAKE2b-256 e982675cdb7a076095c0e04a58af186772e73b0c2dd8c496b355e0621e2f899a

See more details on using hashes here.

Provenance

The following attestation bundles were made for dnschecker-0.1.1-py3-none-any.whl:

Publisher: publish-to-pypi.yml on fuhdan/dnschecker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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