Subversion Repositories ALCASAR

Rev

Rev 1233 | Rev 1500 | 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>
12
<link rel="stylesheet" href="/css/style.css" type="text/css">
13
</HEAD>
1163 crox53 14
<body>
1410 richard 15
 
16
 
17
 
18
<?php
19
	$table = 1;
20
	if(isset($_GET['table'])){
21
		$table = $_GET['table'];
22
	}
23
?>
24
 
25
 
26
<?php
27
 
28
echo'
29
	<br />
30
		<table  width="100%" style="text-align: center;">
31
			<tr>
32
				<td width="33%"><a href="./security.php?table=1">'.$l_spoofing.'</a></td>
33
				<td width="33%"><a href="./security.php?table=2">'.$l_virus.'</a></td>
34
				<td width="33%"><a href="./security.php?table=3">'.$l_fail2ban.'</a></td>
35
			</tr>
36
		</table>
37
	<br />';
38
 
39
 
40
?>
41
 
42
 
43
<?php
44
 
45
if ( $table == 1){
46
 
47
	echo '	<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
48
			<tr><th>';
49
			echo "$l_spoofing";
50
		echo '</th></tr>
51
			<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" 
52
		height="2"></td></tr>
53
			<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
54
				<tr bgcolor="#666666"><td>
55
				<DIV style="width:100%;height:100%;overflow-x:hidden;overflow-y:scroll;">
56
				<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
57
					<tr><td valign="middle" align="left">';
58
 
59
					$fichier='/var/Save/logs/security/watchdog.log';
60
					$pointeur=fopen($fichier,"r");
61
					if ($pointeur){
62
						while (!feof($pointeur)){
63
							$ligne=fgets($pointeur);
64
								echo "$ligne</br>";
65
							}
66
						}
67
					fclose($pointeur);
68
			echo '		</td></tr>
69
				</TABLE>
70
				</DIV>
71
			</TABLE>
72
		</TABLE>';
73
 
74
 
75
} elseif ($table == 2){
76
echo '<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
77
<tr><th>';
78
echo "$l_virus";
79
echo '</th></tr>
1163 crox53 80
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" 
81
height="2"></td></tr>
82
	<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
83
		<tr bgcolor="#666666"><td>
1410 richard 84
		<DIV style="width:100%;height:100%;overflow-x:hidden;overflow-y:scroll;">
1233 richard 85
		<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
1410 richard 86
			<tr><td valign="middle" align="left">';
1163 crox53 87
			$fichier='/var/log/havp/access.log';
88
			$pointeur=fopen($fichier,"r");
89
			if ($pointeur){
90
				while (!feof($pointeur)){
91
					$ligne=fgets($pointeur);
92
						echo "$ligne</br>";
93
					}
94
				}
95
			fclose($pointeur);
1410 richard 96
echo '			</td></tr>
1163 crox53 97
		</TABLE>
1233 richard 98
		</DIV>
1163 crox53 99
	</TABLE>
1410 richard 100
</TABLE>';
101
} elseif ($table == 3){
102
echo '<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
103
<tr><th>';
104
echo "$l_fail2ban";
105
echo '</th></tr>
1163 crox53 106
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" 
107
height="2"></td></tr>
108
	<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
109
		<tr bgcolor="#666666"><td>
1410 richard 110
		<DIV style="width:100%;height:100%;overflow-x:hidden;overflow-y:scroll;">
1233 richard 111
		<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
1410 richard 112
			<tr><td valign="middle" align="left">';
113
 
1163 crox53 114
			$fichier='/var/log/fail2ban.log';
1180 crox53 115
			$unban="/Unban/";
116
			$ban="/Ban/";
1163 crox53 117
			$pointeur=fopen($fichier,"r");
118
			if ($pointeur){
119
				while (!feof($pointeur)){
120
					$ligne=fgets($pointeur);
1180 crox53 121
					if(preg_match($ban,$ligne,$r)){
1410 richard 122
						echo "<font color='red'>$ligne</font></br>";
1163 crox53 123
					}
1180 crox53 124
					if(preg_match($unban,$ligne,$r)){
1410 richard 125
						echo "<font color='orange'>$ligne</font></br>";
1165 crox53 126
					}
1163 crox53 127
				}
128
			fclose($pointeur);
1410 richard 129
			}
130
echo '			</td></tr>
1163 crox53 131
		</TABLE>
1233 richard 132
		</DIV>
1163 crox53 133
	</TABLE>
1410 richard 134
</TABLE>';
135
} else {
136
	echo 'Do not exist';
137
}
138
 
139
?>
1163 crox53 140
</body>
1201 crox53 141
</HTML>