Skip to content

koloiyolo/minihashcat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minihashcat

Simple hashcat clone.

About

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.

Examples

First You need to compile this program:

cargo build --release

If You got the binary You can run this for brute force mode

./minihashcat example.txt

If You'd like to use a wordlist run:

./minihashcat example.txt -w your_wordlist_file.txt
Example file contains greeting in polish 😉

If You want to write your result to file You can do:

./minihashcat example.txt -v no > result.txt

For list of optional arguments and defaults use:

./minihashcat --help
Usage: 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

Current state

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

What I learned

This program helped me learn how to handle:

  • Multithreading
  • Error Handling
  • Pattern matching
  • Interface building with trait
  • Anonymous functions

The following libraries were used:

  • clap for CLI interface
  • crossbeam::channel as alternative to std::sync::mpsc letting me to limit number of accepted messages
  • hash algorithms from RustCrypto/hashes collection.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages