From 0ab35a657d37f9fe36b655ea5ea5819952cc0c43 Mon Sep 17 00:00:00 2001 From: "CSSC-WORK\\murmur" Date: Mon, 19 Jun 2023 16:59:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8D=AE=E6=96=B0=E7=89=88=E5=8D=8F=E8=AE=AE?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=BD=93=E5=89=8D=E5=8C=85=E5=92=8C=E6=80=BB?= =?UTF-8?q?=E5=8C=85=E6=95=B0=E7=9A=84=E5=88=A4=E6=96=AD=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=BF=A1=E6=81=AF=E6=8E=A8=E9=80=81=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E7=9A=84=E5=88=A4=E6=96=AD=E5=A4=B1=E8=AF=AF=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- run_tt_server.sh | 2 +- server.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/run_tt_server.sh b/run_tt_server.sh index 2882902..64f5665 100755 --- a/run_tt_server.sh +++ b/run_tt_server.sh @@ -16,7 +16,7 @@ echo "Now run new service." cur_dateTime=$(date +%Y-%m-%d_%H-%M) #cur_dateTime=$(date +%Y-%m-%d_%H-%m-%s) echo ${cur_dateTime} -cd /root/tt/tt-tcp +cd ~/tt/tt-tcp #mv log.txt "./log-"${cur_dateTime}".txt" f="./log-"${cur_dateTime}".txt" mv rxlog.txt "./rxlog-"${cur_dateTime}".txt" diff --git a/server.py b/server.py index 8c1df3c..d71faaa 100755 --- a/server.py +++ b/server.py @@ -41,7 +41,6 @@ def s2wx(title="",description="", content=""): # return # 受API限制,频繁发送会失败 # 拟合并发送,满3条已发送,超时时间10s - if len(content): t=f""" *时戳:* @@ -65,7 +64,7 @@ _{datetime.datetime.now()}_ "token": "tt"}) print("nmhd",res) try: - res = res.json()["success"] + res = res.json() except: s="https://msgpusher.com/push/test111" # s="http://47.108.213.155:11722/push/murmur" @@ -295,8 +294,8 @@ def get_info(data): return str(x) pass sn = "-".join(list(map(h2s,data[12:17]))) - index=int.from_bytes(data[19:20],byteorder="big") - cnt=int.from_bytes(data[20:21],byteorder="big") + index=int.from_bytes(data[20:21],byteorder="big") + cnt=int.from_bytes(data[21:22],byteorder="big") t=f"流水号20{sn} \n序号\[{index}/{cnt}]" print(t) s2wx("","",t)