diff --git a/woa/init.py b/woa/init.py index 33df7db..b0c589d 100644 --- a/woa/init.py +++ b/woa/init.py @@ -236,6 +236,9 @@ class WOAHandler: # 5. 如果需要加密回复 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) # 构造加密后的返回 XML 包 final_xml = f"""