minus improvements
This commit is contained in:
@@ -59,13 +59,13 @@ class aes_pkcs7(object):
|
||||
def SDGBApiHash(api):
|
||||
return hashlib.md5((api+"MaimaiChn"+ObfuscateParam).encode()).hexdigest()
|
||||
|
||||
def apiSDGB(data:str, useApi, agentExtraData, maxRetries=5):
|
||||
def apiSDGB(data:str, useApi, agentExtraData, maxRetries=3):
|
||||
'''
|
||||
舞萌DX 2024 API 通讯用函数
|
||||
:param data: 请求数据
|
||||
:param useApi: 使用的 API
|
||||
:param agentExtraData: UA 附加信息,机台相关则为狗号(如A63E01E9564),用户相关则为 UID
|
||||
:param maxRetry: 最大重试次数, 默认为 3
|
||||
:param maxRetry: 最大重试次数,
|
||||
'''
|
||||
|
||||
# 历史遗留代码有时候会传入 int,故先全部转 str
|
||||
@@ -123,7 +123,7 @@ def apiSDGB(data:str, useApi, agentExtraData, maxRetries=5):
|
||||
continue
|
||||
# 解压成功,解密请求并返回
|
||||
resultResponse = unpad(aes.decrypt(responseDecompressed), 16).decode()
|
||||
logger.info("TitleServer Response OK!")
|
||||
logger.info("TitleServer:" + useApi + " Response: " + str(responseRaw.status_code))
|
||||
logger.debug("TitleServer Response: " + str(resultResponse))
|
||||
return resultResponse
|
||||
|
||||
|
||||
Reference in New Issue
Block a user