Subversion Repositories ALCASAR

Rev

Rev 1858 | Rev 2292 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

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