mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
This commit is contained in:
29
scripts/perl/blacklist.pl
Executable file
29
scripts/perl/blacklist.pl
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# Add this to acl.conf.xml
|
||||
#
|
||||
# <X-PRE-PROCESS cmd="exec" data="$${base_dir}/bin/blacklist.pl"/>
|
||||
#
|
||||
|
||||
use Data::Dumper;
|
||||
use LWP::Simple;
|
||||
|
||||
# http://www.infiltrated.net/voipabuse/addresses.txt
|
||||
# http://www.infiltrated.net/voipabuse/netblocks.txt
|
||||
|
||||
|
||||
my @addresses = split(/\n/, get("http://www.infiltrated.net/voipabuse/addresses.txt"));
|
||||
my @netblocks = split(/\n/, get("http://www.infiltrated.net/voipabuse/netblocks.txt"));
|
||||
|
||||
print "<list name=\"voip-abuse-addresses\" default=\"allow\">\n";
|
||||
foreach $addr (@addresses) {
|
||||
print " <node type=\"deny\" cidr=\"$addr/32\"/>\n";
|
||||
}
|
||||
print "</list>\n";
|
||||
|
||||
|
||||
print "<list name=\"voip-abuse-netblocks\" default=\"allow\">\n";
|
||||
foreach $netb (@netblocks) {
|
||||
print " <node type=\"deny\" cidr=\"$netb\"/>\n";
|
||||
}
|
||||
print "</list>\n";
|
Reference in New Issue
Block a user