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 5
5
6
6
import asyncio
7
7
import datetime
8
-
9
- # import glob
8
+ import glob
10
9
import gzip
11
10
import hashlib
12
11
import json
@@ -50,11 +49,11 @@ class NVD_Source(Data_Source):
50
49
CACHEDIR = DISK_LOCATION_DEFAULT
51
50
BACKUPCACHEDIR = DISK_LOCATION_BACKUP
52
51
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"
54
53
LOGGER = LOGGER .getChild ("CVEDB" )
55
54
NVDCVE_FILENAME_TEMPLATE = NVD_FILENAME_TEMPLATE
56
55
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"
58
57
META_REGEX_NVD = re .compile (r"feeds\/json\/.*-[0-9]*\.[0-9]*-[0-9]*\.meta" )
59
58
META_REGEX_MIRROR = re .compile (r"nvdcve-[0-9]*\.[0-9]*-[0-9]*\.meta" )
60
59
RANGE_UNSET = ""
@@ -621,9 +620,9 @@ def nvd_years(self) -> list[int]:
621
620
"""
622
621
Return the years we have NVD data for.
623
622
"""
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
+ )
628
627
# 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