FlyFar

HackTool.Perl.AnonyMail.a - Source Code

Mar 14th, 2023
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 2.91 KB | Cybersecurity | 0 0
  1. # anonymail - fuck, i was bored like shit. napalmed.
  2. $script_url = "/am.cgi";
  3. $sendmail = "/usr/sbin/sendmail";
  4. @referers = ("");
  5. $admin = "napalmed@fuck.au";
  6. @friends = ("");
  7. $good_refer = 0;
  8. if($ENV{REQUEST_METHOD} eq 'GET')
  9. {
  10. &print_form;
  11. }
  12. elsif($ENV{REQUEST_METHOD} eq 'POST')
  13. {
  14.         foreach $referer(@referers)
  15.         {
  16.         if($ENV{HTTP_REFERER} =~ /$referer/i) { $good_refer = 1; }
  17.         }
  18.         if($good_refer != 1) { &error; }
  19. &parse_form;
  20. &send_mail;
  21. }
  22. else
  23. {
  24. &error;
  25. }
  26. sub print_form
  27. {
  28. print "Content-type: text/html\n\n";
  29. print "<HTML><HEAD><TITLE>jhve elohim meth :: god is dead</TITLE></HEAD>\n";
  30. print "<BODY><B> ANONYMOUS MAIL. FUCK YOU </B><BR>\n";
  31. print "
  32. <CENTER>
  33. <FORM ACTION=\"$script_url\" METHOD=\"POST\" NAME=\"mail_form\">
  34. <TABLE BORDER=5><TH COLSPAN=2>BITCH</TH>
  35. <tr><td>Send To:</td><td><INPUT TYPE=\"text\" NAME=\"to\" SIZE=30></td></tr>
  36. <tr><td>From Address:</td><td><INPUT TYPE=\"text\" NAME=\"from_addy\" SIZE=30></td></tr>
  37. <tr><td>From Name:</td><td><INPUT TYPE=\"text\" NAME=\"from_name\" SIZE=30></td></tr>
  38. <tr><td>Subject:</td><td><INPUT TYPE=\"text\" NAME=\"subject\" SIZE=30></td></tr>
  39. <tr><td colspan=2>Body:<br><TEXTAREA NAME=\"body\" WRAP=VIRTUAL ROWS=3 COLS=35></TEXTAREA></td></tr>
  40. <tr><td colspan=2 align=center><INPUT TYPE=\"submit\" VALUE=\" Send Mail \">
  41. <INPUT TYPE=\"reset\" VALUE=\" Clear \"></TD></TR></TABLE></FORM></CENTER>\n";
  42. print "<BR><HR><BR></BODY></HTML>\n";
  43. exit;
  44. }
  45. sub send_mail
  46. {
  47. open (MAIL, "|$sendmail -t") || &error;
  48. print MAIL "From: $input{'from_name'} \<$input{'from_addy'}\>\n";
  49. print MAIL "Reply-To: $input{'from_addy'}\n";
  50. print MAIL "X-Mailer: anonmail.bitch\n";
  51. print MAIL "To: $input{'to'}\n";
  52. print MAIL "Subject: $input{'subject'}\n";
  53. print MAIL "Content-Type: text/plain; charset=us-ascii\n";
  54. print MAIL "Content-Transfer-Encoding: 7bit\n\n";
  55.  
  56. print MAIL "$input{'body'}";
  57. close (MAIL);
  58.  
  59. print "Content-type: text/html\n\n";
  60. print "Below is what you sent to $input{to}\n<pre>\n";
  61. print "From: $input{'from_name'} \<$input{'from_addy'}\>\n";
  62. print "Reply-To: $input{'from_addy'}\n";
  63. print "To: $input{'to'}\n";
  64. print "Subject: $input{'subject'}\n\n";
  65. print "$input{'body'}";
  66. exit;
  67.  
  68. }
  69.  
  70. sub parse_form {
  71.  
  72.    read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
  73.    if (length($buffer) < 5) {
  74.          $buffer = $ENV{QUERY_STRING};
  75.     }
  76.    @pairs = split(/&/, $buffer);
  77.    foreach $pair (@pairs) {
  78.       ($name, $value) = split(/=/, $pair);
  79.  
  80.         $value =~ tr/+/ /;
  81.         $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
  82.         $value =~ s/<!--(.|\n)*-->//g;
  83.         $input{$name} = $value;
  84.    }
  85.         if($input{'to'} =~ /microsoft.com/i) { &error; }
  86.  
  87.         foreach $friend(@friends)
  88.         {
  89.         if($input{'to'} =~ /$friend/i) { &error; }
  90.         }
  91. }
  92.  
  93.  
  94.  
  95.  
  96. sub error
  97. {
  98. print "Content-type: text/html\n\n";
  99. print "<BR>An error occured while processing the script.\n";
  100. exit;
  101. }
Add Comment
Please, Sign In to add comment