-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRandom_Password.py
40 lines (40 loc) · 1.96 KB
/
Random_Password.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
import random
difficulty = input ("How complex do you want yor password be? weak or strong?")
if difficulty == "strong":
password = ''
characters = 'abcdefghijklmnopqrstuvwxyz123456789ABCDEFGHIJKLINOPQRSTUVUXYZ!@#$%^&*()_+-=[]\;'
origin = input("Do you want to set a original password? yes or no")
if origin == "yes":
pa = input("Set the original password")
length = input("how long do you want your password?(original+random)")
for i in range (int (length)):
randchar = random. choice (characters)
password = password + randchar
print ("strong password with original password: " + pa + password)
if origin == "no":
password = ''
characters = 'abcdefghijklmnopqrstuvwxyz123456789ABCDEFGHIJKLINOPQRSTUVUXYZ!@#¥%……&*()_`~+-=「」|:“;'
length = input("how long do you want your password?")
for i in range(int(length)):
randchar = random.choice(characters)
password = password + randchar
print("strong password" + password)
if difficulty == "weak":
password = ''
characters = 'abcdefghijklmnopqrstuvwxyz'
origin = input("Do you want to set a original password? yes or no")
if origin == "yes":
pa = input("Set the original password")
length = input("how long do you want your password?(original+random)")
for i in range (int (length)):
randchar = random. choice (characters)
password = password + randchar
print ("weak password with original password: "+ origin + password)
if origin == "no":
password = ''
characters = 'abcdefghijklmnopqrstuvwxyz123456789ABCDEFGHIJKLINOPQRSTUVUXYZ!@#¥%……&*()_`~+-=「」|:“;'
length = input("how long do you want your password?")
for i in range(int(length)):
randchar = random.choice(characters)
password = password + randchar
print("weak password" + password)