Skip to content

antonhibl/keyb-walking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Keyboard Walk Generator

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.

Files

  • kbwalk.py: The all-in-one generator with built-in hashing support.
  • LICENSE: BSD-2-Clause License.

Features

  • High Performance: Uses itertools and 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:hash format.

Installation

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.

Usage

1. Standard Wordlist Generation

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.gz

2. Hash Generation (Rainbow Tables)

Generate 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

Arguments

  • -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, or both).
  • --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).

Disclaimer

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

About

Keyboard-Walking Password Generator written in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages