diff --git a/data/htdocs/cgi-bin/e2guardian b/data/htdocs/cgi-bin/e2guardian new file mode 100755 index 0000000..1728b90 --- /dev/null +++ b/data/htdocs/cgi-bin/e2guardian @@ -0,0 +1,67 @@ +#!/usr/bin/env perl + +$allow_html_code = 0; +&ReadEnvs; + +$deniedurl = $in{'DENIEDURL'}; +$reason = $in{'REASON'}; +$user = $in{'USER'}; +$ip = $in{'IP'}; +$cats = $in{'CATEGORIES'}; + +$host = $in{'HOST'}; + +$fbypasshash = $in{'GBYPASS'}; # +$ibypasshash = $in{'GIBYPASS'}; # +$hashflag = $in{'HASH'}; # + +print "Content-type: text/html\n\n"; +print ''; +print 'Access Denied'; +print '

ACCESS HAS BEEN DENIED

'; +print 'Access Denied'; +if (length($user) > 0) { + print "
$user, access to the page:

"; +} +else { + print '
Access to the page:

'; +} +print "$deniedurl"; +print '

... has been denied for the following reason:

'; +print "$reason"; +if (length($cats) > 0) { + print '

Categories:

'; + print "$cats"; +} +print '

Your username, IP address, date, time and URL have been logged.'; +print '

You are seeing this error because the page you attempted
'; +print 'to access contains, or is labelled as containing, material that'; +print '
has been deemed inappropriate.
'; +print '

'; +print 'If you have any queries contact your Proxy Administrator
'; +print '

Powered by Casjays Developments Proxy Server'; +print '

'; + +exit; + + +sub ReadEnvs { + local($cl, @clp, $pair, $name, $value); + if ( $ENV{'REQUEST_METHOD'} eq 'POST' ) { + read(STDIN, $cl, $ENV{'CONTENT_LENGTH'} ); + } + else { + $cl = $ENV{'QUERY_STRING'}; + } + @clp = split(/::/, $cl); + foreach $pair (@clp) { + ($name, $value) = split(/==/, $pair); + $value =~ tr/+/ /; + $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; + $value =~ s///g; + if ($allow_html_code != 1) { + $value =~ s/<([^>]|\n)*>//g; + } + $in{$name} = $value; + } +}