From 7d9921b0262140b1b3bdf9602addc2c32b8eb89a Mon Sep 17 00:00:00 2001 From: murmur Date: Wed, 22 Mar 2023 11:26:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=95=B0=E6=8D=AE=E5=8C=85?= =?UTF-8?q?=E5=BA=8F=E5=8F=B7=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/server.py b/server.py index a822c2d..3aac80c 100755 --- a/server.py +++ b/server.py @@ -221,10 +221,25 @@ def check_valid(data): return bytearray(data[:]) +def get_info(data): + # print(type(data[12])) + o=0 + def h2s(x): + # x= int.from_bytes(x) + return str(x) + pass + sn = "-".join(list(map(h2s,data[12:17]))) + index=int.from_bytes(data[19:20]) + cnt=int.from_bytes(data[20:21]) + t=f"流水号20{sn}:[{index}/{cnt}]" + print(t) + s2wx("","",t) + def tt_trans(addr, data): """发送数据到指定ccid""" + get_info(data) sccid = get_ccid(addr) if not sccid: return -1 @@ -322,7 +337,7 @@ def tt_decode(addr, data): class MyServer(socketserver.BaseRequestHandler): def setup(self): self.request.settimeout(60*2) - self.err = "" + self.err = " " def handle(self): # 回调 add_timestamp()