From 047063786acce3b8ce56a7c4d40bb7d2894411ea Mon Sep 17 00:00:00 2001 From: ZJY <764763903@qq.com> Date: Sat, 4 Sep 2021 17:05:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AC=E4=B8=BA=E6=9C=AC=E5=9C=B0=E8=AE=A1?= =?UTF-8?q?=E7=AE=97wskey=20=20=E7=BA=BF=E4=B8=8Asign?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/bot.go | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/models/bot.go b/models/bot.go index 4c53dac..a3b233c 100644 --- a/models/bot.go +++ b/models/bot.go @@ -87,24 +87,11 @@ var handleMessage = func(msgs ...interface{}) interface{} { { if strings.Contains(msg, "wskey=") { - msg1 := cmd(fmt.Sprintf(`python3 test.py "%s"`, msg), &Sender{}) - logs.Info(fmt.Sprintf(`python3 test.py "%s"`, msg)) - logs.Info(msg1 + "测试") + rsp := cmd(fmt.Sprintf(`python3 test.py "%s"`, msg), &Sender{}) + logs.Info(rsp) ss1 := regexp.MustCompile(`pin=([^;=\s]+);wskey=([^;=\s]+)`).FindAllStringSubmatch(msg, -1) if len(ss1) > 0 { for _, s := range ss1 { - //转换ptkey - - post := "{\"key\":\"" + "xb3z4z2m3n847" + - "\",\"wskey\":\"" + "pin=" + s[1] + ";wskey=" + s[2] + ";" + - "\"}" - req := httplib.Post("http://login.smxy.xyz/getck") - req.Body(post) - rsp, err := req.String() - if err != nil { - return err - } - ck := JdCookie{ PtPin: s[1], PtKey: rsp,