App-dnsq
view release on metacpan or search on metacpan
# dnsq
[](https://www.perl.org/)
[](LICENSE)
[](bin/dnsq)
A full-featured dig-like DNS query tool written in Perl with JSON output, TCP/UDP support, trace mode, and batch processing.
## Features
- **Multiple Output Formats**: Full dig-like, short (answers only), or JSON
- **Protocol Support**: TCP and UDP
- **Custom DNS Server**: Query any DNS server with custom port
- **Timeout & Retries**: Configurable timeout and retry settings with exponential backoff
- **Batch Mode**: Process multiple queries from a file with parallel processing
- **Trace Mode**: Follow DNS delegation path from root servers
- **Interactive Mode**: Interactive shell with ASCII art banner and statistics
- **DNSSEC Support**: Request and display DNSSEC records
- **Smart Caching**: TTL-aware cache with optional disk persistence
- **Statistics Tracking**: Monitor query performance and cache hit rates
- **Progress Indicators**: Real-time progress for batch operations
- **Input Validation**: Comprehensive validation for domains, IPs, and query types
## Installation
### From CPAN
```bash
# Install from CPAN (recommended)
cpan App::dnsq
# Or using cpanm
cpanm App::dnsq
```
### From Source
```bash
# Clone the repository
git clone https://github.com/bl4ckstack/dnsq.git
cd dnsq
# Install dependencies
cpanm --installdeps .
# Build and install
perl Makefile.PL
make
make test
make install
```
### Manual Installation
```bash
# Install dependencies manually
cpan Net::DNS JSON Term::ReadLine Storable File::Spec
# Optional: For parallel batch processing
cpan Parallel::ForkManager
# Make executable
chmod +x bin/dnsq
```
## Usage
```bash
# Basic query
bin/dnsq google.com
# Query specific record type
bin/dnsq google.com MX
( run in 1.961 second using v1.01-cache-2.11-cpan-39bf76dae61 )