Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- P = 10**(-7)
- V = 3*60*24*30
- T = 1
- S_= (V*T)/P
- A = 43
- L = 8
- #print(S_)
- #print(69**8)
- password = []
- def gen(password):
- for i in range(L):
- c = random.randint(1, 4)
- if c == 1:
- c2 = random.randint(65, 90)
- password.append(chr(c2))
- if c == 2:
- c2 = random.randint(97, 122)
- password.append(chr(c2))
- if c == 3:
- c2 = random.randint(48, 57)
- password.append(chr(c2))
- if c == 4:
- c2 = random.randint(33, 39)
- password.append(chr(c2))
- def pas():
- w = input("Сгенерировать пароль? (да/нет) ")
- if w == "да":
- password.clear()
- gen(password)
- z = ''.join(password)
- print("Сгенерированный пароль: ", z)
- return pas()
- if w == "нет":
- exit()
- pas()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement