Advertisement
Googleinurl

SPAMMER PERL

Sep 25th, 2013
645
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 1.03 KB | None | 0 0
  1. #!/usr/local/bin/perl
  2.  
  3.  
  4.  
  5.  
  6. $ARGC=@ARGV;
  7.  
  8.  
  9.  
  10. if ($ARGC !=4) {
  11.  
  12.  printf "$0 <mailist> <[email protected]> <assunto> <corpo.html>\n";
  13.  
  14.  printf "¬¬ priv8 fdp c passa pra frente t mato\n";
  15.  
  16.  exit(1);
  17.  
  18. }
  19.  
  20.  
  21.  
  22. $mailtype = "content-type: text/html";
  23.  
  24.  
  25.  
  26. $sendmail = '/usr/sbin/sendmail';
  27.  
  28.  
  29.  
  30. $sender = $ARGV[1];
  31.  
  32. $subject = $ARGV[2];
  33.  
  34.  
  35.  
  36. $efile = $ARGV[0];
  37.  
  38. $emar = $ARGV[0];
  39.  
  40.  
  41.  
  42. open(FOO, $ARGV[3]);
  43.  
  44. @foo = <FOO>;
  45.  
  46. $corpo = join("\n", @foo);
  47.  
  48.  
  49.  
  50. open (BANDFIT, "$emar") || die "Can't Open $emar";
  51.  
  52.  
  53. $cont=0;
  54.  
  55. while(<BANDFIT>)        {
  56.  
  57.  
  58.  
  59. ($ID,
  60.  
  61.  $options) = split(/\|/,$_);
  62.  
  63. chop($options);
  64.  
  65.   foreach ($ID) {
  66.  
  67.  
  68.  
  69.  
  70.  
  71. $recipient = $ID;
  72.  
  73.  
  74.  
  75.  
  76. open (SENDMAIL, "| $sendmail -t");
  77.  
  78. print SENDMAIL "$mailtype\n";
  79.  
  80. print SENDMAIL "Subject: $subject\n";
  81.  
  82. print SENDMAIL "From: $sender\n";
  83.  
  84. print SENDMAIL "To: $recipient\n\n";
  85.  
  86. print SENDMAIL "$corpo\n\n";
  87.  
  88. close (SENDMAIL);
  89.  
  90.  
  91. $cont=$cont+1;
  92. printf "$cont Enviado para $recipient";
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102. }
  103.  
  104.  
  105.  
  106. }
  107.  
  108. close(BANDFIT);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement