mod evasive test script

#!/usr/bin/perl

# test.pl: small script to test mod_dosevasive’s effectiveness

use IO::Socket;
use strict;

for(0..100) {
my($response);
my($SOCKET) = new IO::Socket::INET( Proto => “tcp”,
PeerAddr=> “test.domain.tld:80”);
if (! defined $SOCKET) { die $!; }
print $SOCKET “GET /?$_ HTTP/1.0nn”;
$response = <$SOCKET>;
print $response;
close($SOCKET);
}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.