Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- # pms.pl
- # Perl Mail Spammer
- # by sta99ot
- # 2015
- use Time::HiRes qw( usleep );
- $from='from@email.com';
- $smtp_config='smtp.conf';
- $seconds_between_mails = 2;
- @ARGV==2 or die("Usage: ./pms.pl formatted_mailfile.eml mailboxes_list");
- $mail_command = "msmtp -C \"$smtp_config\"";
- $mail_list_file = @ARGV[1];
- $mail_file = @ARGV[0];
- open(LIST_FILE,"< $mail_list_file") or die;
- while(<LIST_FILE>)
- {
- chomp $_;
- $email=$_;
- $headers = "To: $email\\nFrom: $from";
- $command = "echo \"$headers\" | cat - $mail_file | $mail_command $email";
- print("Sending To: $email\n");
- print(`$command`);
- usleep(1000000 * $seconds_between_mails);
- }
- print("Done\n");
- close(LIST_FILE);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement