bugfix
This commit is contained in:
parent
8b90bc9cbe
commit
cb50c010d1
@ -236,6 +236,9 @@ class WOAHandler:
|
|||||||
|
|
||||||
# 5. 如果需要加密回复
|
# 5. 如果需要加密回复
|
||||||
if self.encoding_aes_key and reply_xml:
|
if self.encoding_aes_key and reply_xml:
|
||||||
|
# 1. 生成新的时间戳和随机数 (不要用请求里的旧数据)
|
||||||
|
timestamp = str(int(time.time()))
|
||||||
|
nonce = ''.join([str(random.randint(0, 9)) for _ in range(10)])
|
||||||
encrypted_xml_str = self._encrypt_msg(reply_xml, nonce, timestamp)
|
encrypted_xml_str = self._encrypt_msg(reply_xml, nonce, timestamp)
|
||||||
# 构造加密后的返回 XML 包
|
# 构造加密后的返回 XML 包
|
||||||
final_xml = f"""
|
final_xml = f"""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user