I have a goofy problem. I have a list if IP addresses (and partial IP addresses) that I want to refuse from using a little script I wrote. The IP banning feature seemed to work for a little while but now that the list has grown to about 150 IP addresses, it doesn't work.
The list is just one IP per line.
$ip would be the users current IP.
if($ip =~ /$bannedip/gi) {
open(HTML, "$bannedpage") || print "Can't open $bannedpage\n";
@html_text = <HTML>;
close(HTML);
print @html_text;
exit;
}
The list is just one IP per line.
$ip would be the users current IP.
Code:
foreach $bannedip (@blist) { if($ip =~ /$bannedip/gi) {
open(HTML, "$bannedpage") || print "Can't open $bannedpage\n";
@html_text = <HTML>;
close(HTML);
print @html_text;
exit;
}