Do at least *SOME* verification to make sure that we are getting an IP address in the blacklist list

This commit is contained in:
Michael S Collins 2010-11-19 10:54:39 -08:00
parent 8c9f23ea56
commit b004916036
1 changed files with 4 additions and 2 deletions

View File

@ -17,13 +17,15 @@ my @netblocks = split(/\n/, get("http://www.infiltrated.net/voipabuse/netblocks.
print "<list name=\"voip-abuse-addresses\" default=\"deny\">\n";
foreach $addr (@addresses) {
print " <node type=\"allow\" cidr=\"$addr/32\"/>\n";
next unless $addr =~ m/\d+\.\d+\.\d+\.\d+/;
print " <node type=\"allow\" cidr=\"$addr/32\"/>\n";
}
print "</list>\n";
print "<list name=\"voip-abuse-netblocks\" default=\"deny\">\n";
foreach $netb (@netblocks) {
print " <node type=\"allow\" cidr=\"$netb\"/>\n";
next unless $netb =~ m/\d+\.\d+\.\d+\.\d+/;
print " <node type=\"allow\" cidr=\"$netb\"/>\n";
}
print "</list>\n";