-
Notifications
You must be signed in to change notification settings - Fork 1
/
sql_filters.py
23 lines (18 loc) · 1.16 KB
/
sql_filters.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import string
def filtr(username, password, ):
if len(str(username.replace(" ", ''))) > 16 or len(str(password).replace(" ", '')) > 20:
return None
else:
username_ = "".join(str(chars).replace(" ", '') for chars in username if chars not in string.punctuation)
password_ = "".join(str(chars).replace(" ", '') for chars in password if chars not in ["%", "-", "'",
'"', '`', '(',
')', '[', ']'])
return username_, password_,
def copyPasswordFiltr(copypassword):
if len(str(copypassword).replace(" ", '')) > 20:
return None
else:
copypassword_ = "".join(str(chars).replace(" ", '') for chars in copypassword if chars not in ["%", "-", "'",
'"', '`', '(',
')', '[', ']'])
return copypassword_