From 25d6f8fbbfed0b64bdc39908da697e65af10057b Mon Sep 17 00:00:00 2001 From: Babajide Emmanuel Fakile <65244208+Gyde04@users.noreply.github.com> Date: Fri, 25 Oct 2024 22:39:16 +0100 Subject: [PATCH] Update README.md --- README.md | 143 +++++++++++++++++++++++++++++------------------------- 1 file changed, 77 insertions(+), 66 deletions(-) diff --git a/README.md b/README.md index 302d218..d6642fb 100644 --- a/README.md +++ b/README.md @@ -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