#bruteforce #hashes #passwords


This library helps you to brute force hashes (e.g. passwords). It includes a set of pre-configured hashing functions, like md5 or sha256. 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.

9 stable releases (3 major)

4.0.1 Jan 29, 2022
3.0.1 Jan 29, 2022
3.0.0 Oct 19, 2021
2.2.2 Dec 6, 2020
1.0.1 Jan 11, 2020

#2 in #passwords

Download history 1/week @ 2023-06-07 1/week @ 2023-06-14 13/week @ 2023-06-21 21/week @ 2023-06-28 1/week @ 2023-07-12 2/week @ 2023-07-19 1/week @ 2023-08-02 13/week @ 2023-08-16 12/week @ 2023-08-23 2/week @ 2023-08-30 26/week @ 2023-09-06 10/week @ 2023-09-13 22/week @ 2023-09-20

60 downloads per month

MIT license


libbruteforce - A Rust library to brute force hashes with multiple threads

This library spawns a thread for each cpu on your system to brute force a password/hash. It offers built-in support for MD5, SHA1, and SHA256, but you can also provide your own hashing function as a parameter.

You can specify your own alphabet to limit search space or use the internally hard-coded symbols (the most common chars).


I did this project just for fun to learn new things. Please don't use it to do any harm to someone's privacy!

Maximum Performance

If you use this in a project: To let the Rust compiler produce a binary with maximum performance, follow the steps here:



Works On

Linux, MacOS, Windows (targets with Rusts standard library)

Performance Hint

Always execute binaries that use this library in release mode, e.g. cargo run --bin bench --release. Otherwise, the performance is really poor. For maximum Rust performance, see: https://deterministic.space/high-performance-rust.html

Example usage

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

/// Minimal example.
fn main() {
    // to get information about trace! logs (like progress) on the console

    let alphabet = symbols::Builder::new()

    // sha256("a+c")
    let sha256_hash = "3d7edde33628331676b39e19a3f2bdb3c583960ad8d865351a32e2ace7d8e02d";

    // the actual cracking
    let res = libbruteforce::crack(CrackParameter::new(
        BasicCrackParameter::new(alphabet, 3, 0, true),

    if let Some(solution) = res.solution() {
        println!("Password is: {}", solution);
        println!("Took {:.3}s", res.duration_in_seconds());

README on github: https://github.com/phip1611/bruteforcer Documentation on docs.rs: https://docs.rs/libbruteforce/


~13K SLoC