Skip to main content

Generates DNS possibilities from existing domain names.

Project description

: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

pip3 install dnsgen

..or from GitHub directly:

git clone https://github.com/ProjectAnte/dnsgen
cd dnsgen
pip3 install -r requirements.txt
python3 setup.py install

Usage

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

  • -l / --wordlen: minimum size of custom words to be extracted
  • -w / --wordlist: path to custom wordlist
  • -f / --fast: Generate lower amount of domains with most probable words only
  • filename: required parameter for an input list of domains. The input file should contain domain names separated by newline character (\n). You can also use STDIN as an input method, providing - to this argument.

Combination with massdns:

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

Techniques

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

  • Insert word on every index — Creates new subdomain levels by inserting the words between existing levels. foo.example.com -> stage.foo.example.com, foo.stage.example.com

  • Increase/Decrease num found(In development) If number is found in an existing subdomain, increase/decrease this number without any other alteration. foo01.example.com -> foo02.example.com, foo03.example.com, ...

  • Prepend word on every index — On every subdomain level, prepend existing content with WORD and WORD-. foo.example.com -> stagefoo.example.com, stage-foo.example.com

  • Append word on every index — On every subdomain level, append existing content with WORD and WORD-. foo.example.com -> foostage.example.com, foo-stage.example.com

  • Replace the word with word — If word longer than 3 is found in an existing subdomain, replace it with other words from the wordlist. (If we have more words than one in our wordlist). stage.foo.example.com -> otherword.foo.example.com, anotherword.foo.example.com, ...

  • Extract custom words — Extend the wordlist based on target's domain naming conventions. Such words are either whole subdomain levels, or - is used for a split on some subdomain level. For instance mapp1-current.datastream.example.com has mapp1, current, datastream words. To prevent the overflow, user-defined word length is used for word extraction. The default value is set to 6. This means that only words strictly longer than 5 characters are included (from the previous example, mapp1 does not satisfy this condition).

Resources

TO DO

  • Improve README
  • Tests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dnsgen-1.0.4.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dnsgen-1.0.4-py2.py3-none-any.whl (6.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file dnsgen-1.0.4.tar.gz.

File metadata

  • Download URL: dnsgen-1.0.4.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

File hashes

Hashes for dnsgen-1.0.4.tar.gz
Algorithm Hash digest
SHA256 1087e9e5c323918aa3511e592759716116a208012aee024ffdbeac5fce573a0c
MD5 fde21e8ba2b85abee22b1b4b6fa2a7f1
BLAKE2b-256 5fe11c7d86f51da5b93f3f99ac99e3ad051ed82234147ddd869f77a3959e6abc

See more details on using hashes here.

File details

Details for the file dnsgen-1.0.4-py2.py3-none-any.whl.

File metadata

  • Download URL: dnsgen-1.0.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

File hashes

Hashes for dnsgen-1.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1269a7fb5a5195e996142045504b0072bd7d47b952ccfedc8e2baf2a83aed70c
MD5 ce4be5388687491e8f7a14f8b203f1c5
BLAKE2b-256 09e20022d0e6c3fa892ef378185d01fc1d3482910528664e5214342d26967be7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page