Author: pabs Date: 2017-02-19 09:49:09 +0000 (Sun, 19 Feb 2017) New Revision: 49060
Modified: bin/compare-nvd-cve Log: Avoid hard-coding the list of years since 2002 Calculate the range based on the current year. Modified: bin/compare-nvd-cve =================================================================== --- bin/compare-nvd-cve 2017-02-19 09:35:23 UTC (rev 49059) +++ bin/compare-nvd-cve 2017-02-19 09:49:09 UTC (rev 49060) @@ -45,26 +45,10 @@ 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}}) { _______________________________________________ Secure-testing-commits mailing list Secure-testing-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/secure-testing-commits