Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revises --fuzzers argument docs #198

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ venv/
.idea
*.pyc
*.swp
# VSCode project directory
.vscode
9 changes: 7 additions & 2 deletions dnstwist.py
Original file line number Diff line number Diff line change
Expand Up @@ -1081,13 +1081,15 @@ def run(**kwargs):
'''typosquatting, fraud and brand impersonation.''',
formatter_class=lambda prog: argparse.HelpFormatter(prog,max_help_position=30)
)

_default_fuzzers = ['addition', 'bitsquatting', 'cyrillic', 'homoglyph', 'hyphenation',
'insertion', 'omission', 'repetition', 'replacement', 'subdomain',
'transposition', 'vowel-swap', 'dictionary', 'tld-swap', 'various']
parser.add_argument('domain', help='Domain name or URL to scan')
parser.add_argument('-a', '--all', action='store_true', help='Print all DNS records instead of the first ones')
parser.add_argument('-b', '--banners', action='store_true', help='Determine HTTP and SMTP service banners')
parser.add_argument('-d', '--dictionary', type=str, metavar='FILE', help='Generate more domains using dictionary FILE')
parser.add_argument('-f', '--format', type=str, default='cli', help='Output format: cli, csv, json, list (default: cli)')
parser.add_argument('--fuzzers', type=str, metavar='LIST', help='Use only selected fuzzing algorithms (separated with commas)')
parser.add_argument('--fuzzers', type=str, metavar='LIST', nargs='?', default=', '.join(_default_fuzzers), help='Use only selected fuzzing algorithms (separated with commas).')
parser.add_argument('-g', '--geoip', action='store_true', help='Lookup for GeoIP location')
parser.add_argument('--lsh', type=str, metavar='LSH', nargs='?', const='ssdeep',
help='Evaluate web page similarity with LSH algorithm: ssdeep, tlsh (default: ssdeep)')
Expand Down Expand Up @@ -1183,6 +1185,9 @@ def signal_handler(signal, frame):
parser.error('argument --dictionary cannot be used with selected fuzzing algorithms (consider enabling fuzzer: dictionary)')
if args.tld and 'tld-swap' not in fuzzers:
parser.error('argument --tld cannot be used with selected fuzzing algorithms (consider enabling fuzzer: tld-swap)')
if not args.fuzzers:
parser.error('argument --fuzzers requires a comma-separated list of fuzzers.\nAvailable fuzzers: {}'
.format(', '.join(_default_fuzzers)))

nameservers = []
if args.nameservers:
Expand Down