[fix] 修复钉钉通知小bug,修复cve编号推送错误
This commit is contained in:
parent
5b88a83b2b
commit
f92c46f907
@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
## 更新
|
## 更新
|
||||||
|
|
||||||
|
[修复钉钉通知小bug](https://github.com/yhy0/github-cve-monitor/issues/4),修复cve编号推送错误
|
||||||
|
|
||||||
|
>钉钉通知的话,有个安全设置,通过添加加签发送消息,双击,右键复制
|
||||||
|
>
|
||||||
|
>![image-20210730085306816](images/image-20210730085306816.png)替换即可![image-20210730085829847](images/image-20210730085829847.png)
|
||||||
|
|
||||||
监控工具更新 请求次数过多,超过了每小时请求,添加gihtub token
|
监控工具更新 请求次数过多,超过了每小时请求,添加gihtub token
|
||||||
|
|
||||||
> 对于未经身份验证的请求,github 速率限制允许每小时最多 60 个请求
|
> 对于未经身份验证的请求,github 速率限制允许每小时最多 60 个请求
|
||||||
@ -74,6 +80,8 @@ pip install python-telegram-bot
|
|||||||
|
|
||||||
![image-20210225090416314](images/image-20210225090416314.png)
|
![image-20210225090416314](images/image-20210225090416314.png)
|
||||||
|
|
||||||
|
![image-20210730090419064](images/image-20210730090419064.png)
|
||||||
|
|
||||||
![image-20210225090811212](images/image-20210225090811212.png)
|
![image-20210225090811212](images/image-20210225090811212.png)
|
||||||
|
|
||||||
![image-20210225092350481](images/image-20210225092350481.png)
|
![image-20210225092350481](images/image-20210225092350481.png)
|
||||||
|
@ -126,7 +126,8 @@ def translate(word):
|
|||||||
def dingding(text, msg):
|
def dingding(text, msg):
|
||||||
# 将此处换为钉钉机器人的api
|
# 将此处换为钉钉机器人的api
|
||||||
webhook = 'xxxxxxxx'
|
webhook = 'xxxxxxxx'
|
||||||
ding = cb.DingtalkChatbot(webhook)
|
secretKey = 'xxxxxxxx' # 替换自己的加签, 钉钉中机器人管理 - 加签 双击,右键复制
|
||||||
|
ding = cb.DingtalkChatbot(webhook, secret = secretKey)
|
||||||
ding.send_text(msg = '{}\r\n{}'.format(text, msg), is_at_all=False)
|
ding.send_text(msg = '{}\r\n{}'.format(text, msg), is_at_all=False)
|
||||||
|
|
||||||
# server酱 http://sc.ftqq.com/?c=code
|
# server酱 http://sc.ftqq.com/?c=code
|
||||||
@ -185,7 +186,7 @@ def sendNews(tools_list):
|
|||||||
text = r'有新的CVE送达!'
|
text = r'有新的CVE送达!'
|
||||||
# 获取 cve 名字 ,根据cve 名字,获取描述,并翻译
|
# 获取 cve 名字 ,根据cve 名字,获取描述,并翻译
|
||||||
cve_zh = get_cve_des_zh(req['items'][0]['name'])
|
cve_zh = get_cve_des_zh(req['items'][0]['name'])
|
||||||
msg = "CVE编号:"+ str(getNews()[1]) + "\r\n"+"Github地址:"+ str(getNews()[2]) + "\r\n" + "CVE描述:"+ cve_zh
|
msg = "CVE编号:"+ req['items'][0]['name'] + "\r\n"+"Github地址:"+ str(getNews()[2]) + "\r\n" + "CVE描述:"+ cve_zh
|
||||||
|
|
||||||
# 三选一即可,没配置的 注释或者删掉
|
# 三选一即可,没配置的 注释或者删掉
|
||||||
# server(text, msg)
|
# server(text, msg)
|
||||||
|
BIN
images/image-20210730085306816.png
Normal file
BIN
images/image-20210730085306816.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 114 KiB |
BIN
images/image-20210730085829847.png
Normal file
BIN
images/image-20210730085829847.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 100 KiB |
BIN
images/image-20210730090403620.png
Normal file
BIN
images/image-20210730090403620.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 242 KiB |
BIN
images/image-20210730090419064.png
Normal file
BIN
images/image-20210730090419064.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 242 KiB |
Loading…
Reference in New Issue
Block a user