WordListGenerator (version 0.1.0) | index WordListGenerator.py |
This package builds custom WordLists (for BruteForce).
>>> from io import BytesIO, StringIO
>>> wordlist = WordList(
... {
... "%(123)": PatternEnumerator("123", "123", False, None),
... "%(aAbBc)": PatternEnumerator("aAbBc", "A[a-c]B", False, None),
... "%(words)": PatternEnumerator("words", "(word1|word2)", False, None),
... "%(file)": PatternEnumerator("file", None, True, "test.txt"),
... },
... max_words=5
... )
>>> wordlist.output = StringIO()
>>> wordlist.output.close = lambda: None
>>> wordlist.patterns["%(123)"].build_chars()
>>> wordlist.patterns["%(aAbBc)"].build_chars()
>>> wordlist.patterns["%(words)"].build_chars()
>>> wordlist.patterns["%(file)"].build_chars()
>>> wordlist.run("A%(aAbBc)B%(file)C%(num)%(words)D")
>>> len(wordlist.output.getvalue().split())
5
>>>
~# python3.11 WordListGenerator.py -e "a=[1-3]" -p 'ABC%(a){2}'
ABC22
ABC23
ABC21
ABC32
ABC33
ABC31
ABC12
ABC13
ABC11
~# python3.11 WordListGenerator.py -w "b=test.txt" -e "123" -p '%(b)%(123)'
abcc13
abcc11
abcc12
abcc33
abcc31
abcc32
abcc23
abcc21
abcc22
abcb13
abcb11
abcb12
abcb33
abcb31
abcb32
~# python3.11 WordListGenerator.py -w "b=test.txt" -e "a=123" -t 0.0004 -p '%(b)%(a)'
abcc11
abcc12
abcc13
abcc31
abcc32
abcc33
abcc21
abcc22
abcc23
abcb11
abcb12
abcb13
abcb31
abcb32
abcb33
~# python3.11 WordListGenerator.py -w "b=test.txt" -e "a=123" -m 5 -p '%(b)%(a)'
abcc13
abcc12
abcc11
abcc33
abcc32
~# python3.11 WordListGenerator.py -w "b=test.txt" -e "123" -m 5 -p '%(b)%(123)' -E ascii -f "abc.txt"
~# python3.11 WordListGenerator.py -e "123" -p 'ABC%(123)' -E ascii -d ","
ABC3,ABC1,ABC2,
~#
Tests:
~# python3 -m doctest -v WordListGenerator.py
40 tests in 16 items.
40 passed and 0 failed.
Test passed.
Modules | ||||||
|
Classes | ||||||||||||||||||
|
Data | ||
__all__ = ['PatternEnumerator', 'WordList'] __author_email__ = 'mauricelambert434@gmail.com' __copyright__ = '\nWordListGenerator Copyright (C) 2021, 2022 Ma...ome to redistribute it\nunder certain conditions.\n' __description__ = 'This package builds custom WordLists (for BruteForce).' __maintainer__ = 'Maurice Lambert' __maintainer_email__ = 'mauricelambert434@gmail.com' __url__ = 'https://github.com/mauricelambert/WordListGenerator' |
Author | ||
Maurice Lambert |