Skip to main content

Crate libbruteforce

Crate libbruteforce 

Source
Expand description

This library helps you to brute force hashes (e.g. passwords). It includes a set of pre-configured hashing functions, like md5 (crate::hash_fncs::md5_hashing), sha1 (crate::hash_fncs::sha1_hashing), or sha256 (crate::hash_fncs::sha256_hashing). You can also provide your own hashing function. PLEASE DO NOT use this software to harm someones privacy in any kind! This project was made for fun and for teaching myself new things about Rust.

The main function of this crate is crack<T: CrackTarget>().

§Minimal example

use libbruteforce::{BasicCrackParameter, CrackParameter, TargetHashInput};
use libbruteforce::hash_fncs::sha256_hashing;
use libbruteforce::symbols;

// sha256("a+c")
let sha256_hash = "3d7edde33628331676b39e19a3f2bdb3c583960ad8d865351a32e2ace7d8e02d";
let max_len = 3;
let min_len = 0;
let alphabet = symbols::Builder::new().with_digits().build();

let res = CrackParameter::new(
        BasicCrackParameter::new(alphabet, max_len, min_len, false),
        sha256_hashing(TargetHashInput::HashAsStr(sha256_hash)),
);

Modules§

hash_fncs
Pre-defined hashing functions that you might use.
symbols
This module contains prebuilt alphabets/symbols that you can use.

Structs§

BasicCrackParameter
Describes the necessary parameters for the crate::crack<T: CrackTarget>()-function without the generic part that is outsourced to crate::TargetHashAndHashFunction.
CrackParameter
Crack parameter for crate::crack<T: CrackTarget>().
CrackResult
Describes the result of a finished cracking process.
CrackResults
TargetHashAndHashFunction
Abstraction over a hashing algorithm and the target hash that needs to be cracked.

Enums§

TargetHashInput
Helper type to create instances of TargetHashAndHashFunction.

Traits§

CrackTarget
Common trait for crack targets (hashes or plain text to crack).

Functions§

crack
Start a multi-threaded brute force attack on a given target string.
crack_iter
Starts a multi-threaded brute force attack on a given target string that keeps search after a match.