1#!/usr/bin/perl 2 3# test.pl: small script to test mod_dosevasive's effectiveness 4 5use IO::Socket; 6use strict; 7 8for(0..100) { 9 my($response); 10 my($SOCKET) = new IO::Socket::INET( Proto => "tcp", 11 PeerAddr=> "127.0.0.1:80"); 12 if (! defined $SOCKET) { die $!; } 13 print $SOCKET "GET /?$_ HTTP/1.0\r\n\r\n"; 14 $response = <$SOCKET>; 15 print $response; 16 close($SOCKET); 17} 18 19