PassStr is a Python-based tool that checks if a given password is part of a known leaked password dataset and evaluates its strength. It provides feedback to help users create stronger, safer passwords.
- Verifies if the password’s SHA-1 hash is present in a sorted file of leaked passwords (
Password_Hashes.txt) using binary search.
- Evaluates password strength based on:
- Length: Scores higher for passwords 8 characters or longer.
- Uppercase Letters: Checks for the presence of at least one uppercase letter.
- Lowercase Letters: Checks for the presence of at least one lowercase letter.
- Digits: Ensures the inclusion of numeric characters.
- Special Characters: Looks for symbols like
@,#,$, etc.
- Utilizes binary search for quick detection in large datasets of leaked passwords.
The repository includes a comprehensive dataset of leaked passwords in SHA-1 hash format. The following files are part of the dataset:
10k-most-common.txt10-million-password-list-top-1000000 (1).txt100k-most-used-passwords-NCSC.txt1900-2020.txtbt4-password.txtcommon_corporate_passwords.txtcommon-passwords-win.txtdarkc0de.txtdays.txtmedical-devices.txtmonths.txtMost-Popular-Letter-Passes.txtmssql-passwords-nansh0u-guardicore.txtopenwall.net-all.txtprobable-v2-top12000.txtrockyou.txtscraped-JWT-secrets.txtseasons.txtunkown-azul.txtUserPassCombo-Jay.txtxato-net-10-million-passwords.txt
The full dataset is available as a single file: Password_Hashes.txt. Download this file and place it in the same directory as the script before running the program.
- Python 3.7 or higher
- Clone the repository:
git clone https://github.com/basimnawaz6/PassStr.git cd PassStr - Download the
Password_Hashes.txtfile and place it in the same folder as the script. - Run the program:
python PassStr.py
- Run the script:
python PassStr.py
- Enter the password to check when prompted.
The program will:
- Indicate if the password is leaked or safe.
- If safe, assess the password's strength and provide feedback.
Enter the password to check: password123
❌ Password is already leaked (Not Safe).
Enter the password to check: My$tr0ngP@ssword
✅ Password not leaked (Safe).
Password Strength: Very Strong
- Password Hashing:
- The entered password is hashed using SHA-1.
- Leak Detection:
- The hashed password is checked against a pre-sorted list of leaked SHA-1 hashes using binary search.
- Strength Assessment:
- The password’s strength is calculated based on its length, complexity, and character variety.
- Feedback on strength is displayed to the user.
This tool is for educational purposes only. Do not use it for malicious or illegal activities.