aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2019-09-18 17:51:08 +0100
committerGravatar jesopo2019-09-18 17:51:08 +0100
commit9d846d10e24f801974b2fd095b8710e2df996ad0 (patch)
tree1b23cfd1e0b6de52edad1f60653ee176bb614866 /modules
parentmove check_urls.py to bitbot-modules (diff)
signature
append "CVE-" to CVE ids without it
Diffstat (limited to 'modules')
-rw-r--r--modules/cve.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/cve.py b/modules/cve.py
index f4804368..7504f2a5 100644
--- a/modules/cve.py
+++ b/modules/cve.py
@@ -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"]