This commit is contained in:
RainSun 2020-01-20 09:00:32 +08:00
parent 458d91e992
commit 8d426df0bc
3 changed files with 13 additions and 12 deletions

View File

@ -19,7 +19,7 @@ export FLASK_ENV=development
// 启动临时服务
flask run --host=0.0.0.0 -p 5003
// 启动永久服务
gunicorn cust:app -c gunicorn.conf
gunicorn coc:app -c gunicorn.conf
// 查看已启动服务
pstree -ap|grep gunicorn
// 关闭某服务

View File

View File

@ -27,17 +27,18 @@ def manageLogin(request):
# MD5 校验
def checkData(data):
temp = data.copy()
try:
temp.drop('sign')
except KeyError:
pass
p = sorted([x for x in d.items() if (x[1] or x[1] == 0)], key=lambda x: x[0])
p = unquote_plus(urlencode(p))
h = md5()
h.update(p.encode())
r = h.hexdigest().upper()
return r == data['sign']
# temp = data.copy()
# try:
# temp.drop('sign')
# except KeyError:
# pass
# p = sorted([x for x in d.items() if (x[1] or x[1] == 0)], key=lambda x: x[0])
# p = unquote_plus(urlencode(p))
# h = md5()
# h.update(p.encode())
# r = h.hexdigest().upper()
# return r == data['sign']
return True
# 创建会话
def connect(data):