A CLI tool to check password security and if it has been pwned.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pwchecker-1.0.0.tar.gz.
File metadata
- Download URL: pwchecker-1.0.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46ca92825ef4818659211d1f4029c4b33a1df9d1bc45c73c15ed00353b8e3c49
|
|
| MD5 |
c13bf9ec150a6f15f60316432e2615f6
|
|
| BLAKE2b-256 |
6deeaa494b92768da9c8f26eeae799b1cbfefd1413e3ff616f746bda835c09d5
|
File details
Details for the file pwchecker-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pwchecker-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40024dd4e4bef0c07db385838d5367e1ab56dbba5e34f99e5fbd5c9c7543052d
|
|
| MD5 |
485fee006a9a35e67cc4064283891a76
|
|
| BLAKE2b-256 |
7d820722d7039f0880bbd013006e5ddf92581e41411edf8f876ef2e4d00ab9c0
|