AlephNullSK / dnsgen

Generates combination of domain names from the provided input.
MIT License
884 stars 115 forks source link
domains osint recon subdomains

:cyclone: dnsgen (DNS generator)

This tool generates a combination of domain names from the provided input. Combinations are created based on wordlist. Custom words are extracted per execution. Refer to Techniques section to learn more.

dnsgen is very similar to altdns. It does not contain DNS resolver. You should use massdns for DNS resolution.

dnsgen

Installation

python -m pip install dnsgen

..or from GitHub directly:

git clone https://github.com/AlephNullSK/dnsgen
cd dnsgen/
python -m poetry install

Usage

$ dnsgen domains.txt (domains.txt contains a list of active domain names)

Combination with massdns:

$ cat domains.txt | dnsgen - | massdns -r /path/to/resolvers.txt -t A -o J --flush 2>/dev/null

Get only resolved domains with massdns:

$ dnsgen hosts.txt >> dnsgen_wordlist.txt
$ massdns -r ~/tools/massdns/lists/resolvers.txt -o S dnsgen_wordlist.txt | grep -e ' A ' | cut -d 'A' -f 1 | rev | cut -d "." -f1 --complement | rev | sort | uniq  > dnsgen_massdns_resolved

these will generate a file with domains without "text polution".

Techniques

(For demo purposes, let's say that wordlist contains just one word: stage)

Resources

TO DO

Author

Aleph Null s.r.o.