Skip to content

dnsx

Fast multi-purpose DNS toolkit for record queries

Description

dnsx is a fast and multi-purpose DNS toolkit designed for running various probes through the retryabledns library. It supports multiple DNS query types and is optimized for bulk DNS resolution in bug bounty workflows.

Installation

BASH
go install -v github.com/projectdiscovery/dnsx/cmd/dnsx@latest

Basic Usage

BASH
# Resolve subdomains (A records)
cat subs.txt | dnsx -silent -o resolved.txt

# Query A records with response
cat subs.txt | dnsx -a -resp -silent

# Query all record types
cat subs.txt | dnsx -a -aaaa -cname -mx -txt -resp

Advanced Usage

BASH
# With retry
cat subs.txt | dnsx -retry 3 -silent

# Custom resolvers
cat subs.txt | dnsx -r resolvers.txt -silent

# Wildcard filtering
cat subs.txt | dnsx -wd target.com -silent

# JSON output
cat subs.txt | dnsx -json -o results.json

# Response only
cat subs.txt | dnsx -resp-only

Common Workflows

BASH
# Resolve discovered subdomains
subfinder -d target.com -silent | dnsx -silent -o resolved.txt

# Find CNAME records for takeover hunting
cat subs.txt | dnsx -cname -resp | grep -v "target.com"