summaryrefslogtreecommitdiff
path: root/rawsecurity.wml
blob: 0bd864465ffc3d75e3b5a48bdf29274142a4cee8 (plain)
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
42
#use wml::std::tags

<perl>
sub read_advisories {

my $directory = './security-entries';

opendir (DIR, $directory) or die $!;

print "<table class=\"news\" width=\"90%\">\n";
print "<tr><th>Tag</th><th>Other identifiers</th><th>Severity</th><th>Information</th>\n";

my %advisories = ();

while (my $file = readdir(DIR)) {
	next if ($file =~ m/^\./);
	next if ($file =~ m/~/);
	next if (-d "$directory/$file");
	#$file =~ m/(.*).xml$/;

	my $contents = `cat $directory/$file`;
	$advisories{$file} = $contents;

}
closedir DIR;

my $key;
foreach $key (sort {$b cmp $a} keys %advisories) {
	print "<tr>\n<td><div class=\"emph-box\" id=\"$key\">$key</div></td>\n$advisories{$key}\n</tr>\n";
}

print "</table>\n";
return;
}

</perl>

<center>

  <:= &read_advisories() :>

</table>