318 |
richard |
1 |
<?php
|
|
|
2 |
function echo_file ($filename)
|
|
|
3 |
{
|
|
|
4 |
if (file_exists($filename))
|
|
|
5 |
{
|
|
|
6 |
if (filesize($filename) != 0)
|
|
|
7 |
{
|
|
|
8 |
$pointeur=fopen($filename,"r");
|
|
|
9 |
$tampon = fread($pointeur, filesize($filename));
|
|
|
10 |
fclose($pointeur);
|
|
|
11 |
echo $tampon;
|
|
|
12 |
}
|
|
|
13 |
}
|
|
|
14 |
else
|
|
|
15 |
{
|
1041 |
richard |
16 |
echo "$filename doesn't exist";
|
318 |
richard |
17 |
}
|
|
|
18 |
}
|
|
|
19 |
?>
|
|
|
20 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
1041 |
richard |
21 |
<tr><th>
|
|
|
22 |
<?php echo $l_list_version; echo date ("F d Y", filemtime ('/etc/dansguardian/lists/blacklists/README'));?>
|
|
|
23 |
</th></tr>
|
318 |
richard |
24 |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
|
|
|
25 |
</table>
|
|
|
26 |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
|
|
|
27 |
<tr><td valign="middle" align="left" colspan=10>
|
1015 |
richard |
28 |
<FORM action='bl_filter.php' method=POST>
|
318 |
richard |
29 |
<?php
|
882 |
richard |
30 |
if ((file_exists("$dir_tmp/blacklists.tar.gz")) && (file_exists("$dir_tmp/md5sum")))
|
878 |
richard |
31 |
{
|
|
|
32 |
echo "$l_fingerprint"; echo_file ("$dir_tmp/md5sum");
|
|
|
33 |
echo "<br>$l_fingerprint2<a href='http://dsi.ut-capitole.fr/blacklists/download/MD5SUM.LST' target='cat_help' onclick=window.open('http://dsi.ut-capitole.fr/blacklists/download/MD5SUM.LST','cat_help','width=600,height=150,toolbar=no,scrollbars=yes,resizable=yes') title='verify fingerprint'>dsi.ut-capitole.fr/blacklists/download/MD5SUM.LST</a><br>";
|
1041 |
richard |
34 |
echo "<input type='hidden' name='choix' value='Active_list'>";
|
885 |
richard |
35 |
echo "<input type='submit' value='$l_activate_bl'> ($l_warning)</FORM>";
|
1015 |
richard |
36 |
echo "<FORM action='bl_filter.php' method=POST>";
|
1041 |
richard |
37 |
echo "<input type='hidden' name='choix' value='Reject_list'>";
|
885 |
richard |
38 |
echo "<input type='submit' value='$l_reject_bl'></form>";
|
878 |
richard |
39 |
}
|
|
|
40 |
else
|
|
|
41 |
{
|
1041 |
richard |
42 |
echo "<input type='hidden' name='choix' value='Download_list'>";
|
878 |
richard |
43 |
echo "<input type='submit' value='$l_download_bl'>";
|
|
|
44 |
echo " ($l_warning)";
|
|
|
45 |
}
|
318 |
richard |
46 |
?>
|
|
|
47 |
</FORM>
|
|
|
48 |
</td></tr>
|
1041 |
richard |
49 |
</table>
|
|
|
50 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
51 |
<tr><th><?php echo $l_bl; ?></th></tr>
|
|
|
52 |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
|
|
|
53 |
</table>
|
|
|
54 |
<table width="100%" border=1 cellspacing=0 cellpadding=1>
|
318 |
richard |
55 |
<tr><td valign="middle" align="left" colspan=10>
|
1015 |
richard |
56 |
<FORM action='bl_filter.php' method=POST>
|
1041 |
richard |
57 |
<input type='hidden' name='choix' value='MAJ_cat_bl'>
|
318 |
richard |
58 |
<?php
|
|
|
59 |
echo "<center>$l_bl_categories</center></td></tr>";
|
|
|
60 |
//on lit et on interprete le fichier de catégories
|
|
|
61 |
$cols=1;
|
|
|
62 |
if (file_exists($bl_categories))
|
|
|
63 |
{
|
|
|
64 |
$pointeur=fopen($bl_categories,"r");
|
|
|
65 |
while (!feof ($pointeur))
|
|
|
66 |
{
|
|
|
67 |
$ligne=fgets($pointeur, 4096);
|
|
|
68 |
if ($ligne)
|
|
|
69 |
{
|
|
|
70 |
if ($cols == 1) { echo "<tr>";}
|
|
|
71 |
$categorie=trim(basename($ligne));
|
|
|
72 |
echo "<td><a href='bl_categories_help.php?cat=$categorie' target='cat_help' onclick=window.open('bl_categories_help.php','cat_help','width=600,height=150,toolbar=no,scrollbars=no,resizable=yes') title='categories help page'>$categorie</a><br>";
|
|
|
73 |
echo "<input type='checkbox' name='chk-$categorie'";
|
|
|
74 |
// si la ligne est commentée -> categorie non selectionnée
|
|
|
75 |
if (preg_match('/^#/',$ligne, $r)) { echo ">";}
|
|
|
76 |
else { echo "checked>"; }
|
|
|
77 |
echo "</td>";
|
|
|
78 |
$cols++;
|
|
|
79 |
if ($cols > 10) {
|
|
|
80 |
echo "</tr>";
|
|
|
81 |
$cols=1; }
|
|
|
82 |
}
|
|
|
83 |
}
|
|
|
84 |
fclose($pointeur);
|
|
|
85 |
}
|
|
|
86 |
else {
|
|
|
87 |
echo "$l_error_open_file $bl_categories";
|
|
|
88 |
}
|
878 |
richard |
89 |
echo "</td></tr>";
|
|
|
90 |
echo "<tr><td valign='middle' align='left' colspan=10>";
|
876 |
richard |
91 |
echo "<center><b>$l_maj_rehabilitated</b></center></td></tr>";
|
|
|
92 |
echo "<tr><td colspan=5 align=center>";
|
|
|
93 |
echo "<H3>$l_rehabilitated_dns</H3>$l_rehabilitated_dns_explain<BR>$l_one_dns<BR>";
|
1041 |
richard |
94 |
echo "<textarea name='BL_rehabilited_domains' rows=3 cols=40>";
|
|
|
95 |
echo_file ($dir_dg."exceptionsitelist");
|
876 |
richard |
96 |
echo "</textarea></td>";
|
|
|
97 |
echo "<td colspan=5 align=center>";
|
|
|
98 |
echo "<H3>$l_rehabilitated_url</H3>$l_rehabilitated_url_explain<BR>$l_one_url<BR>";
|
1041 |
richard |
99 |
echo "<textarea name='BL_rehabilited_urls' rows=3 cols=40>";
|
|
|
100 |
echo_file ($dir_dg."exceptionurllist");
|
876 |
richard |
101 |
echo "</textarea></td></tr><tr><td colspan=10>";
|
878 |
richard |
102 |
echo "<tr><td valign='middle' align='left' colspan=10>";
|
|
|
103 |
echo "<center><b>$l_add_to_bl</b></center></td></tr>";
|
|
|
104 |
echo "<tr><td colspan=5 align=center>";
|
|
|
105 |
echo "<H3>$l_forbidden_dns</H3>$l_forbidden_dns_explain<BR>";
|
1041 |
richard |
106 |
echo "<textarea name='OSSI_bl_domains' rows=3 cols=40>";
|
|
|
107 |
echo_file ($dir_dg."blacklists/ossi/domains");
|
878 |
richard |
108 |
echo "</textarea></td>";
|
|
|
109 |
echo "<td colspan=5 align=center>";
|
|
|
110 |
echo "<H3>$l_forbidden_url</H3>$l_forbidden_url_explain<BR>";
|
1041 |
richard |
111 |
echo "<textarea name='OSSI_bl_urls' rows=3 cols=40>";
|
|
|
112 |
echo_file ($dir_dg."blacklists/ossi/urls");
|
878 |
richard |
113 |
echo "</textarea></td></tr><tr><td colspan=10>";
|
876 |
richard |
114 |
echo "<input type='submit' value='$l_record'>";
|
|
|
115 |
echo "</form> ($l_wait)";
|
|
|
116 |
?>
|
|
|
117 |
</td></tr>
|
318 |
richard |
118 |
</TABLE>
|
|
|
119 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
1041 |
richard |
120 |
<tr><th><?php echo $l_wl; ?></th></tr>
|
|
|
121 |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
|
|
|
122 |
</table>
|
|
|
123 |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
|
|
|
124 |
<tr><td valign="middle" align="left" colspan=10>
|
|
|
125 |
<FORM action='bl_filter.php' method=POST>
|
|
|
126 |
<input type='hidden' name='choix' value='MAJ_cat_wl'>
|
|
|
127 |
<?php
|
|
|
128 |
echo "<center>$l_wl_categories</center></td></tr>";
|
|
|
129 |
//on lit et on interprete le fichier de catégories
|
|
|
130 |
$cols=1;
|
|
|
131 |
if (file_exists($wl_categories))
|
|
|
132 |
{
|
|
|
133 |
$pointeur=fopen($wl_categories,"r");
|
|
|
134 |
while (!feof ($pointeur))
|
|
|
135 |
{
|
|
|
136 |
$ligne=fgets($pointeur, 4096);
|
|
|
137 |
if ($ligne)
|
|
|
138 |
{
|
|
|
139 |
if ($cols == 1) { echo "<tr>";}
|
|
|
140 |
$categorie=trim(basename($ligne));
|
|
|
141 |
echo "<td><a href='bl_categories_help.php?cat=$categorie' target='cat_help' onclick=window.open('bl_categories_help.php','cat_help','width=600,height=150,toolbar=no,scrollbars=no,resizable=yes') title='categories help page'>$categorie</a><br>";
|
|
|
142 |
echo "<input type='checkbox' name='chk-$categorie'";
|
|
|
143 |
// si la ligne est commentée -> categorie non selectionnée
|
|
|
144 |
if (preg_match('/^#/',$ligne, $r)) { echo ">";}
|
|
|
145 |
else { echo "checked>"; }
|
|
|
146 |
echo "</td>";
|
|
|
147 |
$cols++;
|
|
|
148 |
if ($cols > 10) {
|
|
|
149 |
echo "</tr>";
|
|
|
150 |
$cols=1; }
|
|
|
151 |
}
|
|
|
152 |
}
|
|
|
153 |
fclose($pointeur);
|
|
|
154 |
}
|
|
|
155 |
else {
|
|
|
156 |
echo "$l_error_open_file $wl_categories";
|
|
|
157 |
}
|
|
|
158 |
echo "<tr><td valign='middle' align='left' colspan=10>";
|
|
|
159 |
echo "<center><b>$l_add_to_wl</b></center></td></tr>";
|
|
|
160 |
echo "<tr><td colspan=5 align=center>";
|
|
|
161 |
echo "<H3>$l_allowed_dns</H3>$l_forbidden_dns_explain<BR>";
|
|
|
162 |
echo "<textarea name='OSSI_wl_domains' rows=3 cols=40>";
|
|
|
163 |
echo_file ($dir_dg."blacklists/ossi/domains_wl");
|
|
|
164 |
echo "</textarea></td>";
|
|
|
165 |
echo "<td colspan=5 align=center>";
|
|
|
166 |
echo "<H3>$l_allowed_url</H3>$l_forbidden_url_explain<BR>";
|
|
|
167 |
echo "<textarea name='OSSI_wl_urls' rows=3 cols=40>";
|
|
|
168 |
echo_file ($dir_dg."blacklists/ossi/urls_wl");
|
|
|
169 |
echo "</textarea></td></tr><tr><td colspan=10>";
|
1042 |
richard |
170 |
echo "<input type='submit' value='$l_record' disabled>";
|
|
|
171 |
echo "</form> (Please wait for the next vesion of ALCASAR)";
|
1041 |
richard |
172 |
?>
|
|
|
173 |
</td></tr>
|
|
|
174 |
</TABLE>
|
|
|
175 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
878 |
richard |
176 |
<tr><th><?php echo $l_specific_filtering; ?></th></tr>
|
318 |
richard |
177 |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
|
|
|
178 |
</table>
|
|
|
179 |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
|
1015 |
richard |
180 |
<FORM action='bl_filter.php' method='POST'>
|
878 |
richard |
181 |
<input type='hidden' name='choix' value='Specific_filtering'>
|
879 |
richard |
182 |
<tr><td>
|
|
|
183 |
<input type='checkbox' name='chk-ip'
|
876 |
richard |
184 |
<?php
|
882 |
richard |
185 |
// verify "pureip" filtering state
|
879 |
richard |
186 |
if (file_exists($bannedsite_file))
|
|
|
187 |
{
|
|
|
188 |
$pointeur=fopen($bannedsite_file,"r");
|
|
|
189 |
while (!feof ($pointeur))
|
|
|
190 |
{
|
|
|
191 |
$ligne=fgets($pointeur, 4096);
|
|
|
192 |
if ($ligne)
|
|
|
193 |
{
|
|
|
194 |
if (preg_match('/^\*ip$/',$ligne, $r))
|
|
|
195 |
{
|
|
|
196 |
echo " checked";
|
|
|
197 |
break;
|
|
|
198 |
}
|
|
|
199 |
}
|
|
|
200 |
}
|
|
|
201 |
fclose($pointeur);
|
|
|
202 |
}
|
|
|
203 |
else {
|
|
|
204 |
echo "$l_error_open_file $bannedsite_file";
|
|
|
205 |
}
|
|
|
206 |
echo "> $l_ip_filtering";
|
318 |
richard |
207 |
?>
|
882 |
richard |
208 |
</td></tr>
|
878 |
richard |
209 |
<tr><td>
|
882 |
richard |
210 |
<input type='checkbox' name='chk-safesearch'
|
|
|
211 |
<?php
|
|
|
212 |
// verify "safesearch" filtering state
|
|
|
213 |
if (file_exists($urlregex_file))
|
|
|
214 |
{
|
|
|
215 |
$pointeur=fopen($urlregex_file,"r");
|
|
|
216 |
while (!feof ($pointeur))
|
|
|
217 |
{
|
|
|
218 |
$ligne=fgets($pointeur, 4096);
|
|
|
219 |
if ($ligne)
|
|
|
220 |
{
|
|
|
221 |
if (preg_match('/^\"\(\^http\:\/\/\[0\-9a\-z\]\+\\\.google/',$ligne, $r))
|
|
|
222 |
{
|
|
|
223 |
echo " checked";
|
|
|
224 |
break;
|
|
|
225 |
}
|
|
|
226 |
}
|
|
|
227 |
}
|
|
|
228 |
fclose($pointeur);
|
|
|
229 |
}
|
|
|
230 |
else {
|
|
|
231 |
echo "$l_error_open_file $urlregex_file";
|
|
|
232 |
}
|
|
|
233 |
echo "> $l_safe_searching";
|
|
|
234 |
echo "<br>$l_safe_youtube";
|
885 |
richard |
235 |
echo "<input type='text' name='Youtube_ID' size='30' value='";
|
|
|
236 |
if ($YOUTUBE_ID == "ABCD1234567890abcdef") // generic ID (do nothing)
|
|
|
237 |
{
|
|
|
238 |
echo "'>";
|
|
|
239 |
}
|
|
|
240 |
else {
|
|
|
241 |
echo "$YOUTUBE_ID'>";
|
|
|
242 |
}
|
|
|
243 |
echo " $l_youtube_id<tr><td>";
|
|
|
244 |
echo "<input type='submit' value='$l_record'>";
|
882 |
richard |
245 |
?>
|
878 |
richard |
246 |
</form>
|
318 |
richard |
247 |
</td></tr>
|
|
|
248 |
</TABLE>
|