-
Notifications
You must be signed in to change notification settings - Fork 9
/
cve-intro.pl
41 lines (33 loc) · 960 Bytes
/
cve-intro.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/perl
# NOTE:
#
# This accesses the web site git repo to find the 'vuln.pm' file with the
# proper meta-data!
#
my $webroot = $ARGV[0] || "../curl-www";
require "$webroot/docs/vuln.pm";
$csv = "$webroot/docs/releases.csv";
sub relinfo {
open(C, "<$csv");
while(<C>) {
chomp;
my ($index, $version, $vulns, $date, $since, $ddays, $adays, $dbugs, $abugs,
$dchanges, $achanges) = split(';', $_);
$release{$version}=$date;
push @inorder, $version;
$p = $date; # remmeber the last date, which is the earliest
}
close(C);
}
relinfo();
for(reverse @vuln) {
my ($id, $start, $stop, $desc, $cve, $date)=split('\|');
push @all, $release{$start};
}
my $count = 0;
for my $d (sort @all) {
printf "%s;%d\n", $d, ++$count;
}
#my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
# localtime(time);
#printf "%04d-%02d-%02d;%d\n", $year + 1900, $mon + 1, $mday, $count;