-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
33 lines (33 loc) · 936 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import random
import time
import os
import string
f=open("keys.txt","a")
def run():
a=string.ascii_letters+string.digits
xn=input("How many characters would you like the password to be:")
b=random.choices(a,k=int(xn))
xb=input("What should the description of the password be: ")
f.write("\n"+"Password: "+b+" | Description: "+xb)
print("Added password to keys.txt")
def start2(tmes):
tames = 0
elapsed = 0
while True:
while True:
elapsed = elapsed + 1
time.sleep(1)
if tames == tmes:
break
run()
tames = tames + 1
if tames == tmes:
f.close()
print("Stopped, check keys.txt. Password amount: "+str(tames)+".")
time.sleep(3)
break
def start():
tmes = input("How many passwords would you like this to generate? e.g 3: ")
tmes = int(tmes)
start2(tmes)
start()