From: qydysky Date: Sat, 12 Jun 2021 09:10:47 +0000 (+0800) Subject: 优化小心心web加密 X-Git-Tag: v0.5.10~41^2~108 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=4f73f9581e7fa1ca3c2bbecda549dd76c0881d2c;p=bili_danmu%2F.git 优化小心心web加密 --- diff --git a/F/xinxin.go b/F/xinxin.go index b4aa197..30aeac6 100644 --- a/F/xinxin.go +++ b/F/xinxin.go @@ -5,6 +5,7 @@ import ( "strconv" "encoding/json" "time" + "strings" c "github.com/qydysky/bili_danmu/CV" @@ -173,15 +174,10 @@ func Wasm(uid uintptr,s RT) (o string) {//maxloop 超时重试 } {//web - b, e := json.Marshal(s) - if e != nil { - wslog.L(`E: `,e) - } - for try:=5;try > 0 && ws.Len() == 0;try-=1 {//没有从池中取出 open.Run(webpath) wslog.L(`I: `,`浏览器打开`,webpath) - time.Sleep(time.Second*time.Duration(3)) + time.Sleep(time.Second*time.Duration(10)) } if ws.Len() == 0 { @@ -189,6 +185,14 @@ func Wasm(uid uintptr,s RT) (o string) {//maxloop 超时重试 return } + if !strings.Contains(s.R.Ua, `Test`) { + s.R.Ts = int(p.Sys().GetMTime()) + } + b, e := json.Marshal(s) + if e != nil { + wslog.L(`E: `,e) + } + //获取websocket操作对象 发送 ws.Interface().Push_tag(`send`,websocket.Uinterface{ Id:uid, @@ -230,7 +234,7 @@ func test(uid uintptr) bool { Benchmark: "seacasdgyijfhofiuxoannn", Time: 60, Ts: 1611836642190, - Ua:`Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0`, + Ua:`Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0 Test`, }, T: []int{2, 5, 1, 4}, });s != `e4249b7657c2d4a44955548eb814797d41ddd99bfdfa5974462b8c387d701b8c83898f6d7dde1772c67fad6a113d20c20e454be1d1627e7ea99617a8a1f99bd0` {