Subversion Repositories ALCASAR

Rev

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

Rev 2400 Rev 2521
Line 163... Line 163...
163
	$l_disable="Disable";
163
	$l_disable="Disable";
164
	$l_enable="Enable";
164
	$l_enable="Enable";
165
	$l_file_state="State";
165
	$l_file_state="State";
166
}
166
}
167
$dir_etc="/usr/local/etc/";
167
$dir_etc="/usr/local/etc/";
168
$dir_dg="/etc/dansguardian/lists/";
168
$dir_dg="/etc/e2guardian/lists/";
169
$dir_blacklist=$dir_dg."blacklists/";
169
$dir_blacklist=$dir_dg."blacklists/";
170
$dir_bl_ip="/usr/local/share/iptables-bl/";
170
$dir_bl_ip="/usr/local/share/iptables-bl/";
171
$dir_bl_ip_enabled="/usr/local/share/iptables-bl-enabled/";
171
$dir_bl_ip_enabled="/usr/local/share/iptables-bl-enabled/";
172
$dir_bl_domain_names="/usr/local/share/dnsmasq-bl/";
172
$dir_bl_domain_names="/usr/local/share/dnsmasq-bl/";
173
$dir_bl_domain_names_enabled="/usr/local/share/dnsmasq-bl-enabled/";
173
$dir_bl_domain_names_enabled="/usr/local/share/dnsmasq-bl-enabled/";
Line 283... Line 283...
283
		}
283
		}
284
	}
284
	}
285
	break;
285
	break;
286
case 'MAJ_ossi_file_upload' :
286
case 'MAJ_ossi_file_upload' :
287
	$file_name = str_replace (".", "_",basename($_FILES['fichier_ip']['name']));
287
	$file_name = str_replace (".", "_",basename($_FILES['fichier_ip']['name']));
288
	$dest_dir = $dir_blacklist."ossi-bl-".$file_name; # /etc/dansguardian/list/blacklist/ossi-bl-XXXXXXXX
288
	$dest_dir = $dir_blacklist."ossi-bl-".$file_name; # /etc/e2guardian/list/blacklist/ossi-bl-XXXXXXXX
289
	if((!empty($file_name)) && (!file_exists($dest_dir)))
289
	if((!empty($file_name)) && (!file_exists($dest_dir)))
290
	{
290
	{
291
		exec("mkdir ".escapeshellarg($dest_dir));
291
		exec("mkdir ".escapeshellarg($dest_dir));
292
		$file=$_FILES['fichier_ip']['tmp_name'];
292
		$file=$_FILES['fichier_ip']['tmp_name'];
293
		exec('/usr/bin/dos2unix '.escapeshellarg($file));
293
		exec('/usr/bin/dos2unix '.escapeshellarg($file));
Line 307... Line 307...
307
	break;
307
	break;
308
}
308
}
309
?>
309
?>
310
<table width="100%" border="0" cellspacing="0" cellpadding="0">
310
<table width="100%" border="0" cellspacing="0" cellpadding="0">
311
	<tr><th>
311
	<tr><th>
312
	<?php echo $l_list_version; echo date ("F d Y", filemtime ('/etc/dansguardian/lists/blacklists/README'));?>
312
	<?php echo $l_list_version; echo date ("F d Y", filemtime ('/etc/e2guardian/lists/blacklists/README'));?>
313
	</th></tr>
313
	</th></tr>
314
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
314
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
315
</table>
315
</table>
316
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
316
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
317
<tr><td valign="middle" align="left" colspan=10>
317
<tr><td valign="middle" align="left" colspan=10>
Line 345... Line 345...
345
<tr><td valign="middle" align="left" colspan=10>
345
<tr><td valign="middle" align="left" colspan=10>
346
<?php
346
<?php
347
echo "<center>";
347
echo "<center>";
348
// total number of IP, DNS & URLs
348
// total number of IP, DNS & URLs
349
$nbDomainNames = exec("wc -l /usr/local/share/dnsmasq-bl/* | tail -n 1 | awk '{print $1}'");
349
$nbDomainNames = exec("wc -l /usr/local/share/dnsmasq-bl/* | tail -n 1 | awk '{print $1}'");
350
$nbUrl = exec("for file in `find /etc/dansguardian/lists/blacklists/ -name 'urls'`; do nb=$((nb+$(wc -l \$file | awk '{print $1}'))); done; echo \$nb");
350
$nbUrl = exec("for file in `find /etc/e2guardian/lists/blacklists/ -name 'urls'`; do nb=$((nb+$(wc -l \$file | awk '{print $1}'))); done; echo \$nb");
351
$nbIp = exec("wc -l /usr/local/share/iptables-bl/* | tail -n 1 | awk '{print $1}'");
351
$nbIp = exec("wc -l /usr/local/share/iptables-bl/* | tail -n 1 | awk '{print $1}'");
352
echo "<b>$l_nbDomainNames</b> $nbDomainNames, <b>$l_nbUrl</b> $nbUrl, <b>$l_nbIp</b> $nbIp<br/>";
352
echo "<b>$l_nbDomainNames</b> $nbDomainNames, <b>$l_nbUrl</b> $nbUrl, <b>$l_nbIp</b> $nbIp<br/>";
353
echo "$l_bl_categories</center></td></tr>";	
353
echo "$l_bl_categories</center></td></tr>";	
354
//read & display all BL categories (checked or not)
354
//read & display all BL categories (checked or not)
355
$cols=1; 
355
$cols=1;