diff options
-rwxr-xr-x | usr/local/www/diag_logs_auth.php | 21 | ||||
-rwxr-xr-x | usr/local/www/diag_logs_dhcp.php | 21 | ||||
-rwxr-xr-x | usr/local/www/diag_logs_ipsec.php | 23 |
3 files changed, 1 insertions, 64 deletions
diff --git a/usr/local/www/diag_logs_auth.php b/usr/local/www/diag_logs_auth.php index c3865f0..6da7626 100755 --- a/usr/local/www/diag_logs_auth.php +++ b/usr/local/www/diag_logs_auth.php @@ -42,27 +42,6 @@ if ($_POST['clear']) { exec("/usr/sbin/clog -i -s 262144 {$portal_logfile}"); } -function dump_clog($logfile, $tail, $withorig = true) { - global $g, $config; - - $sor = isset($config['syslog']['reverse']) ? "-r" : ""; - - exec("/usr/sbin/clog {$logfile} | tail {$sor} -n {$tail}", $logarr); - - foreach ($logarr as $logent) { - $logent = preg_split("/\s+/", $logent, 6); - echo "<tr valign=\"top\">\n"; - - if ($withorig) { - echo "<td class=\"listlr\" nowrap>" . htmlspecialchars(join(" ", array_slice($logent, 0, 3))) . "</td>\n"; - echo "<td class=\"listr\">" . htmlspecialchars($logent[4] . " " . $logent[5]) . "</td>\n"; - } else { - echo "<td class=\"listlr\" colspan=\"2\">" . htmlspecialchars($logent[5]) . "</td>\n"; - } - echo "</tr>\n"; - } -} - ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> diff --git a/usr/local/www/diag_logs_dhcp.php b/usr/local/www/diag_logs_dhcp.php index 01f7864..d450071 100755 --- a/usr/local/www/diag_logs_dhcp.php +++ b/usr/local/www/diag_logs_dhcp.php @@ -44,27 +44,6 @@ if ($_POST['clear']) { exec("/usr/sbin/clog -i -s 262144 {$dhcpd_logfile}"); } -function dump_clog($logfile, $tail, $withorig = true) { - global $g, $config; - - $sor = isset($config['syslog']['reverse']) ? "-r" : ""; - - exec("/usr/sbin/clog {$logfile} | tail {$sor} -n {$tail}", $logarr); - - foreach ($logarr as $logent) { - $logent = preg_split("/\s+/", $logent, 6); - echo "<tr valign=\"top\">\n"; - - if ($withorig) { - echo "<td class=\"listlr\" nowrap>" . htmlspecialchars(join(" ", array_slice($logent, 0, 3))) . "</td>\n"; - echo "<td class=\"listr\">" . htmlspecialchars($logent[4] . " " . $logent[5]) . "</td>\n"; - } else { - echo "<td class=\"listlr\" colspan=\"2\">" . htmlspecialchars($logent[5]) . "</td>\n"; - } - echo "</tr>\n"; - } -} - ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> diff --git a/usr/local/www/diag_logs_ipsec.php b/usr/local/www/diag_logs_ipsec.php index 75eadcf..65fbce3 100755 --- a/usr/local/www/diag_logs_ipsec.php +++ b/usr/local/www/diag_logs_ipsec.php @@ -44,27 +44,6 @@ if ($_POST['clear']) { exec("/usr/sbin/clog -i -s 262144 {$ipsec_logfile}"); } -function dump_clog($logfile, $tail, $withorig = true) { - global $g, $config; - - $sor = isset($config['syslog']['reverse']) ? "-r" : ""; - - exec("/usr/sbin/clog {$logfile} | /usr/bin/grep racoon | /usr/bin/tail {$sor} -n {$tail}", $logarr); - - foreach ($logarr as $logent) { - $logent = preg_split("/\s+/", $logent, 6); - echo "<tr valign=\"top\">\n"; - - if ($withorig) { - echo "<td class=\"listlr\" nowrap>" . htmlspecialchars(join(" ", array_slice($logent, 0, 3))) . "</td>\n"; - echo "<td class=\"listr\">" . htmlspecialchars($logent[4] . " " . $logent[5]) . "</td>\n"; - } else { - echo "<td class=\"listlr\" colspan=\"2\">" . htmlspecialchars($logent[5]) . "</td>\n"; - } - echo "</tr>\n"; - } -} - ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> @@ -96,7 +75,7 @@ function dump_clog($logfile, $tail, $withorig = true) { <td colspan="2" class="listtopic"> Last <?=$nentries;?> IPSEC log entries</td> </tr> - <?php dump_clog($ipsec_logfile, $nentries); ?> + <?php dump_clog($ipsec_logfile, $nentries, "racoon"); ?> </table> <br><form action="diag_logs.php" method="post"> <input name="clear" type="submit" class="formbtn" value="Clear log"> |