diff --git a/Random_Password_Generator/PasswordGenerator.py b/Random_Password_Generator/PasswordGenerator.py new file mode 100644 index 0000000..eace150 --- /dev/null +++ b/Random_Password_Generator/PasswordGenerator.py @@ -0,0 +1,60 @@ +import random + +chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()-=_+`~[]{]\|;:,<.>/?' + +welcomeMessage = "Welcome to the Password Generator!" +detailsMessage = "This program will generate a secure password using a random arrangement of letters (CAPS ON & caps off), numbers, and punctuations." +creatorMessage = "Created by Professor Renderer on October 3rd, 2018." + +print(welcomeMessage + '\n' + detailsMessage + '\n' + creatorMessage + '\n') + +exitMessage = 0 +passwordGeneratorUsage = 1 +passwordGeneratorPrompt = 1 + + +while exitMessage != 1: + + while passwordGeneratorUsage == 1: + + passwordGeneratorPrompt = 1 + + passwordNum = input('How many passwords would you like to generate? ') + passwordNum = int(passwordNum) + + + passwordLength = input('How long will the password(s) be? ') + passwordLength = int(passwordLength) + + print('\n') + print('Here are your password(s): \n') + + passwordFile = open('Passwords.txt', 'w') + for p in range(passwordNum): + password = '' + for c in range(passwordLength): + password += random.choice(chars) + print(password) + passwordFile.write(password + '\n') + passwordFile.close() + print('\n') + + while passwordGeneratorPrompt == 1: + + getContinue = input('Do you want to use the Password Generator again? (Y/N)') + print('\n') + + if getContinue == "Y" or getContinue == "y": + passwordGeneratorPrompt = 0 + print('\n') + elif getContinue == "N" or getContinue == "n": + exitMessage = 1 + passwordGeneratorUsage = 0 + passwordGeneratorPrompt = 0 + else: + print("Please enter 'Y' or 'N.'\n") + + +print('\n') +print('Thank you for using the Password Generator. Have a nice day!') + diff --git a/Random_Password_Generator/Passwords.txt b/Random_Password_Generator/Passwords.txt new file mode 100644 index 0000000..5878f60 --- /dev/null +++ b/Random_Password_Generator/Passwords.txt @@ -0,0 +1,20 @@ +AaGhi>]!Tkz0{ik0S)mUk7wuVdpSIkc:8V{q)e_*N +!+B.C;YJ4+;/_$g>]FK/^vD]X +I[dgz&|>uoh(K:-i;xgE:F!!C +$Ab\ag_?lD57,L]Gf3(]j04aw +nCC&RS7K]]GK(%pDHr,>fyv?[ +|VT3$kK5AGir))o9A6+ApR`%X +:T<0],Kzm] +XVp,+V.ko[c/-C3M22*+p@J3> +zTR_S+lDuRn|MwGIVGFwu]pgH +]p_8k1Z03$8]aJL@o^kY$#(Ez +MGe:td4Ql~cZY&G.]u$IK){(p +/&1>(jI|SEdg*L6$Zz,NfetZp +1dN6clgIgi-EfIYB@cn>#^mix +)cci)3*:0l$lNZ*Upi3ME?-C] +XC$#Rc*B+/Jr diff --git a/Random_Password_Generator/README.md b/Random_Password_Generator/README.md new file mode 100644 index 0000000..587dcb2 --- /dev/null +++ b/Random_Password_Generator/README.md @@ -0,0 +1,20 @@ +# Random Password Generator +This program randomly generates a secure password using a mix of letters, both caps on and off, numbers, and punctuation, then outputs the results and saves them as a text document. + +# Requirements + +Python 3 and higher or Python 2 and higher + +# Usage + +For Windows users: + +```bash +$ python PasswordGenerator.py +``` + +For Mac/Linux/Unix users: + +```bash +$ ./PasswordGenerator.py +``` \ No newline at end of file