PHP-Code:
use LWP::UserAgent;
use HTTP::Request::Common qw(POST);
my $ua = LWP::UserAgent->new;
push @{ $ua->requests_redirectable }, "POST";
foreach( 1..10000 ) {
my $request = POST "http://somesite.com/file.php", [ "username" => random_string(), "password" => random_string() ];
my $response = $ua->request($request);
}
sub random_string {
my $length=rand((50)+1);
my @chars=('a'..'z','A'..'Z','0'..'9','_');
my $random_string;
foreach (1..$length) {
$random_string.=$chars[rand @chars];
}
return $random_string;
}
wieder ungetestet...