shivaas / mod_evasive

Fork of mod_evasive for Apache 2.4. Original module by Deep Logic, Inc
GNU General Public License v2.0
36 stars 33 forks source link

Needed to tweak #9

Open djl-illinois opened 6 years ago

djl-illinois commented 6 years ago

To run on our CentOS machine we needed to alter the print $SOCKET line. Thus,

!/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\r\n\r\n"; $response = <$SOCKET>; print $response; close($SOCKET); }

davemidd commented 5 years ago

Same here, otherwise I get a '400 Bad Request'.