Death on Wheels
10-07-2000, 08:03 PM
The following Perl script should redirect the user to http://www.cerberos.org when called:
#!/usr/bin/perl
#Parses the form data
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}
#Prints appropriate header for page requested
if ($FORM{$NavBar} eq "blank"){
print "Location:http://www.cerberos.org\n\n";
}
Unfortunately, it's not.
------------------
Kurt Weber
Shell scripts? Shell scripts? We don't NEED no stinkin' shell scripts!
#!/usr/bin/perl
#Parses the form data
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}
#Prints appropriate header for page requested
if ($FORM{$NavBar} eq "blank"){
print "Location:http://www.cerberos.org\n\n";
}
Unfortunately, it's not.
------------------
Kurt Weber
Shell scripts? Shell scripts? We don't NEED no stinkin' shell scripts!