home *** CD-ROM | disk | FTP | other *** search
/ The Elite Hackers Toolkit / TheEliteHackersToolkitVolume1_1998.rar / HACKERS.BIN / appcraks / FORMRETU.ZIP / FORM.CGI next >
Text File  |  1998-01-16  |  3KB  |  78 lines

  1. #!/usr/local/bin/perl
  2.  
  3. ######################################################################
  4. #  BEFORE TRYING TO EDIT THIS SCRIPT, READ THE README FILE
  5. ###################################################################### 
  6. #
  7. #     Dream Catchers CGI Scripts               Feel free to modify 
  8. #     Form Return 4.0                          this script to your 
  9. #     Created by Seth Leonard                  needs, but please
  10. #     for Dream Catchers Technologies, Inc.    keep this portion so
  11. #                                              that I get credit.  
  12. #     http://dreamcatchersweb.com/scripts      The same goes for 
  13. #                                              distribution.
  14. #
  15. #     (c)1996/1997 Dream Catchers Technologies, Inc.,
  16. #     All Rights Reserved
  17. #
  18. ######################################################################
  19. #ONLY EDIT THIS PART OF THE SCRIPT!!!!
  20.  
  21. $backurl = "http://dreamcatchersweb.com/test/home.html";
  22. $backname = "Your Home Page Title";
  23. $mailprog = '/bin/sendmail';
  24. $youmail = 'you@server.com';
  25.  
  26. # DO NOT EDIT BELOW THIS LINE!!!!
  27. #################################################################
  28.  
  29. read(STDIN, $namevalues, $ENV{'CONTENT_LENGTH'});
  30.  
  31. open (MAIL, "|$mailprog $youmail") || die "Can't open $mailprog!\n";
  32. print MAIL ("To: $youmail\n");
  33. print MAIL ("From: Internet User\n");
  34. print MAIL ("Subject: Form Response\n\n");
  35.  
  36. # Process info from Fill in Form
  37.  
  38. @namevalues = split(/&/, $namevalues);
  39. foreach $namevalue (@namevalues) {
  40.     ($name, $value) = split(/=/, $namevalue);
  41.     $name =~ tr/+/ /;
  42.     $value =~ tr/+/ /;
  43.     $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
  44.     $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
  45.     $INPUT{$name} = $value;
  46.     unless ($value eq "") {
  47.         print MAIL ("$name: $value\n");
  48.     }
  49. }
  50.  
  51. close (MAIL);
  52.  
  53. # Print Follow up HTML
  54.  
  55. print ("Content-Type: text/html\n\n");
  56. print ("<html><head><title>Thank You</title></head>\n");
  57. print ("<body><h1>Thank You For Filling in the Requested Information</h1>\n");
  58. print ("The information has been sent and here is what you submitted:<hr>\n");
  59.  
  60. foreach $namevalue (@namevalues) {
  61.     ($name, $value) = split(/=/, $namevalue);
  62.     $name =~ tr/+/ /;
  63.     $value =~ tr/+/ /;
  64.     $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
  65.     $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
  66.     $INPUT{$name} = $value;
  67.     unless ($value eq "") {
  68.         print ("$name: $value<br>\n");
  69.     }
  70. }
  71.  
  72. print ("<hr>\n");
  73. print ("<a href=\"$backurl\">Back to $backname</a><hr>\n");
  74. print ("© <a href=\"http://dreamcatchersweb.com/scripts/\">Dream Catchers Technologies, Inc.</a>\n");
  75. print ("</body></html>\n");
  76.  
  77. exit;
  78.