1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-01 20:15:23 +02:00
tldr/pages/common/dnsx.md

39 lines
1.6 KiB
Markdown
Raw Normal View History

2024-04-11 14:27:45 +10:00
# dnsx
> A fast and multi-purpose DNS toolkit to run multiple DNS queries.
> Note: input to `dnsx` needs to be passed through `stdin` (pipe `|`) in some cases.
> See also: `dig`, `dog`, `dnstracer`.
> More information: <https://github.com/projectdiscovery/dnsx>.
- Query the A record of a (sub)domain and show [re]sponse received:
`echo {{example.com}} | dnsx -a {{[-re|-resp]}}`
2024-04-11 14:27:45 +10:00
2024-04-14 06:33:17 -03:00
- Query all the DNS records (A, AAAA, CNAME, NS, TXT, SRV, PTR, MX, SOA, AXFR, CAA):
2024-04-11 14:27:45 +10:00
`dnsx -recon {{[-re|-resp]}} <<< {{example.com}}`
2024-04-11 14:27:45 +10:00
- Query a specific type of DNS record:
`echo {{example.com}} | dnsx {{[-re|-resp]}} -{{a|aaaa|cname|ns|txt|srv|ptr|mx|soa|any|axfr|caa}}`
2024-04-11 14:27:45 +10:00
- Output response only (do not show the queried domain or subdomain):
2024-04-11 14:27:45 +10:00
`echo {{example.com}} | dnsx {{[-ro|-resp-only]}}`
2024-04-11 14:27:45 +10:00
- Display raw response of a query, specifying resolvers to use and retry attempts for failures:
2024-04-11 14:27:45 +10:00
`echo {{example.com}} | dnsx -{{debug|raw}} {{[-r|-resolver]}} {{1.1.1.1,8.8.8.8,...}} -retry {{number}}`
2024-04-11 14:27:45 +10:00
- Brute force DNS records using a placeholder:
`dnsx {{[-d|-domain]}} {{FUZZ.example.com}} {{[-w|-wordlist]}} {{path/to/wordlist.txt}} {{[-re|-resp]}}`
2024-04-11 14:27:45 +10:00
- Brute force DNS records from a list of domains and wordlists, appending output to a file with no color codes:
2024-04-11 14:27:45 +10:00
`dnsx {{[-d|-domain]}} {{path/to/domain.txt}} {{[-w|-wordlist]}} {{path/to/wordlist.txt}} {{[-re|-resp]}} {{[-o|-output]}} {{path/to/output.txt}} {{[-nc|-no-color]}}`
2024-04-11 14:27:45 +10:00
- Extract `CNAME` records for the given list of subdomains, with rate limiting DNS queries per second:
2024-04-11 14:27:45 +10:00
`subfinder -silent {{[-d|-domain]}} {{example.com}} | dnsx -cname {{[-re|-resp]}} {{[-rl|-rate-limit]}} {{number}}`