fork download
  1. #!/usr/bin/perl
  2.  
  3. {
  4. if ($ENV{'CONTENT_LENGTH'})
  5. {
  6. read(STDIN, $input, $ENV{'CONTENT_LENGTH'});
  7. }
  8. $input = $ENV{'QUERY_STRING'} if $ENV{'QUERY_STRING'};
  9. if (($ENV{'QUERY_STRING_UNESCAPED'}) && ($input eq ''))
  10. {
  11. $input = $ENV{'QUERY_STRING_UNESCAPED'};
  12. $input =~ s/\\&/\&/g;
  13. $Unesc = 1;
  14. }
  15. if ($input =~ /=/g)
  16. {
  17. @pairs = split(/&/, $input);
  18. foreach $pair (@pairs)
  19. {
  20. ($name, $value) = split(/=/, $pair);
  21. $value =~ tr/+/ /;
  22. $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",
  23. hex($1))/eg;
  24. $in{$name} = $value;
  25. $NVPairsExist = 1;
  26. }
  27. }
  28. else
  29. {
  30. $count = 0;
  31. (@InputString) = split(/&/, $input);
  32. foreach $InputString (@InputString)
  33. {
  34. $InputString =~ tr/+/ /;
  35. $InputString =~
  36. s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
  37. $in{$count} = $InputString;
  38. $count++;
  39. }
  40. $NVPairsExist = 0;
  41. }
  42. }
  43.  
  44.  
  45.  
  46. {
  47.  
  48.  
  49.  
  50.  
  51.  
  52. open ( MAIL, "| /usr/lib/sendmail -t" );
  53. print MAIL "To: m.read\@mdx.ac.uk\n";
  54. print MAIL "Subject: Form Submission\n\n";
  55.  
  56. print MAIL "name \- $in{name}\n";
  57. print MAIL "addy \-$in{maile}";
  58. print MAIL " AT ";
  59. print MAIL "addy \-$in{email2}\n";
  60. print MAIL "name \- $in{name2}\n";
  61. print MAIL "addy \-$in{maile2}";
  62. print MAIL " AT ";
  63. print MAIL "addy \-$in{email22}\n";
  64.  
  65. print MAIL "\n\n";
  66. close ( MAIL );
  67.  
  68. print "Content-type: text/html\n\n";
  69.  
  70. print"<BR><BR><BR><BR>Thank you for helping with my research. <p>\n";
  71.  
  72. }
  73.  
  74.  
  75.  
Success #stdin #stdout 0s 4596KB
stdin
Standard input is empty
stdout
Content-type: text/html

<BR><BR><BR><BR>Thank you for helping with my research. <p>