A simple yet secure password generator implemented in Python. This tool generates passwords that include uppercase letters, lowercase letters, digits, and special characters, ensuring strong password creation. It also evaluates the strength of the generated password.
- User-Friendly Input: Only asks for the desired password length.
- Comprehensive Character Inclusion: Automatically includes at least one character from each category:
- Uppercase letters
- Lowercase letters
- Digits
- Special characters
- Password Strength Evaluation: Provides an assessment of the password's strength based on length and character variety.
- Randomized Output: Shuffles characters to ensure password randomness and unpredictability.
- Error Handling: Gracefully handles invalid inputs with informative messages.
- Python 3.x installed on your system.
- Access to a command-line interface or terminal.
-
Clone the Repository
git clone https://github.com/MegaByteKnight/secure-password-generator.git cd secure-password-generator
-
Run the Script
python password_generator.py
-
Follow the On-Screen Prompts
- Enter the desired password length when prompted (minimum length is 4).
- The script will generate a password and display its strength.
Welcome to the Secure Password Generator!
Enter the desired password length (minimum 4): 12
Generated Password: vI9;KdP!x2&Q
Password Strength: Very Strong
- Very Strong: Password is 12 or more characters long and includes all four character types.
- Strong: Password is at least 8 characters long and includes at least three character types.
- Medium: Password is at least 6 characters long and includes at least two character types.
- Weak: Password does not meet the above criteria.
The script consists of two main functions:
generate_password(length)
- Validates the password length.
- Selects one character from each category to ensure inclusivity.
- Fills the rest of the password with random characters.
- Shuffles the characters to prevent patterns.
- Returns the generated password.
calculate_strength(password)
- Checks for the presence of different character types.
- Determines the strength based on length and character variety.
- Returns the strength level as a string.
- Adjust Character Sets
- Modify the character sets in the
generate_password
function to include or exclude specific characters.
- Modify the character sets in the
- Modify Strength Criteria
- Adjust the conditions in the
calculate_strength
function to change how the strength is evaluated.
- Adjust the conditions in the
- GUI Version
- Implement a graphical user interface using libraries like Tkinter for a more user-friendly experience.
- Save Passwords
- Add functionality to save generated passwords to a secure file.
- Password Policies
- Allow users to input custom password policies or complexity requirements.
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or suggestions.
Brian Sawyer