从ftp获取cnc程序文件

This commit is contained in:
jinling.yang
2022-11-30 11:25:37 +08:00
parent d6321bcb26
commit 8fce929022
5 changed files with 80 additions and 4 deletions

View File

@@ -27,7 +27,7 @@ class Http(models.AbstractModel):
raise AuthenticationError('无效的token')
timestamp_str = int(time.time())
# 设置API接口请求时间,不能超过5秒
deltime = datetime.timedelta(seconds=60)
deltime = datetime.timedelta(seconds=5)
if abs(int(datas['HTTP_TIMESTAMP'])-timestamp_str) > deltime.seconds:
raise AuthenticationError('请求已过期')
# 获得sha1_str加密字符串