DNSENUM(1)

๐ŸŒˆ DNSENUM(1) โ€” bestie's guide to the multithread script that enumerates info on a domain and discovers non-contiguous IP blocks ๐Ÿ’…

okay so. this page lives in the User Contributed Perl Documentation corner of your system, and it's your bestie's guide to dnsenum. buckle up, it's giving recon era. ๐Ÿฆ‹

โœจ VERSION โœจ

dnsenum version 1.3.1 โ€” yes she's on 1.3.1, no cap. ๐Ÿ‘‘

๐ŸŽ€ SYNOPSIS ๐ŸŽ€

dnsenum [options] <domain> -f dns.txt

๐Ÿ’– DESCRIPTION ๐Ÿ’–

okay so the supported operations are literally: nslookup, zonetransfer, google scraping, domain brute force (recursion too, she ate), whois ip and reverse lookups. periodt. ๐Ÿซถ

The operations, in order, and I need you to follow along because they build on each other:

  1. Get the host's address (A record). ๐ŸŒธ
  2. Get the nameservers (threaded). โšก
  3. Get the MX record (threaded). โšก
  4. Perform AXFR queries on nameservers (threaded). ๐Ÿ”ฅ
  5. Get extra names and subdomains via google scraping (google query = -www site:domain). ๐Ÿ”
  6. Brute force subdomains from (REQUIRED), can also perform recursion on subdomain that have NS records (all threaded). ๐Ÿ˜ญ
  7. Calculate Class C IP network ranges from the results and perform whois queries on them (threaded). ๐Ÿงš
  8. Perform reverse lookups on netranges (class C or/and whois netranges)(threaded). ๐Ÿ’€
  9. Write to domain_ips.txt file non-contiguous ip-blocks results. ๐Ÿ“

โœจ OPTIONS โœจ

lowkey the most important thing first: the brute force -f switch takes priority over the default dns.txt. ๐Ÿ’…

๐ŸŒŸ GENERAL OPTIONS ๐ŸŒŸ

  • --dnsserver <server> โ€” Use this DNS server to perform all A, NS and MX queries, the AXFR and PTR queries are sent to the domain's NS servers. no like fr, those AXFR and PTR ones go to the domain's NS servers, not your fancy custom one. ๐Ÿ™ˆ
  • --enum โ€” Shortcut option equivalent to --threads 5 -s 20 -w. the lazy girl's combo meal, iconic. ๐Ÿ“
  • -h, --help โ€” Print the help message. bestie behaviour. ๐Ÿซถ
  • --noreverse โ€” Skip the reverse lookup operations. Reverse lookups can take long time on big netranges. โณ
  • --nocolor โ€” Disable ANSIColor output. This option is only intended to be used on consoles that do not support color output. (so if your terminal can do color, don't come for me) ๐ŸŽจ
  • --private โ€” Show and save private ips at the end of the file domain_ips.txt. ๐Ÿ”’
  • --subfile <file> โ€” Write all valid subdomains to this file. Subdomains are taken from NS and MX records, zonetransfer, google scraping, brute force and reverse lookup hostnames. all the sources, all together, ngl. ๐Ÿ“‚
  • -t, --timeout <value> โ€” The tcp and udp timeout values in seconds (default: 10s). โฐ
  • --threads <va> โ€” The number of threads that will perform different queries. go off, parallelism. ๐Ÿงต
  • -v, --verbose โ€” Be verbose (show all the progress and all the error messages). she's not shy, she's just talkative. ๐Ÿ’ฌ
Notes: neither the default domain nor the resolver search list are appended to domains that don't contain any dots. so bare single-word names stay bare, k? ๐Ÿซ 

๐Ÿ” GOOGLE SCRAPING OPTIONS ๐Ÿ”

This function will scrap subdomains from google search, using query: -www site:domain. okay so basically we're asking google politely. ๐Ÿ’–

  • -p, --pages <value> โ€” The number of google search pages to process when scraping names, the -s switch must be specified, (default: 20 pages). ๐Ÿ“„
  • -s, --scrap <value> โ€” The maximum number of subdomains that will be scraped from google. ๐ŸŽฏ
NOTES: Google can block our queries with the malware detection. Http proxy options for google scraping are automatically loaded from the environment if the vars http_proxy or HTTP_PROXY are present. "http_proxy=http://127.0.0.1:8118/" or "HTTP_PROXY=http://127.0.0.1:8118/". On IO errors the mechanize browser object will automatically call die. like literally die. the script ends. ๐Ÿ’€

๐Ÿ’ฅ BRUTE FORCE OPTIONS ๐Ÿ’ฅ

  • -f, --file <file> โ€” Read subdomains from this file to perform brute force. ๐Ÿ“–
  • -u, --update <a|g|r|z> โ€” Update the file specified with the -f switch with valid subdomains. ๐Ÿงพ
    • -u a โ€” Update using all results. ๐ŸŒˆ
    • -u g โ€” Update using only google scraping results. ๐Ÿ”
    • -u r โ€” Update using only reverse lookup results. โ†ฉ๏ธ
    • -u z โ€” Update using only zonetransfer results. ๐ŸŒ
  • -r, --recursion โ€” Recursion on subdomains, brute force all discovered subdomains that have an NS record. ๐ŸŒ€
NOTES: To perform recursion first we must check previous subdomains results (zonetransfer, google scraping and brute force) for NS records after that we perform brute force on valid subdomains that have NS records and so on. NS, MX and reverse lookup results are not concerned. so don't @ them. ๐Ÿ™…โ€โ™€๏ธ

๐Ÿ•ต๏ธ WHOIS IP OPTIONS ๐Ÿ•ต๏ธ

Perform whois ip queries on c class netanges discovered from previous operations. (yes, "netanges", that's the original's typo, I'm not frauding it ๐Ÿ’…)

  • -d, --delay <value> โ€” The maximum value of seconds to wait between whois queries, the value is defined randomly, (default: 3s). ๐ŸŽฒ
  • -w, --whois โ€” Perform the whois queries on c class network ranges. โš ๏ธ Warning: this can generate very large netranges and it will take lot of time to perform reverse lookups. like. a LOT. ๐Ÿ˜ญ
NOTES: whois servers will limit the number of connections. and also: The whois query should recursively query the various whois providers until it gets the more detailed information including either TechPhone or OrgTechPhone by default. See: perldoc Net::Whois::IP. On errors the netrange will be a default c class /24. ๐Ÿซถ

๐Ÿ”„ REVERSE LOOKUP OPTIONS ๐Ÿ”„

  • -e, --exclude <regexp> โ€” Exclude PTR records that match the regexp expression from reverse lookup results, useful on invalid hostnames. ๐Ÿšซ
NOTES: PTR records that not match the domain are also excluded. Verbose mode will show all results. so if you're nosy, add the verbose flag, bestie. ๐Ÿ‘€

๐ŸŒธ OUTPUT FILES ๐ŸŒธ

Final non-contiguous ip blocks are written to domain_ips.txt file. ๐Ÿ“

NOTES: Final non-contiguous ip blocks are calculated : โœจ
  1. From reverse lookups that were performed on netranges ( c class network ranges or whois netranges ). ๐ŸŒ
  2. If the noreverse switch is used then they are calculated from previous operations results (nslookups, zonetransfers, google scraping and brute forcing). ๐Ÿงฎ

๐Ÿฆ‹ README ๐Ÿฆ‹

dnsenum: multithread script to enumerate information on a domain and to discover non-contiguous ip blocks. โ€” yeah that's the whole vibe.

๐Ÿ’œ PREREQUISITES ๐Ÿ’œ

Modules that are included in perl 5.28.0: Getopt::Long, IO::File, Thread::Queue.

Other Necessary modules: Must have: Net::DNS, Net::IP, Net::Netmask. Optional: Net::Whois::IP, HTML::Parser, WWW::Mechanize.

Perl ithreads modules (perl must be compiled with ithreads support): threads, threads::shared.

๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

Filip Waeytens <filip.waeytens[at]gmail.com>

tix tixxDZ <tixxdz[at]gmail.com>

๐ŸŒŸ MAINTAINER ๐ŸŒŸ

Network Silence

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

๐ŸŒˆ SCRIPT CATEGORIES ๐ŸŒˆ

Networking DNS


okay bestie that's the whole page, we served, we ate, no crumbs left. ๐Ÿฝ๏ธ๐Ÿ’…

this gorgeous thing was brought to you by perl v5.40.1, dated 2026-01-16, and it's the one and only DNSENUM(1). mwah. ๐Ÿ’–โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from