append "CVE-" to CVE ids without it
This commit is contained in:
parent
9ec81f8c8a
commit
9d846d10e2
1 changed files with 5 additions and 1 deletions
|
@ -14,7 +14,11 @@ class Module(ModuleManager.BaseModule):
|
|||
:help: Get information for a CVE number
|
||||
:usage: <CVE>
|
||||
"""
|
||||
page = utils.http.request(URL_CVE % event["args"].upper(), json=True)
|
||||
cve_id = event["args_split"][0].upper()
|
||||
if not cve_id.startswith("CVE-"):
|
||||
cve_id = "CVE-%s" % cve_id
|
||||
|
||||
page = utils.http.request(URL_CVE % cve_id, json=True)
|
||||
|
||||
if page and page.data:
|
||||
cve_id = page.data["id"]
|
||||
|
|
Loading…
Reference in a new issue