forked from cherrymars/jd_cookie-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenen.go
42 lines (37 loc) · 789 Bytes
/
enen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package jd_cookie
import (
"fmt"
"strings"
"github.com/cdle/sillyGirl/core"
"github.com/cdle/sillyGirl/develop/qinglong"
)
func initEnEn() {
core.AddCommand("jd", []core.Function{
{
Rules: []string{"eueu ?"},
Admin: true,
Handle: func(s core.Sender) interface{} {
envs, err := qinglong.GetEnvs("JD_WSCK")
if err != nil {
return err
}
yes := false
for _, env := range envs {
if strings.Contains(env.Value, s.Get()) {
yes = true
pin := core.FetchCookieValue("pin", env.Value)
pt_key, err := getKey(env.Value)
if err != nil {
return err
}
s.Reply(fmt.Sprintf("pt_key=%s;pt_pin=%s;", pt_key, pin))
}
}
if !yes {
return "找不到转换目标"
}
return nil
},
},
})
}