/web/acc/admin/bl_categories_help.php |
---|
6,8 → 6,8 |
$bl_dir="/etc/e2guardian/lists/blacklists/"; |
$bl_iptables_dir="/usr/local/share/iptables-bl/"; |
$wl_iptables_dir="/usr/local/share/iptables-wl/"; |
$bl_dnsmasq_dir="/usr/local/share/dnsmasq-bl/"; |
$wl_dnsmasq_dir="/usr/local/share/dnsmasq-wl/"; |
$bl_unbound_dir="/usr/local/share/unbound-bl/"; |
$wl_unbound_dir="/usr/local/share/unbound-wl/"; |
# Choice of language |
$Language = 'en'; |
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) |
42,7 → 42,6 |
$l_example="Example(s) : "; |
$l_error_cat = "Error category"; |
$l_error_list = "Error listing"; |
} |
if(isset($_GET['cat'])) |
{ |
62,7 → 61,7 |
} |
if($liste == "bl") |
{ |
$bl_categorie_domain_file = $bl_dnsmasq_dir.$categorie.".conf"; |
$bl_categorie_domain_file = $bl_unbound_dir.$categorie.".conf"; |
$bl_categorie_url_file = $bl_dir.$categorie."/urls"; |
$bl_categorie_ip_file = $bl_iptables_dir.$categorie; |
//don't calc again on reload (click on the number of domain/urls/ip) |
75,32 → 74,57 |
else |
{ |
if (file_exists($bl_categorie_domain_file)) |
$nb_domains = exec("wc -l $bl_categorie_domain_file | cut -d ' ' -f1"); |
{ |
# two lines per domain |
$nb_domains = exec("wc -l $bl_categorie_domain_file | cut -d ' ' -f1") / 2; |
} |
else |
{ |
$nb_domains = $l_error_open_file." ".$bl_categorie_domain_file; |
} |
if (file_exists($bl_categorie_url_file)) |
{ |
$nb_urls = exec ("wc -l $bl_categorie_url_file | cut -d ' ' -f1"); |
} |
else |
{ |
$nb_urls = $l_error_open_file." ".$bl_categorie_url_file; |
} |
if(file_exists($bl_categorie_ip_file)) |
{ |
$nb_ip = exec("wc -l $bl_categorie_ip_file | cut -d ' ' -f1"); |
} |
else |
{ |
$nb_ip = $l_error_open_file." ".$bl_categorie_ip_file; |
} |
} |
} |
else |
{ |
$wl_categorie_domain_file = $wl_dnsmasq_dir.$categorie.".conf"; |
$wl_categorie_domain_file = $wl_unbound_dir.$categorie.".conf"; |
$wl_categorie_ip_file = $wl_iptables_dir.$categorie; |
if (file_exists($wl_categorie_domain_file)) |
{ |
$nb_domains = exec("wc -l $wl_categorie_domain_file | cut -d ' ' -f1"); |
} |
else |
{ |
$nb_domains = $l_error_open_file." ".$wl_categorie_domain_file; |
} |
if (file_exists($wl_categorie_ip_file)) |
{ |
$nb_ip = exec("wc -l $wl_categorie_ip_file | cut -d ' ' -f1"); |
} |
else |
{ |
$nb_ip = 0; |
//$nb_ip = $l_error_open_file." ".$wl_categorie_ip_file; |
} |
$nb_urls = 0; //no urls in WL |
} |
$global_usage = file($bl_dir."global_usage"); |
111,9 → 135,13 |
foreach($global_usage as $line) |
{ |
if(preg_match("#^NAME:.$categorie$#", $line) == 1) |
{ |
$fin1 = 1; |
} |
if($fin1 && preg_match("#^DESC.$langue:.#", $line) == 1) |
{ |
$l_description_cat = preg_replace("#^DESC.$langue:.#", "", $line); |
} |
if($fin1 && preg_match("#^NAME.$langue:.#", $line) == 1) |
{ |
$l_name_cat = preg_replace("#^NAME.$langue:.#", "", $line); |
178,7 → 206,7 |
{ |
$filtre = $liste == "bl" ? $bl_categorie_domain_file : $wl_categorie_domain_file; |
exec("head -n 15 ".escapeshellarg($filtre)." | cut -d '/' -f2", $resultat); |
exec("head -n 15 ".escapeshellarg($filtre)." | grep 'transparent' | awk '{ print $2 }'", $resultat); |
} |
elseif($titre == "ip") |
{ |
190,7 → 218,9 |
exec("head -n 15 ".escapeshellarg($filtre), $resultat); |
} |
for($i=0; $i<count($resultat); $i++) |
{ |
echo $resultat[$i]."<br/>"; |
} |
?> |
</td></tr> |
</TABLE> |
197,4 → 227,3 |
<center><a href="javascript:window.close();"><b><?php echo "$l_close"; ?></b></a></center> |
</BODY> |
</HTML> |
/web/acc/admin/bl_filter.php |
---|
89,7 → 89,7 |
$l_rehabilitated_ip_explain="Entrez ici des IP bloquées par la liste noire <BR> que vous souhaitez réhabiliter."; |
$l_one_dns="Entrez une adresse DNS par ligne (exemple : www.domaine.com)"; |
$l_one_ip="Entrez une IP par ligne (exemple : 123.123.123.123)"; |
$l_one_dns_ip="Entrez un nom de domaine ou une adresse IP ou une adresse de réseau par ligne<br>exemple (domaine) : .domaine.org - exemple (ip) : 61.54.52.56 - exemple (réseau) : 172.16.0.0/16"; |
$l_one_dns_ip="Entrez un nom de domaine ou une adresse IP ou une adresse de réseau par ligne<br>exemple (domaine) : domaine.org. - exemple (ip) : 61.54.52.56 - exemple (réseau) : 172.16.0.0/16"; |
$l_record="Enregistrer les modifications"; |
$l_wait="Une fois validées, 10 secondes sont nécessaires pour traiter vos modifications"; |
$l_ip_filtering="Filtrer les URLs contenant une adresse IP au lieu d'un nom de domaine (ex: http://25.56.58.59/index.htm)"; |
133,9 → 133,9 |
$l_add_to_bl="Domain names or IP addresses to add to the blacklist"; |
$l_rehabilitated_ip="IP addresses to rehabilitated"; |
$l_rehabilitated_ip_explain="Enter here IP that are blocked by the blacklist <BR> and you want to rehabilitate."; |
$l_one_dns="Enter one DNS per row (example : www.domaine.com)"; |
$l_one_dns="Enter one DNS per row (example : www.domain.com)"; |
$l_one_ip="Enter one IP per row (example : 123.123.123.123)"; |
$l_one_dns_ip="Enter one domain name or one IP address or one network address per row <br>example (domain): .domain.org - example (ip): 61.54.56.52 - example (network) : 172.16.0.0/16"; |
$l_one_dns_ip="Enter one domain name or one IP address or one network address per row <br>example (domain): domain.org. - example (ip): 61.54.56.52 - example (network) : 172.16.0.0/16"; |
$l_record="Save changes"; |
$l_wait="Once validated, 10 seconds are necessary to compute your modifications"; |
$l_ip_filtering="Filtering URLs that contain an IP address instead of a domain name (ie: http://25.56.58.59/index.htm)"; |
165,16 → 165,18 |
$dir_blacklist=$dir_dg."blacklists/"; |
$dir_bl_ip="/usr/local/share/iptables-bl/"; |
$dir_bl_ip_enabled="/usr/local/share/iptables-bl-enabled/"; |
$dir_bl_domain_names="/usr/local/share/dnsmasq-bl/"; |
$dir_bl_domain_names_enabled="/usr/local/share/dnsmasq-bl-enabled/"; |
$dir_bl_domain_names="/usr/local/share/unbound-bl/"; |
$dir_bl_domain_names_enabled="/usr/local/share/unbound-bl-enabled/"; |
$bl_categories=$dir_etc."alcasar-bl-categories"; |
$bl_categories_enabled=$dir_etc."alcasar-bl-categories-enabled"; |
$conf_file=$dir_etc."alcasar.conf"; |
$urlregex_file=$dir_dg."urlregexplist"; |
$domainfilter_file="/etc/unbound/conf.d/blacklist/domainfilter.conf"; |
$bannedsite_file=$dir_dg."bannedsitelist"; |
$dir_tmp="/tmp/blacklists"; |
$update_file_cat="/usr/local/etc/update_cat.conf"; |
$bl_safesearch="off"; |
$bl_pureip="off"; |
# default values |
if (is_file ($conf_file)) |
185,15 → 187,28 |
foreach ($tab as $line) |
{ |
$field=explode("=", $line); |
if ($field[0] == "PRIVATE_IP") |
{ |
switch ($field[0]) { |
case 'PRIVATE_IP': |
$PRIVATE_IP_MASK=trim($field[1]); |
$tmp = explode("/",$PRIVATE_IP_MASK); |
$PRIVATE_IP=$tmp[0]; |
break; |
case 'BL_SAFESEARCH': |
if (strtolower(trim($field[1])) == 'on') { |
$bl_safesearch='on'; |
} |
break; |
case 'BL_PUREIP': |
if (strtolower(trim($field[1])) == 'on') { |
$bl_pureip='on'; |
} |
break; |
} |
} |
} |
} |
else { echo "$l_error_open_file $conf_file";} |
if (isset($_POST['choix'])){ $choix=$_POST['choix']; } else { $choix=""; } |
switch ($choix) |
245,13 → 260,14 |
exec ("sudo /usr/local/bin/alcasar-bl.sh --reload"); |
break; |
case 'Specific_filtering' : |
$pureip="-pureip_off"; $safesearch="-safesearch_off"; ; |
$bl_pureip='off'; |
$bl_safesearch='off'; |
foreach ($_POST as $key => $value) |
{ |
if (strstr($key,'chk-ip')) $pureip="-pureip_on"; |
if (strstr($key,'chk-safesearch')) $safesearch="-safesearch_on"; |
if (strstr($key,'chk-ip')) $bl_pureip="on"; |
if (strstr($key,'chk-safesearch')) $bl_safesearch="on"; |
} |
exec ("sudo /usr/local/bin/alcasar-url_filter_bl.sh $safesearch $pureip"); |
exec ("sudo /usr/local/bin/alcasar-url_filter_bl.sh -safesearch_$bl_safesearch -pureip_$bl_pureip"); |
break; |
case 'MAJ_ossi_file' : |
foreach($_POST as $fichier => $value) |
342,7 → 358,7 |
<?php |
echo "<center>"; |
// total number of IP, DNS & URLs |
$nbDomainNames = exec("wc -l /usr/local/share/dnsmasq-bl/* | tail -n 1 | awk '{print $1}'"); |
$nbDomainNames = exec("wc -l /usr/local/share/unbound-bl/* | tail -n 1 | awk '{print $1}'") / 2; |
$nbUrl = exec("for file in `find /etc/e2guardian/lists/blacklists/ -name 'urls'`; do nb=$((nb+$(wc -l \$file | awk '{print $1}'))); done; echo \$nb"); |
$nbIp = exec("wc -l /usr/local/share/iptables-bl/* | tail -n 1 | awk '{print $1}'"); |
echo "<b>$l_nbDomainNames</b> $nbDomainNames, <b>$l_nbUrl</b> $nbUrl, <b>$l_nbIp</b> $nbIp<br/>"; |
366,9 → 382,10 |
$cols++; |
if ($cols > 10) { |
echo "</tr>\n"; |
$cols=1; } |
$cols=1; |
} |
} |
} |
else { |
echo "$l_error_open_file $bl_categories"; |
} |
451,59 → 468,14 |
<input type='hidden' name='choix' value='Specific_filtering'> |
<table width="100%" border=1 cellspacing=0 cellpadding=1> |
<tr><td> |
<input type='checkbox' name='chk-ip' |
<?php |
// verify "pureip" filtering state |
if (file_exists($bannedsite_file)) |
{ |
$pointeur=fopen($bannedsite_file,"r"); |
while (!feof ($pointeur)) |
{ |
$ligne=fgets($pointeur, 4096); |
if ($ligne) |
{ |
if (preg_match('/^\*ip$/',$ligne, $r)) |
{ |
echo " checked"; |
break; |
} |
} |
} |
fclose($pointeur); |
} |
else { |
echo "$l_error_open_file $bannedsite_file"; |
} |
echo "> $l_ip_filtering"; |
?> |
<input type='checkbox' name='chk-ip' <?= $bl_pureip == 'on' ? 'checked' : ''; ?>><?= $l_ip_filtering; ?> |
</td></tr> |
<tr><td> |
<input type='checkbox' name='chk-safesearch' |
<?php |
// verify "safesearch" filtering state |
if (file_exists($urlregex_file)) |
{ |
$pointeur=fopen($urlregex_file,"r"); |
while (!feof ($pointeur)) |
{ |
$ligne=fgets($pointeur, 4096); |
if ($ligne) |
{ |
if (preg_match('/^\"\(\^http\:\/\/\[0\-9a\-z\]\+\\\.google/',$ligne, $r)) |
{ |
echo " checked"; |
break; |
} |
} |
} |
fclose($pointeur); |
} |
else { |
echo "$l_error_open_file $urlregex_file"; |
} |
echo "> $l_safe_searching<tr><td>"; |
echo "<input type='submit' onClick=\"this.disabled=true; this.value='$l_load';submit();\" value='$l_record'></td></tr>"; |
?> |
<input type='checkbox' name='chk-safesearch' <?= $bl_safesearch == 'on' ? 'checked' : ''; ?>><?= $l_safe_searching; ?> |
</tr></td> |
<tr><td> |
<?= "<input type='submit' onClick=\"this.disabled=true; this.value='$l_load';submit();\" value='$l_record'>"; ?> |
</td></tr> |
</table> |
</form> |
</BODY> |
/web/acc/admin/network.php |
---|
226,10 → 226,6 |
$field = preg_split("/\s+/",$line); |
$ip_addr = $field[0]; |
$host_name = trim($field[1]); |
if (strcmp($add_ip, $ip_addr) === 0) { |
$insert = false; |
break; |
} |
if (strcasecmp($add_host, $host_name) === 0) { |
$insert = false; |
break; |
237,7 → 233,7 |
} |
} |
if ($insert) { |
exec("sudo /usr/local/bin/alcasar-dns-local.sh -add $add_ip $add_host"); |
exec("sudo /usr/local/bin/alcasar-dns-local.sh --add $add_ip $add_host"); |
} |
} |
} |
/web/acc/admin/services.php |
---|
31,10 → 31,11 |
$l_vnstat = "Grapheur de flux réseau"; |
$l_havp = "Proxy Antivirus"; |
$l_tinyproxy = "Proxy HTTP léger"; |
$l_dnsmasq = "Serveur DNS principal"; |
$l_dnsmasq_blacklist = "Serveur DNS pour la Blacklist"; |
$l_dnsmasq_whitelist = "Serveur DNS pour la Whitelist"; |
$l_dnsmasq_blackhole = "Serveur DNS 'trou noir'"; |
$l_unbound = "Serveur DNS principal"; |
$l_unbound_blacklist = "Serveur DNS pour la Blacklist"; |
$l_unbound_whitelist = "Serveur DNS pour la Whitelist"; |
$l_dnsmasq_whitelist = "Serveur DNS pour la Whitelist (IPSET)"; |
$l_unbound_blackhole = "Serveur DNS 'trou noir'"; |
$l_ulogd_ssh = "journalisation des accès par SSH"; |
$l_ulogd_ext_access = "journalisation des tentatives d'accès externes"; |
$l_ulogd_traceability = "journalisation des connexions WEB filtrés"; |
69,10 → 70,11 |
$l_vnstat = "Network grapher"; |
$l_havp = "Antivirus Proxy"; |
$l_tinyproxy = "Light HTTP Proxy"; |
$l_dnsmasq = "Main DNS server"; |
$l_dnsmasq_blacklist = "Blacklist DNS server"; |
$l_dnsmasq_whitelist = "Whitelist DNS server"; |
$l_dnsmasq_blackhole = "Blackhole DNS server"; |
$l_unbound = "Main DNS server"; |
$l_unbound_blacklist = "Blacklist DNS server"; |
$l_unbound_whitelist = "Whitelist DNS server"; |
$l_dnsmasq_whitelist = "Whitelist DNS server (IPSET)"; |
$l_unbound_blackhole = "Blackhole DNS server"; |
$l_ulogd_ssh = "SSH access logging process"; |
$l_ulogd_ext_access = "Extern access attempts logging process"; |
$l_ulogd_traceability = "Filtering WEB access logging process"; |
135,7 → 137,7 |
//------------------------------- |
// Actions on services |
//------------------------------- |
$autorizeService = array("radiusd","chilli","mysqld","lighttpd","dnsmasq","ulogd-ssh","ulogd-ext-access","ulogd-traceability","dnsmasq-blacklist","dnsmasq-whitelist","dnsmasq-blackhole","e2guardian","havp","tinyproxy","freshclam","sshd","ntpd","fail2ban","nfsen","vnstat"); |
$autorizeService = array("radiusd","chilli","mysqld","lighttpd","unbound-forward","ulogd-ssh","ulogd-ext-access","ulogd-traceability","unbound-blacklist","unbound-whitelist","dnsmasq-whitelist","unbound-blackhole","e2guardian","havp","tinyproxy","freshclam","sshd","ntpd","fail2ban","nfsen","vnstat"); |
$autorizeAction = array("start","stop","restart"); |
if (isset($_GET['service'])&&(in_array($_GET['service'], $autorizeService))) { |
168,15 → 170,16 |
$MainServiceStatus['radiusd'] = checkServiceStatus("radiusd"); |
$MainServiceStatus['mysqld'] = checkServiceStatus("mysqld"); |
$MainServiceStatus['lighttpd'] = checkServiceStatus("lighttpd"); |
$MainServiceStatus['dnsmasq'] = checkServiceStatus("dnsmasq"); |
$MainServiceStatus['unbound'] = checkServiceStatus("unbound-forward"); |
$MainServiceStatus['ulogd_ssh'] = checkServiceStatus("ulogd-ssh"); |
$MainServiceStatus['ulogd_ext_access'] = checkServiceStatus("ulogd-ext-access"); |
$MainServiceStatus['ulogd_traceability'] = checkServiceStatus("ulogd-traceability"); |
$FilterServiceStatus = array(); |
$FilterServiceStatus['dnsmasq_blacklist'] = checkServiceStatus("dnsmasq-blacklist"); |
$FilterServiceStatus['unbound_blacklist'] = checkServiceStatus("unbound-blacklist"); |
$FilterServiceStatus['unbound_whitelist'] = checkServiceStatus("unbound-whitelist"); |
$FilterServiceStatus['dnsmasq_whitelist'] = checkServiceStatus("dnsmasq-whitelist"); |
$FilterServiceStatus['dnsmasq_blackhole'] = checkServiceStatus("dnsmasq-blackhole"); |
$FilterServiceStatus['unbound_blackhole'] = checkServiceStatus("unbound-blackhole"); |
$FilterServiceStatus['e2guardian'] = checkServiceStatus("e2guardian"); |
$FilterServiceStatus['havp'] = checkServiceStatus("havp"); |
$FilterServiceStatus['tinyproxy'] = checkServiceStatus("tinyproxy"); |
/web/acc/admin/wl_filter.php |
---|
76,7 → 76,7 |
$l_wl_categories="Sélectionnez les catégories à autoriser"; |
$l_specific_filtering="Filtrage special"; |
$l_add_to_wl="Noms de domaine ou adresses IP à ajouter à la liste blanche"; |
$l_one_dns_ip="Entrez un nom de domaine ou une adresse IP ou une adresse de réseau par ligne<br>exemple (domaine) : .domaine.org - exemple (ip) : 61.54.52.56 - exemple (réseau) : 172.16.0.0/16"; |
$l_one_dns_ip="Entrez un nom de domaine ou une adresse IP ou une adresse de réseau par ligne<br>exemple (domaine) : domaine.org. - exemple (ip) : 61.54.52.56 - exemple (réseau) : 172.16.0.0/16"; |
$l_record="Enregistrer les modifications"; |
$l_wait="Une fois validées, 10 secondes sont nécessaires pour traiter vos modifications"; |
$l_safe_searching="Activer le contrôle scolaire/parental pour 'YouTube' et pour les moteurs de recherche 'Google', 'Bing' et 'Qwant'."; |
107,7 → 107,7 |
$l_specific_filtering="Specific filtering"; |
$l_allowed_dns="Allowed domain names"; |
$l_add_to_wl="Domain names or IP addresses to add to the whitelist"; |
$l_one_dns_ip="Enter one domain name or one IP address or one network address per row <br>example (domain): .domain.org - example (ip): 61.54.56.52 - example (network) : 172.16.0.0/16"; |
$l_one_dns_ip="Enter one domain name or one IP address or one network address per row <br>example (domain): domain.org. - example (ip): 61.54.56.52 - example (network) : 172.16.0.0/16"; |
$l_record="Save changes"; |
$l_wait="Once validated, 10 seconds are necessary to compute your modifications"; |
$l_safe_searching="Enabling school/parental control for 'YouTube' and for the search engines 'Google', 'Bing' and 'Qwant'"; |
135,15 → 135,16 |
$dir_blacklist=$dir_dg."blacklists/"; |
$dir_wl_ip="/usr/local/share/iptables-wl/"; |
$dir_wl_ip_enabled= "/usr/local/share/iptables-wl-enabled/"; |
$dir_wl_domain_names= "/usr/local/share/dnsmasq-wl/"; |
$dir_wl_domain_names_enabled= "/usr/local/share/dnsmasq-wl-enabled/"; |
$dir_wl_domain_names= "/usr/local/share/unbound-wl/"; |
$dir_wl_domain_names_enabled= "/usr/local/share/unbound-wl-enabled/"; |
$wl_categories=$dir_etc."alcasar-wl-categories"; |
$wl_categories_enabled=$dir_etc."alcasar-wl-categories-enabled"; |
$conf_file=$dir_etc."alcasar.conf"; |
$iptables_safesearch_file=$dir_wl_ip_enabled."ossi-ip-safesearch"; |
$domainfilter_file="/etc/unbound/conf.d/whitelist/domainfilter.conf"; |
$bannedsite_file=$dir_dg."bannedsitelist"; |
$dir_tmp="/tmp/blacklists"; |
$wl_safesearch="off"; |
# default values |
if (is_file ($conf_file)) |
154,15 → 155,22 |
foreach ($tab as $line) |
{ |
$field=explode("=", $line); |
if ($field[0] == "PRIVATE_IP") |
{ |
switch ($field[0]) { |
case 'PRIVATE_IP': |
$PRIVATE_IP_MASK=trim($field[1]); |
$tmp = explode("/",$PRIVATE_IP_MASK); |
$PRIVATE_IP=$tmp[0]; |
break; |
case 'WL_SAFESEARCH': |
if (strtolower(trim($field[1])) == 'on') { |
$wl_safesearch='on'; |
} |
break; |
} |
} |
} |
} |
else { echo "$l_error_open_file $conf_file";} |
if (isset($_POST['choix'])){ $choix=$_POST['choix']; } else { $choix=""; } |
switch ($choix) |
201,12 → 209,14 |
exec ("sudo /usr/local/bin/alcasar-bl.sh --reload"); |
break; |
case 'Specific_filtering' : |
$safesearch="-safesearch_off"; ; |
$wl_safesearch='off'; |
foreach ($_POST as $key => $value) |
{ |
if (strstr($key,'chk-safesearch')) $safesearch="-safesearch_on"; |
if (strstr($key,'chk-safesearch')) { |
$wl_safesearch='on'; |
} |
exec ("sudo /usr/local/bin/alcasar-url_filter_wl.sh $safesearch"); |
} |
exec ("sudo /usr/local/bin/alcasar-url_filter_wl.sh -safesearch_$wl_safesearch"); |
break; |
case 'MAJ_ossi_file' : |
foreach($_POST as $fichier => $value) |
269,9 → 279,9 |
<?php |
echo "<center>"; |
// total number of IP, DNS & URLs |
$nbDomainNames = exec("wc -l /usr/local/share/dnsmasq-wl/* | tail -n 1 | awk '{print $1}'"); |
$nbDomainNames = exec("wc -l $dir_wl_domain_names* | tail -n 1 | awk '{print $1}'"); |
$nbUrl = "0"; |
$nbIp = exec("wc -l /usr/local/share/iptables-wl/* | tail -n 1 | awk '{print $1}'"); |
$nbIp = exec("wc -l $dir_wl_ip* | tail -n 1 | awk '{print $1}'"); |
echo "<b>$l_nbDomainNames</b> $nbDomainNames, <b>$l_nbUrl</b> $nbUrl, <b>$l_nbIp</b> $nbIp<br/>"; |
echo "$l_wl_categories</center></td></tr>"; |
//read & display all WL categories (checked or not) |
293,9 → 303,10 |
$cols++; |
if ($cols > 10) { |
echo "</tr>"; |
$cols=1; } |
$cols=1; |
} |
} |
} |
else { |
echo "$l_error_open_file $wl_categories"; |
} |
350,17 → 361,11 |
<FORM action='wl_filter.php' method='POST'> |
<input type='hidden' name='choix' value='Specific_filtering'> |
<tr><td> |
<input type='checkbox' name='chk-safesearch' |
<?php |
// verify "safesearch" filtering state |
if (file_exists($iptables_safesearch_file)) |
{ |
echo " checked"; |
} |
echo "> $l_safe_searching<tr><td>"; |
echo "<input type='submit' onClick=\"this.disabled=true; this.value='$l_load';submit();\" value='$l_record'></td></tr>"; |
?> |
</FORM> |
<input type='checkbox' name='chk-safesearch' <?= $wl_safesearch == 'on' ? 'checked' : ''; ?>><?= $l_safe_searching; ?> |
</tr></td> |
<tr><td> |
<?= "<input type='submit' onClick=\"this.disabled=true; this.value='$l_load';submit();\" value='$l_record'>"; ?> |
</td></tr></FORM> |
</TABLE> |
</BODY> |
</HTML> |
/web/acc/phpsysinfo/includes/lang/en.php |
---|
45,13 → 45,13 |
$text['scsi'] = 'SCSI Devices'; |
// |
$text['portail'] = 'General Informations about ALCASAR portal'; |
$text['portail'] = 'General information about ALCASAR portal'; |
$text['portail-version']= 'Installed version'; |
$text['portail-disp'] = 'Available versions'; |
$text['utilisateur'] = 'logged user(s) / tot.'; |
$text['groupe'] = 'Number of group(s)'; |
$text['bl-version'] = 'Updated \'Blacklist\''; |
$text['internet_link'] = "Internet connexion"; |
$text['internet_link'] = "Internet connection"; |
$text['enable'] = "enable"; |
$text['disable'] = "disable"; |
$text['web_antivirus'] = "WEB antivirus"; |
/web/index.php |
---|
80,12 → 80,12 |
]; |
} |
// Test if it's a direct connexion to ALCASAR |
// Test if it's a direct connection to ALCASAR |
if (isset($_SERVER['HTTP_HOST']) && (($_SERVER['HTTP_HOST'] === $_SERVER['SERVER_ADDR']) || ($_SERVER['HTTP_HOST'] === 'alcasar') || ($_SERVER['HTTP_HOST'] === $hostname) || ($_SERVER['HTTP_HOST'] === $organisme))) { |
$direct_access = true; |
} |
// Function to adapt time connexion in seconds to H,M,S |
// Function to adapt time connection in seconds to H,M,S |
function secondsToDuration($seconds = null){ |
if ($seconds == null) return ""; |
$temp = $seconds % 3600; |
360,7 → 360,7 |
$l_explain_access_deny = "You try to connect to a resource whose content is deemed to contain inappropriate information."; |
$l_explain_net_pb = "Your portal has just detected that the Internet access is down"; |
$l_contact_access_deny = "Contact your security system manager if you think this filtering is abusive."; |
$l_contact_net_pb = "Contact your network responsive or your Internet provider for more information"; |
$l_contact_net_pb = "Contact your network responsive or your Internet provider for further information."; |
$l_sms_access = "<a href=\"//$hostname/autoregistrationinfo.php\">Auto Registration by SMS</a>"; |
$l_install_certif = "Install ALCASAR AC Certificate"; |
$l_install_certif_more = "Install ALCASAR AC Certificate"; |
368,12 → 368,12 |
$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Complementary help</a>"; |
$l_category = "category :"; |
if (!$user->connected) { |
$l_logout_explain = "No Internet consultation session is actualy open on your system"; |
$l_logout_explain = "No Internet consultation session is currently open on your system"; |
$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">Open an Internet session</a>"; |
} else { |
if ($user->username != $user->mac) { // authentication exception or not |
$l_logout_explain = "Close the session of the user currently connected.<br> User logged-on : <a href=\"$logout_link\" title=\"Disconnect user $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history last connections :$connection_history"; |
$l_logout = "<a href=\"$logout_link\">Logoff from internet</a>"; |
$l_logout_explain = "Close the session of the currently logged-in user.<br> User logged-on: <a href=\"$logout_link\" title=\"Disconnect user $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history last connections:$connection_history"; |
$l_logout = "<a href=\"$logout_link\">Logoff from the internet</a>"; |
} else { |
$l_logout_explain = "Your system ($user->username) is in exception of authentication.<br><br>$nb_connection_history Last logins :$connection_history"; |
$l_logout = "Connections information"; |
395,7 → 395,7 |
$l_title_warn="Dear user,"; |
$l_explain_warn_name="Someone called "; |
$l_explain_warn_ip="with this IP : "; |
$l_explain_warn_date="has read your connexion logs at "; |
$l_explain_warn_date="has read your connection logs at "; |
$l_explain_warn_reason="For this reason : "; |
$l_uam_domain = "Authorized websites : "; |
} |
461,16 → 461,12 |
// Search blacklist categories |
if ((!$direct_access) && (!$network_pb) && (!isset($_GET['warn']))) { |
$pattern = str_replace('www.', '', $_SERVER['HTTP_HOST']); |
$output = []; |
exec('grep -Re ' . escapeshellarg('^'.$pattern.'$') . " /etc/e2guardian/lists/blacklists/*/domains | cut -d'/' -f6", $output); |
$lists = []; |
foreach ($output as $line) { |
$lists[] = $line; |
} |
$categories = []; |
exec('grep -Re ' . escapeshellarg('^'.$pattern.'$') . " /etc/e2guardian/lists/blacklists/*/domains | cut -d'/' -f6", $categories); |
$filteredUrlHtml = $l_required_domain.' : '.htmlspecialchars($_SERVER['HTTP_HOST']); |
if (!empty($lists)) { |
$filteredUrlHtml .= "<br>$l_category ".implode(', ', $lists); |
if (!empty($categories)) { |
$filteredUrlHtml .= "<br>$l_category ".implode(', ', $categories); |
} |
} |
/web/language/alcasar-fr.txt |
---|
369,7 → 369,7 |
$l_e2guardian = "Filtre d'URL et de contenu WEB"; |
$l_mysqld = "Serveur de la base de données usager"; |
$l_squid = "Serveur de cache WEB"; |
$l_dnsmasq = "Serveur DNS et filtre de domaine"; |
$l_unbound = "Serveur DNS et filtre de domaine"; |
$l_httpd = "Serveur WEB (Centre de Gestion d'ALCASAR)"; |
$l_havp = "Filtre antivirus WEB"; |
$l_sshd = "Accès sécurisée à distance"; |