Skip to content
Permalink
eddc339da1
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
42 lines (31 sloc) 1.93 KB
# Brute Forcing A Password
## Overview
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.
## Features
- 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.
## Repository Structure
```
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
```
## Prerequisites
Ensure the following are installed and available in your environment:
- Python 3.x
- Standard Python libraries:
- `itertools`
- `csv`
- `time`
- `hashlib`
## How It Works
1. **User Input**: The program prompts the user to input the number of hash-password pairs they want to provide.
2. **CSV File**: The program reads additional hash-password pairs from a file named `sha256_hashes.csv`.
3. **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.
4. **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.
5. **Output**: The program prints whether the cracking attempt was successful for each hash and reports the time taken for the process.