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()