修复更新指定跳过空wskey
This commit is contained in:
parent
fe9f45fae1
commit
f73d36b911
@ -668,29 +668,32 @@ var codeSignals = []CodeSignal{
|
||||
Admin: true,
|
||||
Handle: func(sender *Sender) interface{} {
|
||||
sender.handleJdCookies(func(ck *JdCookie) {
|
||||
var pinky = fmt.Sprintf("pin=%s;wskey=%s;", ck.PtPin, ck.WsKey)
|
||||
rsp := cmd(fmt.Sprintf(`python3 test.py "%s"`, pinky), &Sender{})
|
||||
ss := regexp.MustCompile(`pt_key=([^;=\s]+);pt_pin=([^;=\s]+)`).FindAllStringSubmatch(rsp, -1)
|
||||
if len(ss) > 0 {
|
||||
for _, s := range ss {
|
||||
ck := JdCookie{
|
||||
PtKey: s[1],
|
||||
PtPin: s[2],
|
||||
}
|
||||
if nck, err := GetJdCookie(ck.PtPin); err == nil {
|
||||
nck.InPool(ck.PtKey)
|
||||
msg := fmt.Sprintf("更新账号,%s", ck.PtPin)
|
||||
sender.Reply(msg)
|
||||
logs.Info(msg)
|
||||
} else {
|
||||
if Cdle {
|
||||
ck.Hack = True
|
||||
if len(ck.WsKey) > 0 {
|
||||
var pinky = fmt.Sprintf("pin=%s;wskey=%s;", ck.PtPin, ck.WsKey)
|
||||
rsp := cmd(fmt.Sprintf(`python3 test.py "%s"`, pinky), &Sender{})
|
||||
ss := regexp.MustCompile(`pt_key=([^;=\s]+);pt_pin=([^;=\s]+)`).FindAllStringSubmatch(rsp, -1)
|
||||
if len(ss) > 0 {
|
||||
for _, s := range ss {
|
||||
ck := JdCookie{
|
||||
PtKey: s[1],
|
||||
PtPin: s[2],
|
||||
}
|
||||
if nck, err := GetJdCookie(ck.PtPin); err == nil {
|
||||
nck.InPool(ck.PtKey)
|
||||
msg := fmt.Sprintf("更新账号,%s", ck.PtPin)
|
||||
sender.Reply(msg)
|
||||
logs.Info(msg)
|
||||
} else {
|
||||
if Cdle {
|
||||
ck.Hack = True
|
||||
}
|
||||
sender.Reply("转换失败")
|
||||
}
|
||||
sender.Reply("转换失败")
|
||||
}
|
||||
}
|
||||
sender.Reply(fmt.Sprintf("已更新指定账号%s", ck.Nickname))
|
||||
}
|
||||
sender.Reply(fmt.Sprintf("已更新指定账号%s", ck.Nickname))
|
||||
|
||||
})
|
||||
return nil
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user