Subversion Repositories ALCASAR

Rev

Rev 2818 | Rev 2845 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2818 Rev 2841
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: security.php 2818 2020-05-10 21:53:28Z rexy $
2
# $Id: security.php 2841 2020-06-28 21:49:00Z rexy $
3
 
3
 
4
$language = 'en';
4
$language = 'en';
5
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
5
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
6
    $langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
6
    $langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
7
    $language = strtolower(substr(chop($langue[0]), 0, 2));
7
    $language = strtolower(substr(chop($langue[0]), 0, 2));
8
}
8
}
9
if ($language === 'fr') {
9
if ($language === 'fr') {
10
    $l_title = 'Sécurité';
10
    $l_title = 'Sécurité';
11
    $l_spoofing = "Adresse(s) MAC usurpée(s) (Watchdog)";
11
    $l_spoofing = "Adresse(s) MAC usurpée(s) (Watchdog)";
12
    $l_virus = "Virus bloqué(s) (HAVP)";
12
    $l_virus = "Virus bloqué(s) (CLAMAV)";
13
    $l_fail2ban = "Adresse(s) IP bloquée(s) (Fail2Ban)";
13
    $l_fail2ban = "Adresse(s) IP bloquée(s) (Fail2Ban)";
14
    $l_ipAddress="Adresse IP";
14
    $l_ipAddress="Adresse IP";
15
    $l_user = "L'utilisateur";
15
    $l_user = "L'utilisateur";
16
    $l_empty="Vide";
16
    $l_empty="Vide";
17
    $l_rule="Règle";
17
    $l_rule="Règle";
18
} else {
18
} else {
19
    $l_title = 'Security';
19
    $l_title = 'Security';
20
    $l_spoofing = "MAC address spoofed (Watchdog)";
20
    $l_spoofing = "MAC address spoofed (Watchdog)";
21
    $l_virus = "Virus blocked (HAVP)";
21
    $l_virus = "Virus blocked (CLAMAV)";
22
    $l_fail2ban = "IP address blocked (Fail2Ban)";
22
    $l_fail2ban = "IP address blocked (Fail2Ban)";
23
    $l_ipAddress="IP address";
23
    $l_ipAddress="IP address";
24
    $l_user = "User";
24
    $l_user = "User";
25
    $l_empty="Empty";
25
    $l_empty="Empty";
26
    $l_rule="Rule";
26
    $l_rule="Rule";
Line 99... Line 99...
99
				</tbody>
99
				</tbody>
100
				</table>
100
				</table>
101
			</div>
101
			</div>
102
<?php
102
<?php
103
} else if ($tab === 2) {
103
} else if ($tab === 2) {
104
	$filePath = '/var/log/havp/access.log';
104
	$filePath = '/var/log/clamav/clamd.log';
105
	$lines = file($filePath);
105
	$lines = file($filePath);
106
	if ($lines === false) {
106
	if ($lines === false) {
107
		exit("Cannot open '$filePath'.");
107
		exit("Cannot open '$filePath'.");
108
	}
108
	}
109
	$lines = array_reverse($lines);
109
	$lines = array_reverse($lines);