File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,8 @@ class CVEDB(object):
150
150
FEED = "https://nvd.nist.gov/vuln/data-feeds"
151
151
LOGGER = LOGGER .getChild ("CVEDB" )
152
152
NVDCVE_FILENAME_TEMPLATE = "nvdcve-1.1-{}.json.gz"
153
- META_REGEX = re .compile (r"https:\/\/.*\/json\/.*-[0-9]*\.[0-9]*-[0-9]*\.meta" )
153
+ META_LINK = "https://nvd.nist.gov"
154
+ META_REGEX = re .compile (r"\/feeds\/json\/.*-[0-9]*\.[0-9]*-[0-9]*\.meta" )
154
155
RANGE_UNSET = ""
155
156
156
157
def __init__ (self , verify = True , feed = None , cachedir = None ):
@@ -169,11 +170,12 @@ def nist_scrape(self, feed):
169
170
with contextlib .closing (request .urlopen (feed )) as response :
170
171
page = response .read ().decode ()
171
172
jsonmetalinks = self .META_REGEX .findall (page )
173
+ full_links = [f"{ self .META_LINK } { path } " for path in jsonmetalinks ]
172
174
pool = multiprocessing .Pool ()
173
175
try :
174
176
metadata = dict (
175
177
pool .map (
176
- functools .partial (log_traceback , getmeta ), tuple (jsonmetalinks )
178
+ functools .partial (log_traceback , getmeta ), tuple (full_links )
177
179
)
178
180
)
179
181
pool .close ()
You can’t perform that action at this time.
0 commit comments