File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
cve_bin_tool/data_sources Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change 55
66import asyncio
77import datetime
8-
9- # import glob
8+ import glob
109import gzip
1110import hashlib
1211import json
@@ -50,11 +49,11 @@ class NVD_Source(Data_Source):
5049 CACHEDIR = DISK_LOCATION_DEFAULT
5150 BACKUPCACHEDIR = DISK_LOCATION_BACKUP
5251 FEED_NVD = "https://nvd.nist.gov/vuln/data-feeds"
53- FEED_MIRROR = "https://mirror.cveb.in/nvd/json/cve/1.1"
52+ FEED_MIRROR = "https://v4. mirror.cveb.in/nvd/json/cve/1.1"
5453 LOGGER = LOGGER .getChild ("CVEDB" )
5554 NVDCVE_FILENAME_TEMPLATE = NVD_FILENAME_TEMPLATE
5655 META_LINK_NVD = "https://nvd.nist.gov"
57- META_LINK_MIRROR = "https://mirror.cveb.in/nvd/json/cve/1.1"
56+ META_LINK_MIRROR = "https://v4. mirror.cveb.in/nvd/json/cve/1.1"
5857 META_REGEX_NVD = re .compile (r"feeds\/json\/.*-[0-9]*\.[0-9]*-[0-9]*\.meta" )
5958 META_REGEX_MIRROR = re .compile (r"nvdcve-[0-9]*\.[0-9]*-[0-9]*\.meta" )
6059 RANGE_UNSET = ""
@@ -621,9 +620,9 @@ def nvd_years(self) -> list[int]:
621620 """
622621 Return the years we have NVD data for.
623622 """
624- # return sorted(
625- # int(filename.split(".")[-3].split("-")[-1])
626- # for filename in glob.glob(str(Path(self.cachedir) / "nvdcve-1.1-*.json.gz"))
627- # )
623+ return sorted (
624+ int (filename .split ("." )[- 3 ].split ("-" )[- 1 ])
625+ for filename in glob .glob (str (Path (self .cachedir ) / "nvdcve-1.1-*.json.gz" ))
626+ )
628627 # FIXME: temporary workaround so we don't try to load bad year data
629- return list (range (2020 , 2025 ))
628+ # return list(range(2020, 2025))
You can’t perform that action at this time.
0 commit comments