From cb50c010d1cafcb6240c46fcbd135228473bcc97 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 3 Mar 2026 11:22:34 +0800 Subject: [PATCH] bugfix --- woa/init.py | 3 +++ 1 file changed, 3 insertions(+) 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"""