This project is a simple Python-based password generator that creates strong, customizable passwords for any account. The script guarantees password complexity and saves each password with its account name to a local text file.
- Custom Length: Specify your desired password length (minimum 4 characters).
- Guaranteed Security: Each password includes at least one uppercase letter, one lowercase letter, one digit, and one symbol.
- Randomized Output: Passwords are shuffled for extra security.
- Account Tagging: Assign each password to an account name (e.g., Gmail, Facebook).
- Automatic Saving: Passwords and their associated accounts are saved to
passwords.txt
for easy reference.
-
Clone or Download the Script
- Save the code as
password_generator.py
.
- Save the code as
-
Run the Script python password_generator.py or python3 password_generator.py
-
Follow the Prompts
- Enter the desired password length (minimum 4).
- Specify what the password is for (e.g., Facebook, Gmail).
- Get Your Password
- The generated password will be displayed and saved to a file named
passwords.txt
in the same directory.
Enter the length of your password (min 4): 12 What is this password for? (e.g., Facebook, Gmail): github
Sucessfully generated password for Github: 8@tPz2w!qLrD Password saved to 'passwords.txt'.
Each generated password is stored in passwords.txt
as:
AccountName: password
Example:
Gmail: x7@Kq9!bLp2T
Facebook: 1!dEw3@GhTzP
- Keep your
passwords.txt
file safe! - It contains all your generated passwords in plain text.
- For extra security, consider encrypting the file or using a dedicated password manager.
- Python 3.x (no external libraries required)
Feel free to fork this repository and submit pull requests for improvements or new features!
This project is open-source and available under the MIT License.
Made with β€οΈ by Syed Afaq Gilani in Python Try it now and beat the odds! π