mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-20 06:20:08 +08:00
🐛 b14 encode panic
This commit is contained in:
parent
37b95e9559
commit
41911af09a
4
go.mod
4
go.mod
@ -6,12 +6,12 @@ require (
|
|||||||
github.com/FloatTech/AnimeAPI v1.4.1-0.20220613042537-0adf8c5616ec
|
github.com/FloatTech/AnimeAPI v1.4.1-0.20220613042537-0adf8c5616ec
|
||||||
github.com/FloatTech/sqlite v0.3.2
|
github.com/FloatTech/sqlite v0.3.2
|
||||||
github.com/FloatTech/zbpctrl v1.4.1-0.20220706075314-7fdbbc2a2345
|
github.com/FloatTech/zbpctrl v1.4.1-0.20220706075314-7fdbbc2a2345
|
||||||
github.com/FloatTech/zbputils v1.4.1-0.20220706075514-0ba0bb2b8953
|
github.com/FloatTech/zbputils v1.4.1-0.20220706162215-fd9437e83a63
|
||||||
github.com/antchfx/htmlquery v1.2.5
|
github.com/antchfx/htmlquery v1.2.5
|
||||||
github.com/corona10/goimagehash v1.0.3
|
github.com/corona10/goimagehash v1.0.3
|
||||||
github.com/fogleman/gg v1.3.0
|
github.com/fogleman/gg v1.3.0
|
||||||
github.com/fumiama/cron v1.3.0
|
github.com/fumiama/cron v1.3.0
|
||||||
github.com/fumiama/go-base16384 v1.5.3
|
github.com/fumiama/go-base16384 v1.5.4
|
||||||
github.com/fumiama/go-registry v0.1.6
|
github.com/fumiama/go-registry v0.1.6
|
||||||
github.com/fumiama/gofastTEA v0.0.10
|
github.com/fumiama/gofastTEA v0.0.10
|
||||||
github.com/fumiama/gotracemoe v0.0.3
|
github.com/fumiama/gotracemoe v0.0.3
|
||||||
|
|||||||
3
go.sum
3
go.sum
@ -19,6 +19,8 @@ github.com/FloatTech/zbputils v1.4.1-0.20220706065627-1b541c2dc28f h1:rdVNb3J9Dx
|
|||||||
github.com/FloatTech/zbputils v1.4.1-0.20220706065627-1b541c2dc28f/go.mod h1:F//acBR/aFg4DrcC8CPWJMA/4FS5P0HM5rKGm8ySFOA=
|
github.com/FloatTech/zbputils v1.4.1-0.20220706065627-1b541c2dc28f/go.mod h1:F//acBR/aFg4DrcC8CPWJMA/4FS5P0HM5rKGm8ySFOA=
|
||||||
github.com/FloatTech/zbputils v1.4.1-0.20220706075514-0ba0bb2b8953 h1:+mcUb2mBjt0r/ZqlY5I7k6eFsXDHe0+IfRx26MGXufY=
|
github.com/FloatTech/zbputils v1.4.1-0.20220706075514-0ba0bb2b8953 h1:+mcUb2mBjt0r/ZqlY5I7k6eFsXDHe0+IfRx26MGXufY=
|
||||||
github.com/FloatTech/zbputils v1.4.1-0.20220706075514-0ba0bb2b8953/go.mod h1:fkyUT0CW9DOcCLTiV5oKIf7Mhxa7OlBp5qpYraqlkC0=
|
github.com/FloatTech/zbputils v1.4.1-0.20220706075514-0ba0bb2b8953/go.mod h1:fkyUT0CW9DOcCLTiV5oKIf7Mhxa7OlBp5qpYraqlkC0=
|
||||||
|
github.com/FloatTech/zbputils v1.4.1-0.20220706162215-fd9437e83a63 h1:9o68KisqiI3NPo19tsJqNmHiVpRwMjLEHsaiLFAuxz4=
|
||||||
|
github.com/FloatTech/zbputils v1.4.1-0.20220706162215-fd9437e83a63/go.mod h1:abmL/F2O2+14KQ1Ba9+aohAl9vgwcPP8Nij1m1t84x0=
|
||||||
github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc=
|
github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc=
|
||||||
github.com/RomiChan/syncx v0.0.0-20220404072119-d7ea0ae15a4c h1:cNPOdTNiVwxLpROLjXCgbIPvdkE+BwvxDvgmdYmWx6Q=
|
github.com/RomiChan/syncx v0.0.0-20220404072119-d7ea0ae15a4c h1:cNPOdTNiVwxLpROLjXCgbIPvdkE+BwvxDvgmdYmWx6Q=
|
||||||
github.com/RomiChan/syncx v0.0.0-20220404072119-d7ea0ae15a4c/go.mod h1:KqZzu7slNKROh3TSYEH/IUMG6f4M+1qubZ5e52QypsE=
|
github.com/RomiChan/syncx v0.0.0-20220404072119-d7ea0ae15a4c/go.mod h1:KqZzu7slNKROh3TSYEH/IUMG6f4M+1qubZ5e52QypsE=
|
||||||
@ -62,6 +64,7 @@ github.com/fumiama/cron v1.3.0 h1:ZWlwuexF+HQHl3cYytEE5HNwD99q+3vNZF1GrEiXCFo=
|
|||||||
github.com/fumiama/cron v1.3.0/go.mod h1:bz5Izvgi/xEUI8tlBN8BI2jr9Moo8N4or0KV8xXuPDY=
|
github.com/fumiama/cron v1.3.0/go.mod h1:bz5Izvgi/xEUI8tlBN8BI2jr9Moo8N4or0KV8xXuPDY=
|
||||||
github.com/fumiama/go-base16384 v1.5.3 h1:IUZUlm2ajJB1nEJzauP6yD5IeJoVHyBEkzKJf9O82zs=
|
github.com/fumiama/go-base16384 v1.5.3 h1:IUZUlm2ajJB1nEJzauP6yD5IeJoVHyBEkzKJf9O82zs=
|
||||||
github.com/fumiama/go-base16384 v1.5.3/go.mod h1:OEn+947GV5gsbTAnyuUW/SrfxJYUdYupSIQXOuGOcXM=
|
github.com/fumiama/go-base16384 v1.5.3/go.mod h1:OEn+947GV5gsbTAnyuUW/SrfxJYUdYupSIQXOuGOcXM=
|
||||||
|
github.com/fumiama/go-base16384 v1.5.4/go.mod h1:OEn+947GV5gsbTAnyuUW/SrfxJYUdYupSIQXOuGOcXM=
|
||||||
github.com/fumiama/go-registry v0.1.6 h1:Ee/tXCCIR/xt8celhbbw0W/xDMdhAXLwy2YFBB/LWFk=
|
github.com/fumiama/go-registry v0.1.6 h1:Ee/tXCCIR/xt8celhbbw0W/xDMdhAXLwy2YFBB/LWFk=
|
||||||
github.com/fumiama/go-registry v0.1.6/go.mod h1:dIUVbiOgfk9oZcsgwDvNLC72i+ctibVukSXR/9bLviI=
|
github.com/fumiama/go-registry v0.1.6/go.mod h1:dIUVbiOgfk9oZcsgwDvNLC72i+ctibVukSXR/9bLviI=
|
||||||
github.com/fumiama/gofastTEA v0.0.10 h1:JJJ+brWD4kie+mmK2TkspDXKzqq0IjXm89aGYfoGhhQ=
|
github.com/fumiama/gofastTEA v0.0.10 h1:JJJ+brWD4kie+mmK2TkspDXKzqq0IjXm89aGYfoGhhQ=
|
||||||
|
|||||||
@ -19,7 +19,7 @@ func init() {
|
|||||||
Help: "base16384加解密\n" +
|
Help: "base16384加解密\n" +
|
||||||
"- 加密xxx\n- 解密xxx\n- 用yyy加密xxx\n- 用yyy解密xxx",
|
"- 加密xxx\n- 解密xxx\n- 用yyy加密xxx\n- 用yyy解密xxx",
|
||||||
})
|
})
|
||||||
en.OnRegex(`^加密\s*(.*)`).SetBlock(true).
|
en.OnRegex(`^加密\s*(.+)$`).SetBlock(true).
|
||||||
Handle(func(ctx *zero.Ctx) {
|
Handle(func(ctx *zero.Ctx) {
|
||||||
str := ctx.State["regex_matched"].([]string)[1]
|
str := ctx.State["regex_matched"].([]string)[1]
|
||||||
es := base14.EncodeString(str)
|
es := base14.EncodeString(str)
|
||||||
@ -29,7 +29,7 @@ func init() {
|
|||||||
ctx.SendChain(message.Text("加密失败!"))
|
ctx.SendChain(message.Text("加密失败!"))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
en.OnRegex(`^解密\s*([一-踀]*[㴁-㴆]?)$`).SetBlock(true).
|
en.OnRegex(`^解密\s*([一-踀]+[㴁-㴆]?)$`).SetBlock(true).
|
||||||
Handle(func(ctx *zero.Ctx) {
|
Handle(func(ctx *zero.Ctx) {
|
||||||
str := ctx.State["regex_matched"].([]string)[1]
|
str := ctx.State["regex_matched"].([]string)[1]
|
||||||
es := base14.DecodeString(str)
|
es := base14.DecodeString(str)
|
||||||
@ -39,7 +39,7 @@ func init() {
|
|||||||
ctx.SendChain(message.Text("解密失败!"))
|
ctx.SendChain(message.Text("解密失败!"))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
en.OnRegex(`^用(.*)加密\s*(.*)`).SetBlock(true).
|
en.OnRegex(`^用(.+)加密\s*(.+)$`).SetBlock(true).
|
||||||
Handle(func(ctx *zero.Ctx) {
|
Handle(func(ctx *zero.Ctx) {
|
||||||
key, str := ctx.State["regex_matched"].([]string)[1], ctx.State["regex_matched"].([]string)[2]
|
key, str := ctx.State["regex_matched"].([]string)[1], ctx.State["regex_matched"].([]string)[2]
|
||||||
t := getea(key)
|
t := getea(key)
|
||||||
@ -50,7 +50,7 @@ func init() {
|
|||||||
ctx.SendChain(message.Text("加密失败!"))
|
ctx.SendChain(message.Text("加密失败!"))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
en.OnRegex(`^用(.*)解密\s*([一-踀]*[㴁-㴆]?)$`).SetBlock(true).
|
en.OnRegex(`^用(.+)解密\s*([一-踀]+[㴁-㴆]?)$`).SetBlock(true).
|
||||||
Handle(func(ctx *zero.Ctx) {
|
Handle(func(ctx *zero.Ctx) {
|
||||||
key, str := ctx.State["regex_matched"].([]string)[1], ctx.State["regex_matched"].([]string)[2]
|
key, str := ctx.State["regex_matched"].([]string)[1], ctx.State["regex_matched"].([]string)[2]
|
||||||
t := getea(key)
|
t := getea(key)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user