-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
77 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,87 +1,98 @@ | ||
```markdown | ||
# Password Strength Analyzer | ||
|
||
A Python-based security tool that analyzes password strength based on various security criteria. | ||
## Overview | ||
A Python-based security tool that analyzes password strength using multiple criteria to help users create more secure passwords. This tool evaluates passwords based on length, complexity, common patterns, and known vulnerable passwords. | ||
|
||
## Features | ||
|
||
- Checks password length (minimum 8 characters) | ||
- Verifies presence of uppercase letters | ||
- Verifies presence of lowercase letters | ||
- Checks for numbers | ||
- Validates special characters | ||
- Detects common password patterns | ||
- Provides detailed feedback and strength percentage | ||
- Secure password input (hidden while typing) | ||
- Password length validation | ||
- Character complexity checking (uppercase, lowercase, numbers, special characters) | ||
- Common password pattern detection | ||
- Dictionary attack resistance checking | ||
- Strength score calculation | ||
- Detailed feedback and improvement suggestions | ||
|
||
## Requirements | ||
- Python 3.7+ | ||
- Required Python packages: | ||
```bash | ||
pip install re | ||
pip install string | ||
``` | ||
|
||
## Installation | ||
|
||
1. Clone the repository: | ||
```bash | ||
git clone https://github.com/yourusername/password_strength_analyzer.git | ||
cd password_strength_analyzer | ||
|
||
2. No additional dependencies required (uses Python standard library) | ||
1. Clone the repository | ||
```bash | ||
git clone https://github.com/yourusername/password_strength_analyzer.git | ||
``` | ||
2. Navigate to the project directory | ||
```bash | ||
cd password_strength_analyzer | ||
``` | ||
3. Run the program | ||
```bash | ||
python password_analyzer.py | ||
``` | ||
|
||
## Usage | ||
```python | ||
# Import the analyzer | ||
from password_analyzer import PasswordStrengthAnalyzer | ||
|
||
Run the script using Python: | ||
```bash | ||
python password_analyzer.py | ||
``` | ||
|
||
Follow the prompts to enter passwords for analysis. | ||
# Create an analyzer instance | ||
analyzer = PasswordStrengthAnalyzer() | ||
|
||
## Security Criteria | ||
# Check password strength | ||
result = analyzer.analyze_password("YourPassword123!") | ||
|
||
The analyzer evaluates passwords based on the following criteria: | ||
- Minimum length of 8 characters | ||
- Presence of uppercase letters | ||
- Presence of lowercase letters | ||
- Inclusion of numbers | ||
- Use of special characters | ||
- Absence of common patterns | ||
|
||
## Output | ||
# Get the results | ||
print(result['score']) # Prints the strength score (0-100) | ||
print(result['feedback']) # Prints detailed feedback | ||
``` | ||
|
||
The tool provides: | ||
- Detailed feedback for each security criterion | ||
- Overall strength percentage | ||
- Password strength verdict (Weak/Moderate/Strong) | ||
## Password Strength Criteria | ||
- **Length**: Minimum 8 characters recommended | ||
- **Complexity**: | ||
- Uppercase letters (A-Z) | ||
- Lowercase letters (a-z) | ||
- Numbers (0-9) | ||
- Special characters (!@#$%^&*) | ||
- **Common Patterns**: Checks for: | ||
- Keyboard patterns (qwerty, 12345) | ||
- Repeated characters | ||
- Sequential patterns | ||
|
||
## Score Interpretation | ||
- 0-20: Very Weak | ||
- 21-40: Weak | ||
- 41-60: Moderate | ||
- 61-80: Strong | ||
- 81-100: Very Strong | ||
|
||
## Example Output | ||
``` | ||
Password: "Example123!" | ||
Score: 75/100 | ||
Feedback: | ||
✓ Good length | ||
✓ Contains uppercase letters | ||
✓ Contains lowercase letters | ||
✓ Contains numbers | ||
✓ Contains special characters | ||
! Consider avoiding common word patterns | ||
``` | ||
|
||
## Contributing | ||
Contributions are welcome! Please feel free to submit a Pull Request. | ||
|
||
1. Fork the repository | ||
2. Create your feature branch (`git checkout -b feature/AmazingFeature`) | ||
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`) | ||
4. Push to the branch (`git push origin feature/AmazingFeature`) | ||
5. Open a Pull Request | ||
``` | ||
|
||
6. Create a .gitignore file: | ||
```bash | ||
touch .gitignore | ||
``` | ||
|
||
7. Add the following to .gitignore: | ||
``` | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
.DS_Store | ||
``` | ||
|
||
8. Initialize git repository and make your first commit: | ||
```bash | ||
git init | ||
git add . | ||
git commit -m "Initial commit: Password Strength Analyzer" | ||
``` | ||
|
||
9. Create a new repository on GitHub and push your code: | ||
```bash | ||
git remote add origin https://github.com/yourusername/password_strength_analyzer.git | ||
git branch -M main | ||
git push -u origin main | ||
``` | ||
|
||
|
||
## Security Considerations | ||
- This tool is for educational purposes | ||
- Never store or log actual passwords | ||
- Use secure password hashing in production environments | ||
- Regular updates recommended for security patterns |