Skip to content

bl4ckstack/dnsq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dnsq

Perl License Version DNS Platform PRs Welcome

A powerful dig-like DNS query tool with JSON output, trace mode, and batch processing — all in pure Perl.

Features

Multiple Formats • Full dig-like, short, or JSON output
Protocol Agnostic • TCP and UDP support
Flexible Queries • Custom DNS servers, ports, timeouts, and retries
Batch Processing • Query multiple domains from files
DNSSEC Ready • Request and display DNSSEC records
Trace Mode • Follow DNS delegation from root servers
Interactive Shell • Built-in REPL for exploration

Installation

# Install dependencies
cpanm --installdeps .

# Or using cpan
cpan Net::DNS JSON Term::ReadLine

# Make executable
chmod +x bin/dnsq

Usage

# Basic query
bin/dnsq google.com

# Query specific record type
bin/dnsq google.com MX

# Use custom DNS server
bin/dnsq -s 8.8.8.8 example.com

# JSON output
bin/dnsq --json google.com

# Short output (answers only)
bin/dnsq --short google.com

# Use TCP
bin/dnsq --tcp google.com

# Trace DNS delegation
bin/dnsq --trace example.com

# Batch mode
bin/dnsq --batch example/queries.txt

# Interactive mode
bin/dnsq --interactive

Options

Option Description
-s, --server <ip> DNS server to query
-p, --port <port> DNS server port (default: 53)
-t, --timeout <sec> Query timeout (default: 5)
-r, --retries <num> Number of retries (default: 3)
-T, --tcp Use TCP protocol
-j, --json JSON output
-S, --short Short output (answers only)
--trace Trace DNS delegation
-b, --batch <file> Batch mode
-i, --interactive Interactive mode
-d, --dnssec Request DNSSEC
-h, --help Show help

Examples

# Get all A records as JSON
bin/dnsq --json --short google.com A

# Verify DNS propagation
bin/dnsq -s 8.8.8.8 example.com      # Google DNS
bin/dnsq -s 1.1.1.1 example.com      # Cloudflare DNS

# Batch processing
bin/dnsq --batch examples/queries.txt --json > results.json

# Interactive session
bin/dnsq --interactive
dnsq> google.com
dnsq> example.com MX
dnsq> set server 8.8.8.8
dnsq> quit

About

dnsq — Like dig, but cooler, written in Perl and fueled by curiosity

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published