]>
git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - html/html/clwarn.cgi
2 ###############################################################################
4 # IPFire.org - A linux based firewall #
5 # Copyright (C) 2007 Michael Tremer & Christian Schmidt #
7 # This program is free software: you can redistribute it and/or modify #
8 # it under the terms of the GNU General Public License as published by #
9 # the Free Software Foundation, either version 3 of the License, or #
10 # (at your option) any later version. #
12 # This program is distributed in the hope that it will be useful, #
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15 # GNU General Public License for more details. #
17 # You should have received a copy of the GNU General Public License #
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
20 ###############################################################################
25 # enable only the following on debugging purpose
27 use CGI
::Carp
'fatalsToBrowser';
29 $swroot="/var/ipfire";
30 &readhash
("$swroot/ethernet/settings", \
%netsettings);
32 my $TITLE_VIRUS = "SquidClamAv Virus detection";
34 my $url = &HTML
::Entities
::encode_entities
(param
('url') || '');
35 my $virus = &HTML
::Entities
::encode_entities
(param
('virus') || '');
36 my $source = &HTML
::Entities
::encode_entities
(param
('source') || '');
38 my $user = &HTML
::Entities
::encode_entities
(param
('user') || '');
42 $virus =~ s/stream: //;
45 print "Pragma: no-cache\n";
46 print "Cache-control: no-cache\n";
47 print "Connection: close\n";
48 print "Content-type: text/html\n\n";
54 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
55 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
56 <title>ACCESS MESSAGE</title>
60 <table width="100%" height='100%' border="0">
62 <td colspan='3' width='100%' height='130' align="center" background="http://$netsettings{'GREEN_ADDRESS'}:81/images/background.gif">
63 <tr> <td width='10%'><td align='center' bgcolor='#CC000000' width='80%'><font face="verdana, arial, sans serif" color="#FFFFFF" size="5">
73 <tr> <td colspan='3' align='center'>
74 <font face="verdana, arial, sans serif" color="#CC000000" size="1">
82 <td colspan='3' align="center">
83 <font face="verdana, arial, sans serif" color="#000000" size="4">
84 <b>Access to the requested page has been denied</b>
86 <font face="verdana,arial,sans serif" color="#000000" size="2">
93 <p>URL: <a href="$url">$url</a>
101 <p>Client IP address: <i>$source</i>
107 <br><p>Please contact the Network Administrator if you think there has been an error
111 <td colspan='3' height='60%' valign="bottom" align="right">
112 <font face="verdana,arial,sans serif" color="#656565" size="1">Web Filtering by
114 <a href="http://www.ipfire.org" target="_blank"><b>
115 <font face="verdana,arial,sans serif" color="#656565" size="1">IPFire</b></a>
127 my $filename = $_[0];
133 open(FILE
, $filename) or die "Unable to read file $filename";
137 ($var, $val) = split /=/, $_, 2;
143 # Untaint variables read from hash
144 $var =~ /([A-Za-z0-9_-]*)/; $var = $1;
145 $val =~ /([\w\W]*)/; $val = $1;
146 $hash->{$var} = $val;