A high-performance Python tool for generating password wordlists based on keyboard walking patterns (e.g., 1qaz, xsw2, qwer). This tool is optimized for speed using buffered I/O and C-based iterators to handle massive lists (33M+ combinations) efficiently.
kbwalk.py: The all-in-one generator with built-in hashing support.LICENSE: BSD-2-Clause License.
- High Performance: Uses
itertoolsand buffered writing to generate ~33 million lines in seconds. - Modes: Supports Vertical (
1qaz), Horizontal (qwerty), or Both. - Multi-Hashing: Can generate NTLM, MD5, SHA1, or SHA256 hashes directly to skip piping overhead.
- Progress Bar: Includes an optional, high-speed progress bar (requires
tqdm). - Flexible Output: Supports raw hash lists or
password:hashformat.
The script runs on standard Python 3 libraries. However, for a real-time progress bar, you can install tqdm:
pip install tqdm
If tqdm is not installed, the script automatically falls back to a simple text counter.
Generate the classic 33 million vertical keyboard walk list:
python3 kbwalk.py -m v -f wordlist.txt
Generate a horizontal walk list (length 4) and print to STDOUT (for piping):
python3 kbwalk.py -m h -l 4
Generate a list of all possible walks and patterns(~7.5 billion) and encrypt the file:
python3 kbwalk.py -m a --direction both | pigz > comprehensive-walks.txt.gz # pigz is multi-threaded gzip
# if you only have gzip
python3 kbwalk.py -m a --direction both | gzip > comprehensive-walks.txt.gzGenerate a list of NTLM hashes directly (useful for Windows auditing):
python3 kbwalk.py -m v --hash ntlm -f ntlm_hashes.txt
Generate MD5 hashes:
python3 kbwalk.py -m v --hash md5 -f md5_hashes.txt
Generate in password:hash format for verification:
python3 kbwalk.py -m v --hash sha1 --format pwd:hash -f combos.txt
-h,--help: Show the help menu, explaining basic flag options and usage.-m,--mode: Pattern mode logic:v= Vertical (Columns)h= Horizontal (Rows)d= Diagonal (Cross/X patterns)b= Both (Vertical + Horizontal)a= All (Vertical + Horizontal + Diagonal)
-f,--file: Output filename (optional, prints to STDOUT if omitted).--segments: Number of segments to combine in a single password (Default: 4).-l,--length: Length of individual horizontal walk segments (Default: 4).--direction: Direction of the keyboard walks (forward,reverse, orboth).--pattern: logic for how segments are combined:standard: Randomly mixes all selected segments.zigzag: Alternates Forward → Reverse → Forward.reverse_zigzag: Alternates Reverse → Forward → Reverse.
--hash: Hashing algorithm to apply (ntlm,md5,sha1,sha256,none).--format: Output format (plain= hash only,pwd:hash= password and hash).
This tool is designed for security research, authorized penetration testing, and educational purposes only. The authors are not responsible for misuse.
Original Author: Ronald Broberg
Edited by: Austin Scott & Anton Hibl