Hashassin is a Rust-based command-line tool for generating passwords, hashing them using various algorithms, and dumping hash data. It is designed to be fast, efficient, and highly configurable, leveraging multi-threading and modern cryptographic libraries.
- Password Generation: Generate random passwords with customizable length, number, and output options.
- Hash Generation: Hash passwords using algorithms like MD5, SHA-256, SHA-512, and Scrypt.
- Hash Dumping: Parse and display hash data from files in a structured format.
- Multi-threading: Utilize multiple threads for faster processing.
- Extensible: Built with modularity in mind, making it easy to add new features or algorithms.
-
Clone the repository:
git clone https://github.com/your-username/Password-Hashing-Rust.git cd Password-Hashing-Rust -
Build the project:
cargo build --release
-
The compiled binary will be available in the
target/releasedirectory.
Hashassin provides three main commands: gen-passwords, gen-hashes, and dump-hashes. Below are examples of how to use each command.
Generate random passwords and optionally save them to a file.
./hashassin gen-passwords --chars 8 --num 100 --threads 4 --out-file passwords.txt--chars: Number of characters per password (default: 4).--num: Number of passwords to generate.--threads: Number of threads to use (default: 1).--out-file: Path to save the generated passwords (optional).
Hash passwords from an input file and save the hashes to an output file.
./hashassin gen-hashes --in-file passwords.txt --out-file hashes.txt --threads 4 --algorithm sha256--in-file: Path to the input file containing passwords.--out-file: Path to save the generated hashes.--threads: Number of threads to use (default: 1).--algorithm: Hashing algorithm to use (md5,sha256,sha512, orscrypt).
Parse and display hash data from a file.
./hashassin dump-hashes --in-file hashes.txt--in-file: Path to the file containing hash data.
./hashassin gen-passwords --chars 12 --num 10 --out-file passwords.txt./hashassin gen-hashes --in-file passwords.txt --out-file hashes.txt --algorithm sha512./hashassin dump-hashes --in-file hashes.txtThe tool uses the RUST_LOG environment variable for logging. To enable detailed logs, set the environment variable before running the tool:
export RUST_LOG=trace- Rust (edition 2024)
- Cargo
-
Build the project:
cargo build
-
Run the tool:
cargo run -- <command> [options]
Run the tests using:
cargo testPassword-Hashing-Rust/
├── cli/ # Command-line interface
│ ├── src/
│ │ ├── main.rs # Entry point for the CLI
│ │ ├── gen_passwords.rs # Password generation logic
│ │ ├── gen_hashes.rs # Hash generation logic
│ │ ├── dump_hashes.rs # Hash dumping logic
│ └── Cargo.toml # CLI dependencies
├── core/ # Core library
│ ├── src/
│ │ ├── lib.rs # Core library entry point
│ │ ├── args.rs # Argument parsing and enums
│ │ ├── utility.rs # Utility functions and traits
│ └── Cargo.toml # Core library dependencies
├── Cargo.toml # Workspace configuration
└── README.md # Project documentation
- Clap: Command-line argument parsing.
- Rand: Random number generation.
- Sha2: SHA-256 and SHA-512 hashing.
- Sha3: SHA-3 hashing.
- Scrypt: Scrypt password hashing.
- Tracing: Logging and diagnostics.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
Happy hashing! 🎉