Updated Jul 14, 2026

Recon

Resolve candidate domain lists against public resolvers

DNS stub resolver for large domain lists.

Agent

overview

What massdns does

Feed a domains file and a resolvers list via -r. -t selects the record type; -s sets concurrent lookups. Output is answered names ready for probing.

Use it when a brute-force or permutation step produced a huge candidate set and you need raw resolution throughput. -c retries failed names; --filter keeps selected response codes.

puredns wraps massdns with wildcard filtering. shuffledns is a Go wrapper over the same engine. massdns alone resolves; it does not generate candidates.

source github.com/blechschmidt/massdns

use cases

Where massdns fits

Resolve a massive subdomain wordlist

Feed a brute-force or permutation list of millions of candidate names through MassDNS and keep only the ones that resolve, cutting a huge guess set down to real hosts.

Validate enumerated subdomains

Run the output of passive subdomain discovery through MassDNS to drop dead names and confirm which domains still answer before you spend scanner time on them.

Pull specific record types at scale

Set the record type to A, CNAME, MX, or TXT and resolve an entire domain list in one pass to map infrastructure, mail routing, or ownership signals.

Feed a probing and scanning pipeline

Resolve candidate domains, hand the live hosts to httpx for liveness and tech detection, then to a vulnerability scanner so testing runs only against real targets.

reference

massdns inputs and flags

24 inputs
NameTypeFlagDescription
domains-listFILE·List of domain names to resolve, the primary positional input.
dns-resolvers-fileFILE-rText file of DNS resolver IPs, one per line, to spread queries across.
concurent-lookupsSTRING-sNumber of concurrent lookups kept in flight; the main throughput knob (default 10000).
quiet-modeBOOLEAN-qQuiet mode: suppress the progress statistics printed to stderr.
record-typeSTRING-tRecord type to resolve, such as A, CNAME, or MX (default A).
number-of-resolvesSTRING-cNumber of resolve attempts for a name before giving up (default 50).
filter-response-code-outputSTRING--filterOnly output packets with the specified response code.
number-of-processesSTRING--processesNumber of processes to use for resolving (default 1).

Showing key inputs. massdns exposes 24 inputs in total.

Full flag reference (24 inputs)
NameTypeFlagDescription
domains-listFILE·List of domains to resolve, passed as the positional argument.
dns-resolvers-fileFILE-rText file containing DNS resolvers.
record-typeSTRING-tRecord type to be resolved (default A).
concurent-lookupsSTRING-sNumber of concurrent lookups (default 10000).
quiet-modeBOOLEAN-qQuiet mode: suppress progress statistics on stderr.
number-of-resolvesSTRING-cNumber of resolves for a name before giving up (default 50).
number-of-processesSTRING--processesNumber of processes to be used for resolving (default 1).
sockets-per-processSTRING--socket-countSocket count per process (default 1).
verify-ipBOOLEAN--verify-ipVerify IP addresses of incoming replies.
filter-response-code-outputSTRING--filterOnly output packets with the specified response code.
not-output-response-codeSTRING--ignoreDo not output packets with the specified response code.
unacceptable-response-codesSTRING--retryUnacceptable DNS response codes (default REFUSED).
time-to-wait-between-resolvesSTRING-iInterval in milliseconds to wait between multiple resolves of the same domain (default 500).
non-reqursive-queriesBOOLEAN--norecurseUse non-recursive queries. Useful for DNS cache snooping.
dont-switch-resolverBOOLEAN--stickyDo not switch the resolver when retrying.
use-resolvers-incrementalyBOOLEAN--predictableUse resolvers incrementally. Useful for resolver tests.
flush-output-fileBOOLEAN--flushFlush the output file whenever a response was received.
bind-to-ip-and-portSTRING-bBind to IP address and port (default 0.0.0.0:0).
send-buffer-sizeSTRING--sndbufSize of the send buffer in bytes.
receive-buffer-sizeSTRING--rcvbufSize of the receive buffer in bytes.
busy-wait-pollingBOOLEAN--busy-pollUse busy-wait polling instead of epoll.
dont-drop-priviligesBOOLEAN--rootDo not drop privileges when running as root. Not recommended.
drop-privileges-userSTRING--drop-userUser to drop privileges to when running as root (default nobody).
drop-privileges-groupSTRING--drop-groupGroup to drop privileges to when running as root (default nogroup).

example

Run massdns

massdns · command
# resolve a candidate list against public resolvers, write simple text outputmassdns -r resolvers.txt -t A -o S -w resolved.txt candidates.txt
sample output
api.example.com. A 203.0.113.10app.example.com. A 203.0.113.11mail.example.com. A 203.0.113.25staging.example.com. A 198.51.100.42dev.example.com. CNAME app-lb.example.com.app-lb.example.com. A 203.0.113.12vpn.example.com. A 198.51.100.77grafana.example.com. A 203.0.113.60

guidance

Choosing massdns

Use massdns for raw resolution throughput across large candidate lists. Pair a brute-force or permutation tool upstream. For wildcard filtering and bruteforcing in one step, use puredns.

puredns

Wraps massdns with wildcard detection and bruteforcing. Prefer it when you want filtered results without wiring those steps yourself.

shuffledns

Go wrapper around massdns for subdomain enumeration and resolution. Friendlier interface, same engine underneath.

dnsx

Multi-purpose DNS toolkit with more per-record probers. Less raw list throughput than massdns.

faq

massdns questions

-q enables quiet mode and suppresses progress statistics on stderr. It does not set a queries-per-second rate. Throughput is governed by -s (concurrent lookups).

Run massdns yourself

A candidate domain list and a resolvers file feed MassDNS, which resolves the names at scale and writes the live hosts as a queryable output.

Facts on this page come from the live Trickest tool library.