Simple hashcat clone.
CLI Rust program that imitates hashcat that was written as part of mu Rust learning journey.
It is not a part of any guide or anything like that, it is a personal goal.
First You need to compile this program:
cargo build --releaseIf You got the binary You can run this for brute force mode
./minihashcat example.txtIf You'd like to use a wordlist run:
./minihashcat example.txt -w your_wordlist_file.txtExample file contains greeting in polish 😉
If You want to write your result to file You can do:
./minihashcat example.txt -v no > result.txtFor list of optional arguments and defaults use:
./minihashcat --helpUsage: minihashcat [OPTIONS] <HASH_FILE>
Arguments:
<HASH_FILE> File containing hash to compare to Supported extensions: *.txt
Options:
-t, --threads <THREADS> Number of threads used for hashing [default: std::threads::available_parallelism() - 1]
-w, --wordlist-file <WORDLIST_FILE> File containing wordlist. Supported extensions: *.txt
-a, --algorithm <ALGORITHM> Algorithm used for hashing. [default: SHA-2 256]
--min <MIN> Minium length of cracked String [default: 4]
--max <MAX> Maximum length of cracked String [default: 16]
-v, --verbose <VERBOSE> Does program have to run in verbose mode. [supported: Yes / No] [default: Yes]
-h, --help Print help
-V, --version Print version
For now it supports:
- Multithreading
- BruteForce
- Wordlist files
Algorithms:
- MD2
- MD4
- MD5
- SHA-2 256
- SHA-2 384
- SHA-2 512
- SHA-3 256
- SHA-3 384
- SHA-3 512
This program helped me learn how to handle:
- Multithreading
- Error Handling
- Pattern matching
- Interface building with
trait - Anonymous functions
The following libraries were used:
clapfor CLI interfacecrossbeam::channelas alternative tostd::sync::mpscletting me to limit number of accepted messages- hash algorithms from RustCrypto/hashes collection.