2
0

honeypot.pl 725 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/perl
  2. #
  3. # Add this to conf/dialplan/public but only if you wish to setup a honeypot.
  4. #
  5. # <X-PRE-PROCESS cmd="exec" data="$${base_dir}/bin/honeypot.pl"/>
  6. #
  7. use Data::Dumper;
  8. use LWP::Simple;
  9. # http://www.infiltrated.net/voipabuse/numberscalled.txt
  10. my @numberscalled = split(/\n/, get("http://www.infiltrated.net/voipabuse/numberscalled.txt"));
  11. foreach $number (@numberscalled) {
  12. my ($num,$ts) = split(/\t/, $number);
  13. print "<extension name=\"$num\">\n";
  14. print " <condition field=\"destination_number\" expression=\"^$num\$\">\n";
  15. print " <action application=\"answer\"/>\n";
  16. print " <action application=\"sleep\" data=\"30000\"/>\n";
  17. print " </condition>\n";
  18. print "</extension>\n";
  19. }