Update github_cve_monitor.py
This commit is contained in:
parent
6e8ce8b3bb
commit
bf9c4012f8
@ -31,7 +31,8 @@ def getNews():
|
||||
cve_total_count = json_str['total_count']
|
||||
cve_description = json_str['items'][0]['description']
|
||||
cve_url = json_str['items'][0]['html_url']
|
||||
return cve_total_count, cve_description, cve_url
|
||||
cve_name = json_str['items'][0]['name']
|
||||
return cve_total_count, cve_description, cve_url,cve_name
|
||||
|
||||
except Exception as e:
|
||||
print(e, "github链接不通")
|
||||
@ -196,7 +197,7 @@ def sendNews(tools_list):
|
||||
# 推送标题
|
||||
text = r'有新的CVE送达!'
|
||||
# 获取 cve 名字 ,根据cve 名字,获取描述,并翻译
|
||||
cve_name = re.findall('(CVE\-\d+\-\d+)', req['items'][0]['name'])[0].upper()
|
||||
cve_name = re.findall('(CVE\-\d+\-\d+)', getNews()[3])[0].upper()
|
||||
cve_zh = get_cve_des_zh(cve_name)
|
||||
msg = "CVE编号:" + cve_name + "\r\n" + "Github地址:" + str(getNews()[2]) + "\r\n" + "CVE描述:" +"\r\n"+ cve_zh
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user