#!/usr/local/bin/perl


$| = 1;  # Turn off buffering of the output.

$dictfile = '/usr/share/lib/dict/words';

open(DICT,"<$dictfile") || die "\n";
my @dict = <DICT>;	# *slurp*
close DICT;
my $numdict = scalar @dict;

# Most .com addresses, cause spammers prefer those...
my @tops = (	'.com','.com','.com','.com','.com',
		'.es','.es','.es',
		'.net','.net','.net',
		'.org',
		'.us',
		'.co.uk',
		'.co.jp',
		'.com.au',
		'.com.sg',
		'.ru',  # Some faraway/slow domains are good.
		'.it',  # That way, more mailer daemons will have
		'.nl',  # time to bounce back while the spammers
		'.cz',  # are still connected.
		'.my',
		'.br',
		'.nz');
my $numtops = scalar @tops;

for (my $i=0;$i<2048;$i++) {
	my $user = $dict[int(rand $numdict)];
	chomp $user;
	my $host = '';
	if (rand() < 0.7) {
		$host = $dict[int(rand $numdict)];
		chomp $host;
		$host .= '.';
	}
	my $domain = $dict[int(rand $numdict)];
	chomp $domain;
	my $top  = $tops[int(rand $numtops)];
	my $pass  = $dict[int(rand $numdict)];
	print "$user\@$host$domain$top $pass";
}

exit 0;
