Advertisement
Guest User

cht exclu: daft punk site source code

a guest
Mar 15th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 2.45 KB | None | 0 0
  1. #!/usr/local/bin/perl
  2. #
  3. #
  4. # Prophet Communications 1997
  5. # DaftPunk web filter routines.  These were essentially
  6. #  a hack.. Sorry to say it.  Everything works, but it aint to
  7. #  pretty.  HTML these days is getting way too diverse for this
  8. #  kind of funnery.  But hey, what the hell....
  9. # Jim Mathies July 97
  10. # jim@prophetcomm.com
  11. #
  12. #
  13.  
  14. $| = 1;                              
  15. #flushes stdout buffer
  16.  
  17.  
  18.  
  19. require "/usr/html/webhome2/virgin/cgi-bin/daftpunk/url_getsub.pl";
  20. require "getopts.pl";
  21.  
  22. &Getopts(':bdhclo:');
  23. print "Content-Type: text/html\n\n";
  24.  
  25. ####debug command line stuff:
  26. $url = $ARGV[0];
  27. ####
  28.  
  29. if ($ENV{'REQUEST_METHOD'} eq 'GET')
  30. {
  31.       $buffer   = $ENV{'QUERY_STRING'};
  32.       @pairs    = split(/&/, $buffer);
  33.  
  34.      foreach $pair (@pairs)
  35.      {
  36.               ($name, $value) = split(/=/, $pair);
  37.                $value =~ tr/&/ /;
  38.                $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
  39.                $contents{$name} = $value;
  40.        }
  41.       $filter   = $contents{'filter'};
  42.       $url      = $contents{'address'};
  43.  
  44.      
  45.  
  46. }
  47.  
  48. if ($ENV{'REQUEST_METHOD'} eq 'POST')
  49. {
  50.       read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
  51.       @pairs = split(/&/, $buffer);
  52.      foreach $pair (@pairs)
  53.      {
  54.               ($name, $value) = split(/=/, $pair);
  55.                $value =~ tr/+/ /;
  56.                $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
  57.                $contents{$name} = $value;
  58.        }
  59.      $page  = $contents{'page'};
  60.      $day   = $contents{'day'};
  61.      $month = $contents{'month'};
  62.      $year  = $contents{'year'};
  63.  
  64.      $dob   = $month.$day.$year
  65. }
  66.  
  67.  
  68. #$userid = shift;
  69.  
  70. #$passwd = shift;
  71.  
  72.  
  73.  
  74. #die "$usage" if ($userid && ! $passwd);
  75.  
  76.  
  77.  
  78. if($opt_o) {
  79.  
  80.     open(STDOUT, ">$opt_o") || die "Can't redirect stdout to \"$opt_o\": $!";
  81.  
  82.     open(STDERR, ">&STDOUT") || die "Can't dup stdout";
  83.  
  84.     select(STDERR); $| = 1;
  85.  
  86.     select(STDOUT); $| = 1;
  87.  
  88. }
  89. print "$filter \n $address \n";
  90. #exit;
  91.  
  92. if ( $filter eq 1 ) {
  93.     $status = &url_getRainblow($url, $userid, $passwd, "&STDOUT");
  94. }
  95. if ( $filter eq 2 ) {
  96.     $status = &url_getRedDeath($url, $userid, $passwd, "&STDOUT");
  97. }
  98. if ( $filter eq 3 ) {
  99.     $status = &url_getBluringPain($url, $userid, $passwd, "&STDOUT");
  100. }
  101. if ( $filter eq 5 ) {
  102.     $status = &url_getPhunk($url, $userid, $passwd, "&STDOUT");
  103. }
  104. if ( $filter eq 4 ) {
  105.     $status = &url_getPhrench($url, $userid, $passwd, "&STDOUT");
  106. }
  107.  
  108.  
  109.  
  110. exit $status;
  111.  
  112.  
  113. __END__
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement