From 3eca591bce2f994e603ac77327938dd6d54f91ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AF=BB=E6=AC=A2?= Date: Sun, 14 Jan 2024 13:00:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=BF=90=E8=A1=8C=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=90=AF=E5=8A=A8webhook?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/cmd.sh b/cmd.sh index 5cf56e0..698ce7b 100644 --- a/cmd.sh +++ b/cmd.sh @@ -9,4 +9,22 @@ sleep 10 wine 'C:\DllInjector.exe' 'C:\wxhelper.dll' WeChat.exe 2>&1 +# 判断是否配置回调 +if [ $NOTIFY_URL ];then + sleep 10 + echo "开始发送注入后的回调通知: $NOTIFY_URL" + status = "success" + # 使用netstat检测端口是否被监听 + netstat -an | grep 19088 > /dev/null + if [ $? -eq 0 ];then + echo "HOOK 注入成功,19088端口正在监听" + else + echo "HOOK 疑似注入失败,19088 端口未监听,请手动检查是否注入成功" + status = "fail" + fi + curl -X POST $NOTIFY_URL -H 'Content-Type: application/json' -d '{"status": "'"$status"'", "robot": "'"$REMARK"'"}' +else + echo "未配置回调通知地址,跳过通知消息发送" +fi + wait \ No newline at end of file