Subject: Re: Censorship From: elawyer@interport.net (Enrique Gili) Date: Tue, 27 Aug 1996 09:53:47 -0400 (EDT)
How the Web Was Won
Subject: Re: Censorship From: elawyer@interport.net (Enrique Gili) Date: Tue, 27 Aug 1996 09:53:47 -0400 (EDT)
Sender: owner-online-news@marketplace.com
Precedence: bulk
Status: RO
X-Status: 

 K Vohra wrote:
>If anyone knows how the internet can be censored from the server ( and I
>need a little detail ) . Please let me know . I'm doing a project on
>internet censorship , and I need to know how to cesnor from the server , and
>if possible how to get around ti . Thanx
>everyone .
>Kameel Ashok Vohra .




I think he means theft. Censorship (or lack thereof) is really a
community standards issue  determined by courts and legislatures. I
guess system administors also have the power to shut down web sites
considered to be too outrageous.

This short hack can be added to your perl scripts in order keep them from
being appropriated. It  will allow you to send back a warning and kill
the  process if the script is running from the wrong domain.




########### script follows ##################################

# declare the domains permitted to use this script
@referers = ('www.yourdomain.com','yourdomain.com','123.45.67.89');

# Check if the domain is valid
if ($ENV{'HTTP_REFERER'}) {
        foreach $referer (@referers) {
                if ($ENV{'HTTP_REFERER'} =~ /$referer/i) {
                        $check_referer = '1';
                        last;
                }
        }
}
else { # browser doesn't support referers, so allow it
        $check_referer = '1';
}

if ($check_referer != 1) {
        print "Content-type: text/html\n\n";
        print "Illegal CGI Appropriation";
        print "

ILLEGAL CGI APPROPRIATION




"; print "Sorry, this script can only be run from www.yourdomain.com."; print "
"; exit; } ############## end script ################################## This script was created by Bob Reap other files are maintained at: http://www.counsel.net/scripts/protect.html. _______________________________________________________________________________ E Pluribus Internet Enrique Gili elawyer@interport.net +---------------------------------------------------------------------------+ This message was posted to ONLINE-NEWS. http://www.planetarynews.com/o-n.html From owner-online-news@marketplace.com Tue Aug 27 15:49:34 1996 Received: from marketplace.com (majordom@marketplace.com [206.168.5.232]) by cnj.digex.net (8.6.12/8.6.12) with ESMTP id PAA28479 ; for ; Tue, 27 Aug 1996 15:49:33 -0400 Received: (from majordom@localhost) by marketplace.com (8.6.12/8.6.12) id IAA14639 for online-news-outgoing; Tue, 27 Aug 1996 08:31:21 -0600 Received: from server.indra.com (server.indra.com [204.144.142.2]) by marketplace.com (8.6.12/8.6.12) with ESMTP id IAA14622; Tue, 27 Aug 1996 08:31:05 -0600 Received: from indra.com by server.indra.com (8.7.4/Spike-8-1.0) id IAA01313; Tue, 27 Aug 1996 08:21:33 -0600 (MDT) Received: from merlin.nando.net by indra.com (8.7.4/Spike-8-1.0) id IAA05854; Tue, 27 Aug 1996 08:21:32 -0600 (MDT) Received: from CHRISH.nando.net (chris1.nando.net [152.52.2.204]) by merlin.nando.net (8.7/8.6.9) with SMTP id KAA16426; Tue, 27 Aug 1996 10:21:20 -0400 (EDT) Message-ID: <3222CCE2.28D1@nando.net>