MCPcopy Create free account
hub / github.com/YouChenJun/Keydd / TaskBeginSendmsg

Function TaskBeginSendmsg

notify/feishu.go:47–83  ·  view source on GitHub ↗
(info *consts.Keyinfo)

Source from the content-addressed store, hash-verified

45}
46
47func TaskBeginSendmsg(info *consts.Keyinfo) {
48 cardtext := `
49{
50 "config": {},
51 "i18n_elements": {
52 "zh_cn": [
53 {
54 "tag": "markdown",
55 "content": "类型: %s \n站点信息: %s \n匹配到的文本: %s \nuri: %s \n点击我去访问!!: <a href='%s'> \n<at id=all></at>",
56 "text_align": "left",
57 "text_size": "normal"
58 }
59 ]
60 },
61 "i18n_header": {
62 "zh_cn": {
63 "title": {
64 "tag": "plain_text",
65 "content": "检测到敏感信息了!"
66 },
67 "subtitle": {
68 "tag": "plain_text",
69 "content": ""
70 },
71 "template": "green",
72 "ud_icon": {
73 "tag": "standard_icon",
74 "token": "safe-vc_outlined"
75 }
76 }
77 }
78}
79`
80 url := fmt.Sprint(info.Host, info.Req_Path)
81 data := fmt.Sprintf(cardtext, info.RuleName, info.Host, info.Key_text, info.Req_Path, url)
82 sendMsg(data)
83}

Callers 2

WriteDataToDatabaseFunction · 0.92
TestSendmesgFunction · 0.85

Calls 1

sendMsgFunction · 0.85

Tested by 1

TestSendmesgFunction · 0.68