Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1857 → Rev 1858

/web/acc/manager/htdocs/security.php
9,7 → 9,9
<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">
<link rel="stylesheet" href="../../../css/bootstrap.min.css">
<script src="../../../js/jquery.min.js"></script>
<script src="../../../js/bootstrap.min.js"></script>
</HEAD>
<body>
 
27,13 → 29,11
 
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>
<div class="btn-group btn-group-justified" role="group" aria-label="Justified button group">
<a href="./security.php?table=1" class="btn btn-default" role="button">'.$l_spoofing.'</a>
<a href="./security.php?table=2" class="btn btn-default" role="button">'.$l_virus.'</a>
<a href="./security.php?table=3" class="btn btn-default" role="button">'.$l_fail2ban.'</a>
</div>
<br />';
 
 
44,94 → 44,72
 
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">';
echo '<center><h3>';
echo "$l_spoofing";
echo '</h3></center><div class="container"><table class="table table-striped"><tbody>';
 
$fichier='/var/Save/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>';
$fichier='/var/Save/security/watchdog.log';
$pointeur=fopen($fichier,"r");
if ($pointeur){
while (!feof($pointeur)){
$ligne=fgets($pointeur);
echo "<tr><td>$ligne</td></tr>";
}
}
else
{
echo '<tr><center>Empty</center></tr>';
}
fclose($pointeur);
echo '</tbody></table></div>';
 
 
} 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>';
echo '<center><h3>';
echo "$l_virus";
echo '</h3></center><div class="container"><table class="table table-striped"><tbody>';
$fichier='/var/log/havp/access.log';
$pointeur=fopen($fichier,"r");
if ($pointeur){
while (!feof($pointeur)){
$ligne=fgets($pointeur);
echo "<tr><td>$ligne</td></tr>";
}
}
else
{
echo '<tr><center>Empty</center></tr>';
}
fclose($pointeur);
echo '</tbody></table></div>';
} 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">';
echo '<center><h3>';
echo "$l_fail2ban";
echo '</h3></center><div class="container"><table class="table table-striped"><tbody>';
 
$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>";
}
}
$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 "<tr><td><font color='red'>$ligne</font></td></tr>";
}
if(preg_match($unban,$ligne,$r)){
echo "<tr><td><font color='orange'>$ligne</font></td></tr>";
}
}
fclose($pointeur);
}
echo ' </td></tr>
</TABLE>
</DIV>
</TABLE>
</TABLE>';
}
else
{
echo '<tr><center>Empty</center></tr>';
}
echo '</tbody></table></div>';
} else {
echo 'Do not exist';
}