-
Notifications
You must be signed in to change notification settings - Fork 0
/
Password.py
50 lines (31 loc) · 956 Bytes
/
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
41
42
43
44
45
46
#####################################################
# Program to check password strength #
# #
# Author - Gaushik MR #
# #
# #
# dated- 16 July 2020 #
# #
########################################################
import re
p = raw_input("Enter a password: ")
x = True
while x:
if (len(p)<6 or len(p)>12):
break
elif not p[0].isalpha():
break
elif not re.search("[a-z]",p):
break
elif not re.search("[A-Z]",p):
break
elif not re.search("[$#@]",p):
break
elif re.search("\s",p):
break
else:
print("Strong Password")
x=False
break
if x:
print("Weak Password")