[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Censorship
There are two pieces of code included in this message. Or, at least,
there would be if I were allowed to express my ideas. Accordingly,
the first piece of code has been carefully censored.
The second piece of code is a Perl script which does the censoring.
The model is that of a tape which the censor lays across anything
"offensive."
The Perl script has -C and -Perl modes which try to preserve comments.
(They can be fooled, so you should look over the results before
distributing.) You can also specify the string which is "printed" on
the tape.
The idea is that every time I write a piece of code which I cannot
distribute freely, a censored version will be mailed to appropriate
newsgroups, mailing lists, newspapers, and politicians.
This should have the effect of continually raising and dramatizing the
issue, as well as demonstrating repeatedly how ridiculous it is.
I would hope that some decades into the future we will be able to look
through the archives for these scraps of censored code and find it
amusing.
--------------------------------------------------
CENSORED BY THE UN
/* A reference implementation of SHA1. */
ITED STATES GOVERNMENT CENSORED BY THE UNITED STATES GOVE
RNMENT CENSORED BY THE UNITED STATES GOVERNME
NT CENSORED BY THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED ST
ATES GOVERNMENT CENSORED BY THE UNITED STATES
/* Circular left shift operation. */
GOVERNMENT CENSORED BY THE UNITED STATES GOVERNMENT CENSORED
BY THE UNITED STATES G
OVERNMENT CENSORED BY THE UN
I
TED STATES GOVERNMENT CENSORED BY THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED STATES GOVERNMENT CENSORED BY THE
UNITED STATES GOVERNMENT CENSORED BY THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED STATES GOVERNMENT CENSORED BY
THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED STATES GOVERNMENT CENSORE
D BY THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED STATES GOVERNMENT CEN
SORED BY THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED STATES GOVERNMENT
CENSORED BY THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED STATES GOVERN
MENT CENSORED BY THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED STATES GO
VERNMENT CENSORED BY THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED STAT
ES
/* Prototypes */
GOVERNMENT CENSORED BY THE UNITED STATES GOVERNMENT CENSORED BY TH
E UNITED STATES GOVERNMENT CENSORED BY THE UNITED S
TATES
G
OVERNMENT CENSORED
BY THE UNITED STATES G
/* Hash is contained in H array. */
OVERNMENT CENSORED BY THE UNITED STATES GOVERNMENT CENSORED BY THE UNITE
D
STATES GOVERNMENT CENSORED BY THE UNITED STATES G
O
VERNME
NT CEN
SORED BY THE UNITED STAT
ES GOVERNMENT CENSORED BY THE
UNITED STATES GOVERNMENT CENS
ORED BY THE UNITED ST
/* Initialize H array here. */
ATES GOVERNMENT CE
NSORED BY THE UNIT
ED STATES GOVERNME
NT CENSORED BY THE
UNITED STATES GOV
ERNMENT CENSORED BY
THE UNITED STATES G
OVERNMENT CENSORED BY THE UNITED STATES G
OVERNMENT CENSORED BY THE UNITED STAT
ES GOVERNMENT CENSORE
D
BY TH
E UNITED STATES GOVERNMENT CENSORED
BY THE UNITED ST
ATES GOVERNMENT CE
N
SORED
BY THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED STATES GOVERNMENT CENSORED BY THE
UNITED S
T
A
TES GOVERNMENT
CENSORED BY T
H
E UNIT
ED STATES GOVERNMENT CENS
ORED BY THE UNI
TED STATES GOVERNMENT CENSORED BY THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED STATE
S
/* Handle latest character. */
GOV
ERNMENT CENSO
R
E
/* Add padding byte. */
D BY THE UNITE
D STATES GOVERNMENT
CENS
O
RED BY THE UNITED STATES GOVERNMEN
T CENSORED BY THE UN
ITED
/* Pad out with zeros. */
STATES GOVERNMENT CEN
SORED BY THE
U
NITED STATES GOVERNMENT C
ENSORED BY THE
UNITED STATES GOVERNMENT CENSORED BY THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED ST
A
TES GO
V
ERNMENT CENSORED BY
THE UNITED STATES GOVERNM
ENT CENSORED BY
THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED STATES GOVERNMENT CENSORED BY THE UNIT
E
/* Add padding byte. */
D ST
ATES GOVERNMENT CENS
ORED
BY THE
UNITED STATES GOVERNMENT CENSORED BY THE UNITED STATES GOVERNMENT CENSO
RED BY T
H
/* Pad out with zeros. */
E UNITED STATES GOVERN
MENT CENSORED
/* Add length information */
BY THE UNITED STATES GOVERNMENT CENSORED BY THE
UNITED STATES GOVERNMENT CENSORED BY THE UNITED
STATES GOVERNMENT CENSORED BY THE UNITED STATES
GOVERNMENT CENSORED BY THE UNITED STATES
GOVERNMENT CENSORED BY THE UNITED STATES GOVERNME
NT CENSORED BY THE UNITED STATES GOVERNMENT CENSO
RED BY THE UNITED STATES GOVERNMENT CENSORED BY
THE UNITED STATES GOVERNMENT CENSORED BY T
/* Final block. */
HE UNITED STATES GOVERN
MENT CENSORED B
Y THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED STATES GOVERNMENT CENSORED BY THE UNI
T
E
D STATES GOVERNMENT CENSORED BY THE UNITED STATES GOVERNMENT CENSO
R
ED BY THE UNITED STATES GOVE
RNMENT CENSORED BY T
HE UNI
TED ST
ATES GOVERNMENT CEN
SORED BY THE UNITED STATE
S GOVERNMENT CENSORED BY THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED STATES GO
V
ERNMENT CENSORED BY THE UNI
TED STATES GOVERNMENT CENSORED BY THE UNITED STATES
GOVERNMEN
T CENSORE
D BY THE
UNITED ST
ATES GOVE
RNMENT CENSORED BY THE UN
ITED STATES GOVERNMENT CENSORED BY THE UNITED STAT
ES GOVERNMENT CENSORED BY THE UNITED STATES GOVERN
MENT CENSORED B
Y THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED STATE
S
GOVERNMENT CENSORED BY THE
UNITED STATES GOVERNMENT CENSORED BY THE UNITED S
TATES GOVERNMENT CENSORED BY THE UNITED STATES GOV
ERNMENT CENSORE
D BY THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED ST
A
T
ES GOVERNMENT CENSORED BY
THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED
STATES GOVERNMENT CENSORED BY THE UNITED STATES GO
VERNMENT CENSOR
ED BY THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED S
T
A
TES GOVERNMENT CENSORED BY
THE UNITED STATES GOVERNMENT CENSORED BY THE UNITE
D STATES GOVERNMENT CENSORED BY THE UNITED STATES
GOVERNMENT CENS
ORED BY THE UNITED STATES GOVERNMENT CENSORED BY THE UNITED
S
TATES GOVE
RNMENT CEN
SORED BY T
HE UNITED
STATES GOV
E
--------------------------------------------------
#!/usr/local/bin/perl -w
require 5;
use strict;
$main::censor_string = "CENSORED BY THE UNITED STATES GOVERNMENT ";
$main::next_censor_char = 0;
$main::c_mode = 0;
$main::Perl_mode = 0;
sub main {
my($switch);
while( $switch = shift(@ARGV) ) {
if( $switch =~ /^-/ ) {
if( $switch eq "-C" ) {
$main::c_mode = 1;
}
elsif( $switch eq "-Perl" ) {
$main::Perl_mode = 1;
}
elsif( $switch eq "-s" ) {
if( scalar(@ARGV) > 0 ) {
$main::censor_string = shift(@ARGV);
}
else {
die "usage: censor.pl [-C] [-Perl] [-s censor-string]\n";
}
}
else {
die "usage: censor.pl [-C] [-Perl] [-s censor-string]\n";
}
}
else {
die "usage: censor.pl [-C] [-Perl] [-s censor-string]\n";
}
}
@main::censor_char_list = split(//, $main::censor_string);
while(<>) {
chomp;
if( $main::c_mode && /^\s*\/\*.*\*\/\s*$/ ) {
print "$_\n";
}
elsif( $main::c_mode && /^(\s*)(\S*.*\S|\S)(\s*\/\*.*\*\/\s*)$/ ) {
my($censored) = get_censor_chars(length($2));
print "$1$censored$3$4\n";
}
elsif( $main::Perl_mode && /^\s*#.*$/ ) {
print "$_\n";
}
elsif( $main::Perl_mode && /^(\s*)(\S*.*\S|\S)(\s*#.*)$/ ) {
my($censored) = get_censor_chars(length($2));
print "$1$censored$3\n";
}
elsif( /^(\s*)(\S.*\S)(\s*)$/ ) {
my($censored) = get_censor_chars(length($2));
print "$1$censored$3\n";
}
elsif( /^(\s*)(\S)(\s*)$/ ) {
my($censored) = get_censor_chars(length($2));
print "$1$censored$3\n";
}
else {
print "$_\n";
}
}
}
sub get_censor_chars {
my($length) = shift;
my($i);
my(@char_list);
for( $i=0; $i < $length; $i++ ) {
push(@char_list, $main::censor_char_list[$main::next_censor_char]);
$main::next_censor_char = ($main::next_censor_char + 1) % length($main::censor_string);
}
my($censored_string) = join('', @char_list);
return $censored_string;
}
main();
Monty Cantsin
Editor in Chief
Smile Magazine
http://www.neoism.org/squares/smile_index.html
http://www.neoism.org/squares/cantsin_10.htm
Subject: Censorship
To: [email protected]
25BA1A9F5B9010DD8C752EDE887E9AF3 [Cantsin Protocol No. 2]
94C43229A76383D818D39952F7A41ACA0394C6FE
81D2E52A55F1CE8DE45EE05CE477D184E310E2AA
-22DE 22DE
102E6346B81D0F6CA8E8C5272F97AFCC0AFA8D813110CBCB331C217B8A15576252FF2088275FC8F1437CEE2AD8D336AFEC1D2DDBB56CE15D8898E3AE097351537833973840448B2B7B551439455AEADDA5EBC96EC7ABA417F9F3EEA93A060F691BFC1EF3A17BC6BB933523F9C261BA2201BEF38CA014F1E308DD485F520DF2556A23629783277EDAE11A090DB1AA212C0FDE81BEC778600256E830CE6B06223B5D0BD8DEFFF1846F606936BEDFCBFEC3297AECE87B2C6C9D53CF5C6002B56139535FAE1E7D75B2B5F7E7A7465894B3091EDCD2AA4E36C73ECF5F50C413F2184837FB3FE0D751F564E096FBB2F2897F54A7AFC20013442273694E4298F6418C70
5F14E917B40F6799CED397E44C0E3D3E569E820BE25ACFBA5754A6B27FF7610880068CC4BB45423B77D05A6E8606A36275FDC1EF31AC7AEF9C329BDF1084B4074B4B2FD8024E4A09C6535BC87D644E14FB0CDE803138021E253B37CCCFED738D9E1C336B542BCA9057DAF7FC1DF6554422D8A1F83727A858ECE1008F3281908C4A03AEE8FCD4593A1E3CBE5A895EBBDAAD6C335C4C5B7E2AD069B9956CC6855AD9474E25690DB7EB13F9DCB558EB6F502013463DA5FCD223E3DC6C67FA7601966BB71B0DB18DE6DEC17DD756EF7E2BC08298728670AD5CDB7FB0B58471228571BC71D62306404CCC95756DCDB3E3C7F2F0EFB569F45FB5A7A17F6A42871200F2