]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
http://www.infiltrated.net/voipabuse/
authorBrian West <brian@freeswitch.org>
Tue, 28 Sep 2010 02:36:02 +0000 (21:36 -0500)
committerBrian West <brian@freeswitch.org>
Tue, 28 Sep 2010 02:36:02 +0000 (21:36 -0500)
scripts/perl/blacklist.pl [new file with mode: 0755]
scripts/perl/honeypot.pl [new file with mode: 0755]

diff --git a/scripts/perl/blacklist.pl b/scripts/perl/blacklist.pl
new file mode 100755 (executable)
index 0000000..d6c2ea7
--- /dev/null
@@ -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";
diff --git a/scripts/perl/honeypot.pl b/scripts/perl/honeypot.pl
new file mode 100755 (executable)
index 0000000..ef52142
--- /dev/null
@@ -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";
+}
+
+