a script for generating passwords using upper-case letters, lower-case letters, numbers and special characters.
- Manual Save Option: After generating the password, the user is prompted with a yes/no option to decide if they want to save the password to a file.
- Custom File Path: If the user chooses to save, they can enter a custom file path. If no path is entered, it defaults to
password.txt
. - No Automatic Save: The password is only saved if the user chooses to do so.
- Error Handling: There's basic error handling for file saving, printing a message if there's an issue with saving.
- Run the script, and it will generate the password and display it.
- To run use:
python3 genPassword.py
- You'll be asked if you want to save it. If you type "yes," you'll be prompted for a file path. If you type "no," the password won't be saved.
- You can specify the desired password length as well.
password_length = 16 # You can set this to any length