mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-31 02:33:44 +00:00
Do at least *SOME* verification to make sure that we are getting an IP address in the blacklist list
This commit is contained in:
parent
8c9f23ea56
commit
b004916036
@ -17,13 +17,15 @@ my @netblocks = split(/\n/, get("http://www.infiltrated.net/voipabuse/netblocks.
|
|||||||
|
|
||||||
print "<list name=\"voip-abuse-addresses\" default=\"deny\">\n";
|
print "<list name=\"voip-abuse-addresses\" default=\"deny\">\n";
|
||||||
foreach $addr (@addresses) {
|
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>\n";
|
||||||
|
|
||||||
|
|
||||||
print "<list name=\"voip-abuse-netblocks\" default=\"deny\">\n";
|
print "<list name=\"voip-abuse-netblocks\" default=\"deny\">\n";
|
||||||
foreach $netb (@netblocks) {
|
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";
|
print "</list>\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user