commit
8b9bd4a6c3
@ -31,7 +31,8 @@ def getNews():
|
|||||||
cve_total_count = json_str['total_count']
|
cve_total_count = json_str['total_count']
|
||||||
cve_description = json_str['items'][0]['description']
|
cve_description = json_str['items'][0]['description']
|
||||||
cve_url = json_str['items'][0]['html_url']
|
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:
|
except Exception as e:
|
||||||
print(e, "github链接不通")
|
print(e, "github链接不通")
|
||||||
@ -196,7 +197,7 @@ def sendNews(tools_list):
|
|||||||
# 推送标题
|
# 推送标题
|
||||||
text = r'有新的CVE送达!'
|
text = r'有新的CVE送达!'
|
||||||
# 获取 cve 名字 ,根据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)
|
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
|
msg = "CVE编号:" + cve_name + "\r\n" + "Github地址:" + str(getNews()[2]) + "\r\n" + "CVE描述:" +"\r\n"+ cve_zh
|
||||||
|
|
||||||
@ -280,4 +281,5 @@ if __name__ == '__main__':
|
|||||||
"https://api.github.com/repos/L-codes/Neo-reGeorg",
|
"https://api.github.com/repos/L-codes/Neo-reGeorg",
|
||||||
"https://api.github.com/repos/shadow1ng/fscan",
|
"https://api.github.com/repos/shadow1ng/fscan",
|
||||||
]
|
]
|
||||||
|
|
||||||
sendNews(tools_list)
|
sendNews(tools_list)
|
||||||
|
Loading…
Reference in New Issue
Block a user