Password Security Checker
A Python-based CLI tool to check the security of a password. The tool checks whether a password has been pwned (compromised in data breaches), identifies common weak passwords, and provides recommendations on how to improve the password's security.
Features
- Pwned Password Check: Uses the HaveIBeenPwned API to check if a password has been compromised.
- Common Password Detection: Checks if the password is a commonly used weak password using a local comparison file.
- Security Recommendations: Provides feedback based on password length, complexity, and structure.
Project Structure
pwchecker/
├── pwchecker.py # Main Python script
├── common_passwords.txt # Common passwords Text File for Comparison
├── setup.py # Setup file for installing the CLI tool
├── README.md # This file
└── requirements.txt # Required libraries for this project
Prerequisites
- Python 3.x: Make sure Python 3.x is installed on your system.
- Required Libraries: Install the libraries listed in the
requirements.txtfile.
Installation
-
Clone the repository:
git clone https://github.com/yourusername/pwchecker.git cd pwchecker -
Install dependencies:
pip install -r requirements.txt
Usage
CLI
To use the password checker via the command line, you can either pass the password as an argument or enter it when prompted.
-
Pass the password as a command-line argument:
pwchecker "your_password" -
Without an argument (you'll be prompted to enter the password):
pwchecker
Sample Output
The output will include:
- A Pwned Password Warning if the password has been found in known data breaches.
- A Common Password Warning if the password matches any commonly used passwords.
- Security Recommendations if the password does not meet recommended security standards.
Example:
⚠️ WARNING: This password does not meet the recommended security standards:
⚠️ WARNING: - Password should be at least 12 characters long.
⚠️ WARNING: - Password should contain at least one special character.
---
Good news: This password has not been found in any known data breaches.
Security and Privacy
The tool is designed to prioritize user privacy and security:
- Client-Side Hashing: Passwords are hashed locally before querying the HaveIBeenPwned API. Only the first 5 characters of the SHA-1 hash are sent to the API, ensuring that the original password is never exposed.
- Local Password Comparison: Common password checks are performed locally using
common_passwords.txt, so no data is sent externally.
License
This project is licensed under the MIT License.
Contributing
Contributions are welcome! Please submit a pull request or open an issue if you would like to contribute.
Disclaimer: This tool is for educational and personal use only. Always follow security best practices when handling passwords, and never share sensitive information.
Release files for pwchecker 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pwchecker-1.0.0.tar.gz | 5.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pwchecker-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:11.2 kB
Release files / pwchecker-1.0.0.tar.gz
| Download URL | pwchecker-1.0.0.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
46ca92825ef4818659211d1f4029c4b33a1df9d1bc45c73c15ed00353b8e3c49
|
|
BLAKE2b-256 checksum How to use checksums |
6deeaa494b92768da9c8f26eeae799b1cbfefd1413e3ff616f746bda835c09d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.13.0
|
Release files / pwchecker-1.0.0-py3-none-any.whl
| Download URL | pwchecker-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
40024dd4e4bef0c07db385838d5367e1ab56dbba5e34f99e5fbd5c9c7543052d
|
|
BLAKE2b-256 checksum How to use checksums |
7d820722d7039f0880bbd013006e5ddf92581e41411edf8f876ef2e4d00ab9c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.13.0
|