Subversion Repositories ALCASAR

Rev

Rev 1500 | Rev 1867 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
1163 crox53 1
<?php
2
//gestion de la langue
3
if (is_file("../lib/langues.php"))
4
	include("../lib/langues.php");
5
?>
1201 crox53 6
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN//2.0">
7
<HTML>
8
<!-- written by Crox -->
9
<HEAD>
10
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
11
<TITLE>menu</TITLE>
1858 raphael.pi 12
<link rel="stylesheet" href="../../../css/bootstrap.min.css">
13
  <script src="../../../js/jquery.min.js"></script>
14
  <script src="../../../js/bootstrap.min.js"></script>
1201 crox53 15
</HEAD>
1163 crox53 16
<body>
1410 richard 17
 
18
 
19
 
20
<?php
21
	$table = 1;
22
	if(isset($_GET['table'])){
23
		$table = $_GET['table'];
24
	}
25
?>
26
 
27
 
28
<?php
29
 
30
echo'
31
	<br />
1858 raphael.pi 32
			<div class="btn-group btn-group-justified" role="group" aria-label="Justified button group"> 
33
			<a href="./security.php?table=1" class="btn btn-default" role="button">'.$l_spoofing.'</a> 
34
			<a href="./security.php?table=2" class="btn btn-default" role="button">'.$l_virus.'</a>
35
			<a href="./security.php?table=3" class="btn btn-default" role="button">'.$l_fail2ban.'</a>  
36
			</div>
1410 richard 37
	<br />';
38
 
39
 
40
?>
41
 
42
 
43
<?php
44
 
45
if ( $table == 1){
46
 
1858 raphael.pi 47
	echo '<center><h3>';
48
	echo "$l_spoofing";
49
	echo '</h3></center><div class="container"><table class="table table-striped"><tbody>';
1410 richard 50
 
1858 raphael.pi 51
	$fichier='/var/Save/security/watchdog.log';
52
	$pointeur=fopen($fichier,"r");
53
	if ($pointeur){
54
	while (!feof($pointeur)){
55
		$ligne=fgets($pointeur);
56
		echo "<tr><td>$ligne</td></tr>";
57
		}
58
	}
59
	else
60
	{
61
		echo '<tr><center>Empty</center></tr>';
62
	}
63
	fclose($pointeur);
64
	echo '</tbody></table></div>';
1410 richard 65
 
66
 
67
} elseif ($table == 2){
1858 raphael.pi 68
	echo '<center><h3>';
69
	echo "$l_virus";
70
	echo '</h3></center><div class="container"><table class="table table-striped"><tbody>';
71
 
72
	$fichier='/var/log/havp/access.log';
73
	$pointeur=fopen($fichier,"r");
74
	if ($pointeur){
75
	while (!feof($pointeur)){
76
		$ligne=fgets($pointeur);
77
		echo "<tr><td>$ligne</td></tr>";
78
		}
79
	}
80
	else
81
	{
82
		echo '<tr><center>Empty</center></tr>';
83
	}
84
	fclose($pointeur);
85
	echo '</tbody></table></div>';
86
 
1410 richard 87
} elseif ($table == 3){
1858 raphael.pi 88
	echo '<center><h3>';
89
	echo "$l_fail2ban";
90
	echo '</h3></center><div class="container"><table class="table table-striped"><tbody>';
1410 richard 91
 
1858 raphael.pi 92
	$fichier='/var/log/fail2ban.log';
93
	$unban="/Unban/";
94
	$ban="/Ban/";
95
	$pointeur=fopen($fichier,"r");
96
	if ($pointeur){
97
		while (!feof($pointeur)){
98
			$ligne=fgets($pointeur);
99
			if(preg_match($ban,$ligne,$r)){
100
				echo "<tr><td><font color='red'>$ligne</font></td></tr>";
101
			}
102
			if(preg_match($unban,$ligne,$r)){
103
				echo "<tr><td><font color='orange'>$ligne</font></td></tr>";
104
			}
105
		}
1163 crox53 106
			fclose($pointeur);
1858 raphael.pi 107
	}
108
	else
109
	{
110
		echo '<tr><center>Empty</center></tr>';
111
	}
112
	echo '</tbody></table></div>';
1410 richard 113
} else {
114
	echo 'Do not exist';
115
}
116
 
117
?>
1163 crox53 118
</body>
1201 crox53 119
</HTML>