# anonymail - fuck, i was bored like shit. napalmed. $script_url = "/am.cgi"; $sendmail = "/usr/sbin/sendmail"; @referers = (""); $admin = "napalmed@fuck.au"; @friends = (""); $good_refer = 0; if($ENV{REQUEST_METHOD} eq 'GET') { &print_form; } elsif($ENV{REQUEST_METHOD} eq 'POST') { foreach $referer(@referers) { if($ENV{HTTP_REFERER} =~ /$referer/i) { $good_refer = 1; } } if($good_refer != 1) { &error; } &parse_form; &send_mail; } else { &error; } sub print_form { print "Content-type: text/html\n\n"; print "
\n"; print "From: $input{'from_name'} \<$input{'from_addy'}\>\n"; print "Reply-To: $input{'from_addy'}\n"; print "To: $input{'to'}\n"; print "Subject: $input{'subject'}\n\n"; print "$input{'body'}"; exit; } sub parse_form { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); if (length($buffer) < 5) { $buffer = $ENV{QUERY_STRING}; } @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; $value =~ s///g; $input{$name} = $value; } if($input{'to'} =~ /microsoft.com/i) { &error; } foreach $friend(@friends) { if($input{'to'} =~ /$friend/i) { &error; } } } sub error { print "Content-type: text/html\n\n"; print "
An error occured while processing the script.\n"; exit; }