forked from slmsertbas/Test-Repo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
46 lines (34 loc) · 997 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
34
35
36
37
38
39
40
41
42
43
44
45
46
import string
import random
upper = string.ascii_uppercase
lower = string.ascii_lowercase
numbers = "0123456789"
symbols = "!^+%&?*-"
def splitChar(word):
return [char for char in word]
upper = splitChar(upper)
lower = splitChar(lower)
numbers = splitChar(numbers)
symbols = splitChar(symbols)
def generatePass():
password = []
random.shuffle(upper)
random.shuffle(lower)
random.shuffle(numbers)
random.shuffle(symbols)
for i in range(4):
a = random.choice(upper)
password.append(a)
for i in range(2):
a = random.choice(lower)
password.append(a)
for i in range(2):
a = random.choice(numbers)
password.append(a)
s = [str(i) for i in password]
random.shuffle(s)
password = ''.join(s)
return str(password)
#print("Here is your randomly generated password: "+str(password))
#print("There will be 4 letters lower, 2 lettes upper and 2 numbers in your password.")
#generatePass()