summaryrefslogtreecommitdiffstats
path: root/bin/compare-nvd-cve
diff options
context:
space:
mode:
authorPaul Wise <pabs@debian.org>2017-02-19 09:49:09 +0000
committerPaul Wise <pabs@debian.org>2017-02-19 09:49:09 +0000
commit820f7fc3d11c4914b1efc85967635629ac1ca405 (patch)
tree25ba6839fa1b1a7375bf2b930bab330b8df173b4 /bin/compare-nvd-cve
parentc8fbbba151d343a5b7763f6996b8e46ed5c16231 (diff)
Avoid hard-coding the list of years since 2002
Calculate the range based on the current year. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@49060 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'bin/compare-nvd-cve')
-rwxr-xr-xbin/compare-nvd-cve22
1 files changed, 3 insertions, 19 deletions
diff --git a/bin/compare-nvd-cve b/bin/compare-nvd-cve
index 1fffbde745..707ac839ea 100755
--- a/bin/compare-nvd-cve
+++ b/bin/compare-nvd-cve
@@ -45,26 +45,10 @@ while (<$fh>) {
close $fh;
#
-# Fetched from http://static.nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-2016.xml.gz
+# Fetched from https://nvd.nist.gov/download.aspx
#
-for my $cvelist
- (
- "nvdcve-2.0-2016.xml",
- "nvdcve-2.0-2015.xml",
- "nvdcve-2.0-2014.xml",
- "nvdcve-2.0-2013.xml",
- "nvdcve-2.0-2012.xml",
- "nvdcve-2.0-2011.xml",
- "nvdcve-2.0-2010.xml",
- "nvdcve-2.0-2009.xml",
- "nvdcve-2.0-2008.xml",
- "nvdcve-2.0-2007.xml",
- "nvdcve-2.0-2006.xml",
- "nvdcve-2.0-2005.xml",
- "nvdcve-2.0-2004.xml",
- "nvdcve-2.0-2003.xml",
- "nvdcve-2.0-2002.xml",
- ) {
+for my $year (reverse 2002 .. (gmtime())[5]+1900) {
+ my $cvelist = "nvdcve-2.0-$year.xml";
print STDERR "Loading $cvelist\n" if $debug;
my $ref = XMLin("data/nvd2/" . $cvelist);
for my $cve (sort {$b cmp $a} keys %{$ref->{entry}}) {

© 2014-2024 Faster IT GmbH | imprint | privacy policy