This program implements a basic brute force password hash cracker that attempts to match user-provided hashes to their corresponding passwords. The program is designed to demonstrate how hash cracking can work, using user-input hashes and brute-force attempts with customizable password lengths and character sets.
- Accepts user-provided hashes and passwords for testing.
- Reads additional hash-password pairs from a CSV file.
- Uses SHA256 to hash password attempts for comparison.
- Employs a brute-force algorithm to generate possible passwords based on a specified character set and length range.
- Reports whether the password hash was successfully cracked.
- Measures and displays the time taken for the brute force process.
password-hash-cracker/
├── README.md # Documentation for the project
├── Bruteforce.py # Main script for hash cracking
├── sha256_hashes.csv # Sample CSV file with hashes and passwords
Ensure the following are installed and available in your environment:
- Python 3.x
- Standard Python libraries:
itertools
csv
time
hashlib
- User Input: The program prompts the user to input the number of hash-password pairs they want to provide.
- CSV File: The program reads additional hash-password pairs from a file named
sha256_hashes.csv
. - Brute Force: For each hash, the program attempts to brute force the corresponding password by generating all possible combinations of characters within a specified length range.
- Comparison: The generated hash is compared to the provided hash. If a match is found, the password is "cracked"; otherwise, the program continues until a maximum attempt limit is reached.
- Output: The program prints whether the cracking attempt was successful for each hash and reports the time taken for the process.