forked from Mirrors/freeswitch
This commit is contained in:
parent
fa711796a8
commit
b6a81ba7fd
|
@ -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";
|
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/perl
|
||||
#
|
||||
# Add this to conf/dialplan/public but only if you wish to setup a honeypot.
|
||||
#
|
||||
# <X-PRE-PROCESS cmd="exec" data="$${base_dir}/bin/honeypot.pl"/>
|
||||
#
|
||||
|
||||
use Data::Dumper;
|
||||
use LWP::Simple;
|
||||
|
||||
# http://www.infiltrated.net/voipabuse/numberscalled.txt
|
||||
|
||||
my @numberscalled = split(/\n/, get("http://www.infiltrated.net/voipabuse/numberscalled.txt"));
|
||||
|
||||
foreach $number (@numberscalled) {
|
||||
my ($num,$ts) = split(/\t/, $number);
|
||||
|
||||
print "<extension name=\"$num\">\n";
|
||||
print " <condition field=\"destination_number\" expression=\"^$num\$\">\n";
|
||||
print " <action application=\"answer\"/>\n";
|
||||
print " <action application=\"sleep\" data=\"30000\"/>\n";
|
||||
print " </condition>\n";
|
||||
print "</extension>\n";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue