{"id":49456524,"url":"https://github.com/blackstar257/dug","last_synced_at":"2026-04-30T06:44:02.049Z","repository":{"id":297883541,"uuid":"998193552","full_name":"blackstar257/dug","owner":"blackstar257","description":"A modern DNS lookup utility written in Rust that serves as a drop-in replacement for the traditional dig command.","archived":false,"fork":false,"pushed_at":"2026-02-03T19:32:16.000Z","size":97,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-30T06:43:52.617Z","etag":null,"topics":["cli","dig","dns","dug","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blackstar257.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-08T04:17:12.000Z","updated_at":"2026-01-12T02:50:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"57e815dd-ad2e-474e-8ac2-fa1f2782c911","html_url":"https://github.com/blackstar257/dug","commit_stats":null,"previous_names":["blackstar257/dug"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/blackstar257/dug","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackstar257%2Fdug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackstar257%2Fdug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackstar257%2Fdug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackstar257%2Fdug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blackstar257","download_url":"https://codeload.github.com/blackstar257/dug/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackstar257%2Fdug/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32457110,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","dig","dns","dug","rust"],"created_at":"2026-04-30T06:44:01.078Z","updated_at":"2026-04-30T06:44:02.041Z","avatar_url":"https://github.com/blackstar257.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DUG - DNS Lookup Utility\n\n[![Rust](https://img.shields.io/badge/rust-1.70%2B-brightgreen.svg)](https://www.rust-lang.org)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Build Status](https://img.shields.io/github/workflow/status/blackstar257/dug/CI)](https://github.com/blackstar257/dug/actions)\n\nA modern DNS lookup utility written in Rust that serves as a drop-in replacement for the traditional `dig` command. DUG provides fast, reliable DNS queries with a familiar interface and enhanced features.\n\n## 🚀 Features\n\n- **Full `dig` compatibility**: Supports the same command-line interface and output format\n- **Multiple record types**: A, AAAA, MX, NS, SOA, TXT, CNAME, PTR, SRV, CAA, and more\n- **Query classes**: IN (Internet), CH (Chaos), HS (Hesiod)\n- **Advanced querying**:\n  - Trace queries (`+trace`) for step-by-step resolution\n  - Reverse DNS lookups (`-x`)\n  - Batch file processing (`-f`)\n  - TCP and UDP support\n- **Flexible output**:\n  - Short format (`+short`)\n  - Customizable section display\n  - Colored output for better readability\n- **Network options**:\n  - IPv4/IPv6 preference\n  - Custom timeouts and retry logic\n  - Source address binding\n- **Performance**: Built with Rust for speed and memory safety\n- **Cross-platform**: Works on Linux, macOS, and Windows\n\n## 📦 Installation\n\n### From Source\n\n```bash\n# Clone the repository\ngit clone https://github.com/blackstar257/dug.git\ncd dug\n\n# Build and install\ncargo build --release\ncargo install --path .\n```\n\n### Using Cargo\n\n```bash\ncargo install dug\n```\n\n### Pre-built Binaries\n\nDownload the latest release from the [releases page](https://github.com/blackstar257/dug/releases).\n\n## 🔧 Usage\n\n### Basic Queries\n\n```bash\n# Query A record for a domain\ndug example.com\n\n# Query specific record type\ndug example.com MX\n\n# Query with specific DNS server\ndug @8.8.8.8 example.com\n\n# Short output format\ndug +short example.com\n```\n\n### Advanced Queries\n\n```bash\n# Trace query path\ndug +trace example.com\n\n# Reverse DNS lookup\ndug -x 8.8.8.8\n\n# TCP query\ndug +tcp example.com\n\n# Query with timeout\ndug +time=10 example.com\n\n# IPv6 only\ndug -6 example.com AAAA\n```\n\n### Batch Processing\n\n```bash\n# Process multiple queries from file\ndug -f queries.txt\n```\n\nExample `queries.txt`:\n```\nexample.com A\ngoogle.com MX\n@8.8.8.8 cloudflare.com\n+short reddit.com\n```\n\n### Output Control\n\n```bash\n# Hide specific sections\ndug +noquestion +noauthority example.com\n\n# Show only answers\ndug +noall +answer example.com\n\n# Disable comments\ndug +nocomments example.com\n```\n\n## 📖 Command Line Options\n\n### Flags\n\n| Flag | Description |\n|------|-------------|\n| `-4` | Use IPv4 only |\n| `-6` | Use IPv6 only |\n| `-b ADDRESS` | Set source IP address |\n| `-c CLASS` | Set query class (IN, CH, HS) |\n| `-f FILENAME` | Read queries from batch file |\n| `-h` | Show help information |\n| `-k FILENAME` | TSIG key file |\n| `-p PORT` | Set port number |\n| `-q NAME` | Set query name |\n| `-t TYPE` | Set query type |\n| `-x ADDR` | Reverse lookup |\n| `-y KEY` | TSIG key |\n\n### Query Options\n\n| Option | Description |\n|--------|-------------|\n| `+[no]tcp` | Use TCP instead of UDP |\n| `+[no]short` | Short output format |\n| `+[no]trace` | Trace delegation path |\n| `+[no]recurse` | Enable/disable recursion |\n| `+[no]dnssec` | Request DNSSEC validation |\n| `+[no]question` | Show/hide question section |\n| `+[no]answer` | Show/hide answer section |\n| `+[no]authority` | Show/hide authority section |\n| `+[no]additional` | Show/hide additional section |\n| `+[no]stats` | Show/hide query statistics |\n| `+[no]cmd` | Show/hide command line |\n| `+[no]comments` | Show/hide comment lines |\n| `+time=N` | Set timeout in seconds |\n| `+tries=N` | Set number of tries |\n| `+retry=N` | Set number of retries |\n\n## 🌟 Examples\n\n### Common DNS Queries\n\n```bash\n# Check if a website is accessible\ndug +short example.com A\n\n# Find mail servers\ndug example.com MX\n\n# Check nameservers\ndug example.com NS\n\n# Get all DNS records\ndug example.com ANY\n\n# Check reverse DNS\ndug -x 192.168.1.1\n```\n\n### Troubleshooting DNS\n\n```bash\n# Trace full resolution path\ndug +trace example.com\n\n# Check specific DNS server response\ndug @1.1.1.1 example.com\n\n# Test with TCP (useful for large responses)\ndug +tcp example.com TXT\n\n# Check DNSSEC validation\ndug +dnssec example.com\n```\n\n## 🛠️ Development\n\n### Prerequisites\n\n- Rust 1.70 or later\n- Cargo\n\n### Building\n\n```bash\ngit clone https://github.com/blackstar257/dug.git\ncd dug\ncargo build\n```\n\n### Testing\n\n```bash\ncargo test\n```\n\n### Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n### Code Style\n\nThis project uses standard Rust formatting. Run the following before submitting:\n\n```bash\ncargo fmt\ncargo clippy\n```\n\n## 📝 Dependencies\n\n- **trust-dns-resolver**: DNS resolution library\n- **trust-dns-proto**: DNS protocol implementation\n- **clap**: Command-line argument parsing\n- **tokio**: Async runtime\n- **anyhow**: Error handling\n- **chrono**: Date and time handling\n- **colored**: Terminal output coloring\n\n## 🔍 Comparison with `dig`\n\n| Feature | dig | dug | Notes |\n|---------|-----|-----|-------|\n| Basic queries | ✅ | ✅ | Full compatibility |\n| Record types | ✅ | ✅ | All common types supported |\n| Trace queries | ✅ | ✅ | Step-by-step resolution |\n| Batch files | ✅ | ✅ | Process multiple queries |\n| Output formats | ✅ | ✅ | Short and full formats |\n| Performance | ⚡ | ⚡⚡ | Rust provides better performance |\n| Memory usage | 📊 | 📉 | Lower memory footprint |\n| Cross-platform | ✅ | ✅ | Works on all major platforms |\n\n## 🐛 Known Issues\n\n- AXFR (zone transfer) queries are not yet implemented\n- Some advanced TSIG features are in development\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- Inspired by the original `dig` utility from ISC BIND\n- Built with the excellent Rust DNS libraries from the trust-dns project\n- Thanks to the Rust community for their amazing ecosystem\n\n## 📞 Support\n\n- 🐛 **Bug Reports**: [Issues](https://github.com/blackstar257/dug/issues)\n- 💡 **Feature Requests**: [Discussions](https://github.com/blackstar257/dug/discussions)\n- 📧 **Email**: your-email@example.com\n\n---\n\n**DUG** - Making DNS queries fast, reliable, and modern with Rust 🦀 ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackstar257%2Fdug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblackstar257%2Fdug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackstar257%2Fdug/lists"}