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

🔍 dns-checker

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

dns-checker 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

dns-checker --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:

dns-checker --domains example.com example.org


Query MX records using Google DNS:

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


Search for a specific value in TXT records:

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


Find a particular IPv4 address in SPF records:

dns-checker --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.2.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.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dnschecker-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 2becb7f9ba9570874404f52f79d6f64580008d89cbc5aa0bb87b2e976d0c4bf6
MD5 c013e49e8d80333e3ecb55a7252244ed
BLAKE2b-256 aa00a51fbcea9e3f3cf6c2df5c2702f610ee1f9f900acdafd76ad9502de1e74d

See more details on using hashes here.

Provenance

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

Publisher: publish-to-pypi-and-dockerhub.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.2-py3-none-any.whl.

File metadata

  • Download URL: dnschecker-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3fe8581b098938a825ee2d19d2ec387706c571963719a0797ebf6629aad96b0a
MD5 a036b261346d09835aac765d160f6540
BLAKE2b-256 32a2cef87623dca1e4ee1bede086da6dccdee5718dc636283e9f0bdf5f0b399e

See more details on using hashes here.

Provenance

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

Publisher: publish-to-pypi-and-dockerhub.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