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,17 → 44,9 |
|
if ( $table == 1){ |
|
echo ' <TABLE width="100%" border="0" cellspacing="0" cellpadding="0"> |
<tr><th>'; |
echo '<center><h3>'; |
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 '</h3></center><div class="container"><table class="table table-striped"><tbody>'; |
|
$fichier='/var/Save/security/watchdog.log'; |
$pointeur=fopen($fichier,"r"); |
61,55 → 53,41 |
if ($pointeur){ |
while (!feof($pointeur)){ |
$ligne=fgets($pointeur); |
echo "$ligne</br>"; |
echo "<tr><td>$ligne</td></tr>"; |
} |
} |
else |
{ |
echo '<tr><center>Empty</center></tr>'; |
} |
fclose($pointeur); |
echo ' </td></tr> |
</TABLE> |
</DIV> |
</TABLE> |
</TABLE>'; |
echo '</tbody></table></div>'; |
|
|
} elseif ($table == 2){ |
echo '<TABLE width="100%" border="0" cellspacing="0" cellpadding="0"> |
<tr><th>'; |
echo '<center><h3>'; |
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">'; |
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 "$ligne</br>"; |
echo "<tr><td>$ligne</td></tr>"; |
} |
} |
else |
{ |
echo '<tr><center>Empty</center></tr>'; |
} |
fclose($pointeur); |
echo ' </td></tr> |
</TABLE> |
</DIV> |
</TABLE> |
</TABLE>'; |
echo '</tbody></table></div>'; |
|
} elseif ($table == 3){ |
echo '<TABLE width="100%" border="0" cellspacing="0" cellpadding="0"> |
<tr><th>'; |
echo '<center><h3>'; |
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 '</h3></center><div class="container"><table class="table table-striped"><tbody>'; |
|
$fichier='/var/log/fail2ban.log'; |
$unban="/Unban/"; |
119,19 → 97,19 |
while (!feof($pointeur)){ |
$ligne=fgets($pointeur); |
if(preg_match($ban,$ligne,$r)){ |
echo "<font color='red'>$ligne</font></br>"; |
echo "<tr><td><font color='red'>$ligne</font></td></tr>"; |
} |
if(preg_match($unban,$ligne,$r)){ |
echo "<font color='orange'>$ligne</font></br>"; |
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'; |
} |