summaryrefslogtreecommitdiff
path: root/network/mod_limitipconn/test.pl
diff options
context:
space:
mode:
Diffstat (limited to 'network/mod_limitipconn/test.pl')
-rw-r--r--network/mod_limitipconn/test.pl18
1 files changed, 18 insertions, 0 deletions
diff --git a/network/mod_limitipconn/test.pl b/network/mod_limitipconn/test.pl
new file mode 100644
index 0000000000..dc8ca7677b
--- /dev/null
+++ b/network/mod_limitipconn/test.pl
@@ -0,0 +1,18 @@
+#!/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=> "127.0.0.1:80");
+ if (! defined $SOCKET) { die $!; }
+ print $SOCKET "GET /?$_ HTTP/1.0\n\n";
+ $response = <$SOCKET>;
+ print $response;
+ close($SOCKET);
+}
+