Rev 1233 | Rev 1500 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log
<?php
//gestion de la langue
if (is_file("../lib/langues.php"))
include("../lib/langues.php");
?>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN//2.0">
<HTML>
<!-- written by Crox -->
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<TITLE>menu</TITLE>
<link rel="stylesheet" href="/css/style.css" type="text/css">
</HEAD>
<body>
<?php
$table = 1;
if(isset($_GET['table'])){
$table = $_GET['table'];
}
?>
<?php
echo'
<br />
<table width="100%" style="text-align: center;">
<tr>
<td width="33%"><a href="./security.php?table=1">'.$l_spoofing.'</a></td>
<td width="33%"><a href="./security.php?table=2">'.$l_virus.'</a></td>
<td width="33%"><a href="./security.php?table=3">'.$l_fail2ban.'</a></td>
</tr>
</table>
<br />';
?>
<?php
if ( $table == 1){
echo ' <TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th>';
echo "$l_spoofing";
echo '</th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></tr>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
<tr bgcolor="#666666"><td>
<DIV style="width:100%;height:100%;overflow-x:hidden;overflow-y:scroll;">
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left">';
$fichier='/var/Save/logs/security/watchdog.log';
$pointeur=fopen($fichier,"r");
if ($pointeur){
while (!feof($pointeur)){
$ligne=fgets($pointeur);
echo "$ligne</br>";
}
}
fclose($pointeur);
echo ' </td></tr>
</TABLE>
</DIV>
</TABLE>
</TABLE>';
} elseif ($table == 2){
echo '<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th>';
echo "$l_virus";
echo '</th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></tr>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
<tr bgcolor="#666666"><td>
<DIV style="width:100%;height:100%;overflow-x:hidden;overflow-y:scroll;">
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left">';
$fichier='/var/log/havp/access.log';
$pointeur=fopen($fichier,"r");
if ($pointeur){
while (!feof($pointeur)){
$ligne=fgets($pointeur);
echo "$ligne</br>";
}
}
fclose($pointeur);
echo ' </td></tr>
</TABLE>
</DIV>
</TABLE>
</TABLE>';
} elseif ($table == 3){
echo '<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th>';
echo "$l_fail2ban";
echo '</th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></tr>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
<tr bgcolor="#666666"><td>
<DIV style="width:100%;height:100%;overflow-x:hidden;overflow-y:scroll;">
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left">';
$fichier='/var/log/fail2ban.log';
$unban="/Unban/";
$ban="/Ban/";
$pointeur=fopen($fichier,"r");
if ($pointeur){
while (!feof($pointeur)){
$ligne=fgets($pointeur);
if(preg_match($ban,$ligne,$r)){
echo "<font color='red'>$ligne</font></br>";
}
if(preg_match($unban,$ligne,$r)){
echo "<font color='orange'>$ligne</font></br>";
}
}
fclose($pointeur);
}
echo ' </td></tr>
</TABLE>
</DIV>
</TABLE>
</TABLE>';
} else {
echo 'Do not exist';
}
?>
</body>
</HTML>