Skip to content

Commit

Permalink
Added v2.0.0 build
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtissfrost authored Dec 30, 2022
1 parent 15223a5 commit 66de32a
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions RNG_Password_V2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import random

lower = "abcdefghijklmnopqrstuvwxyz"
upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
numbers ="0123456789"
symbols = "!@#$%^&*()"

length = 0
while length < 8 or length > 16:
string = lower + upper + numbers + symbols
length = int(input("How many characters would you like to use? "))
print ("\n")
if length >= 8 and length <= 16:
password = "".join(random.sample(string,length))
else:
print ("Choose a number between 8 & 16.")



data = input ("Input the website you would like to generate a password for: ")
print (" ")
print ("You new password is:" + password + "\n")

try:
f=open('master.txt','a')
f.write(data)
f.write(" ")
f.write(password)
f.write("\n")
except Exception as e:
print ("Error:", str(e))
finally:

f.close()

0 comments on commit 66de32a

Please sign in to comment.