-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlist.php
35 lines (33 loc) · 867 Bytes
/
list.php
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Suricata Log Parser - Analyzed Log</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Analysed Log Result</h1>
<hr>
<br>
<?php
$logsDir = "tmp/";
$files = glob($logsDir . "*", GLOB_ONLYDIR);
usort($files, function ($a, $b) {
return filemtime($a) < filemtime($b);
});
$count = count($files);
echo "<b>$count logs analyzed.</b>";
?>
<table width='900' valign='top' align='center'>
<tr align='center'>
<td><b>Name</b></td>
<td><b>Analysis Date</b></td>
</tr>
<?php foreach ($files as $value) {
echo "<tr><td><a href='$value'>" . basename($value) . "</a></td><td>" . date("l, F d Y g:iA", filemtime($value)) . "</td></tr>";
}
?>
</table>
<?php include "footer.php"; ?>
</body>
</html>