Does anyone have a good banning script?
For now I'm using this is lots of my (test) scripts:
But, I'm sure there's a much better way, since this script goes through all the IPs in @BANNED_IP and takes some time to execute if the list gets longer.
I hope I'm clear to you
Thanks in advance;
Mzzl, Chris
For now I'm using this is lots of my (test) scripts:
Code:
@BANNED_IP=("127.0.0.1","10.0.0","45"); $visitors_ip = $ENV{REMOTE_ADDR}; foreach (@BANNED_IP) { if ($visitors_ip =~ /^$_/i) { &nice_die("$banned_message"); } }
I hope I'm clear to you

Thanks in advance;
Mzzl, Chris
Comment