summaryrefslogtreecommitdiff
path: root/network/mod_limitipconn/test.pl
diff options
context:
space:
mode:
authorMenno E. Duursma <druiloor@zonnet.nl>2010-05-11 22:54:55 +0200
committerErik Hanson <erik@slackbuilds.org>2010-05-11 22:54:55 +0200
commit3b4c071bc72e00ece7d848be706753da735a438a (patch)
tree164f462c867567acc32236d2bf84ef75a0d14fb7 /network/mod_limitipconn/test.pl
parent986bdaf5584d4b3189255ca22c2434899aac70e8 (diff)
downloadslackbuilds-3b4c071bc72e00ece7d848be706753da735a438a.tar.gz
network/mod_limitipconn: Added to 12.1 repository
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);
+}
+