Add wordlist cracking feature to crackbtcshell#38
Open
procGro wants to merge 4 commits intoalbertobsd:mainfrom
Open
Add wordlist cracking feature to crackbtcshell#38procGro wants to merge 4 commits intoalbertobsd:mainfrom
procGro wants to merge 4 commits intoalbertobsd:mainfrom
Conversation
This commit introduces the ability to use a wordlist for cracking mkey and ckey entries. New features: - `load wordlist <filename.txt>`: Loads passwords from the specified file. - `set crackmode wordlist`: Switches the cracking engine to use passwords from the loaded list. The cracking process is multi-threaded for both AESNI and legacy CPU modes. Passwords from the list are converted to 32-byte keys by zero-padding if shorter or truncating if longer. The README.md has been updated to include documentation for these new commands, usage examples, and instructions on how to test specific passwords from a wordlist using the existing `try key` command with manual key preparation. Optimizations include correct work distribution for threaded wordlist processing and minor memory management improvements.
This commit updates the README.md file to include comprehensive installation instructions for compiling your project on Linux and Windows.
Key changes:
- Replaced the TODO placeholder for build instructions with a new "Installation" section.
- Added detailed steps for Debian/Ubuntu-based Linux distributions, including dependencies (`yasm`, `build-essential`) and compilation commands.
- Provided guidance for other Linux distributions on installing necessary packages.
- Added detailed steps for Windows using MSYS2 and MinGW-w64, covering:
- MSYS2 setup.
- Installation of the MinGW-w64 toolchain and YASM.
- Potential Makefile adjustments required for YASM flags on Windows.
- Compilation commands.
The instructions aim to help you successfully build your project from source on these common operating systems.
This commit addresses several compilation errors and warnings that were present in `crackbtcshell.c`.
Fixes include:
- Added missing function prototypes for `thread_process_wordlist` and `thread_process_wordlist_legacy` to resolve "undeclared function" errors.
- Removed an unterminated comment block and an erroneous `free()` call within `thread_process_wordlist_legacy` that were causing syntax errors.
- Addressed warnings related to ignored `fread()` return values by:
- Implementing return value checks and error handling for critical `fread()` calls within the `extractmkey` functionality.
- Explicitly casting `fread()` return values to `(void)` for non-critical reads from `/dev/urandom` within thread functions to silence warnings.
These changes should allow the project to compile cleanly and improve code robustness.
This commit resolves a critical syntax error in `crackbtcshell.c` that was causing an "expected declaration or statement at end of input" error. The primary issue was related to the termination of the `thread_process_legacy_mixed` function. Corrections include: - Ensured `thread_process_legacy_mixed` is correctly terminated with balanced braces. - Fixed a memory leak by freeing `random_buffer` in `thread_process_legacy_mixed`. - Verified that function prototypes for wordlist processing functions are correctly in place. - Attempted to further address `-Wunused-result` warnings for `fread` calls from `/dev/urandom` by assigning the result to a volatile variable that is then cast to void. These changes are intended to allow the project to compile successfully and to reduce compiler warnings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit introduces the ability to use a wordlist for cracking mkey and ckey entries.
New features:
load wordlist <filename.txt>: Loads passwords from the specified file.set crackmode wordlist: Switches the cracking engine to use passwords from the loaded list.The cracking process is multi-threaded for both AESNI and legacy CPU modes. Passwords from the list are converted to 32-byte keys by zero-padding if shorter or truncating if longer.
The README.md has been updated to include documentation for these new commands, usage examples, and instructions on how to test specific passwords from a wordlist using the existing
try keycommand with manual key preparation.Optimizations include correct work distribution for threaded wordlist processing and minor memory management improvements.