Changeset 75
- Timestamp:
- 09/08/25 17:31:50 (6 days ago)
- Location:
- trunk/dnsbl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dnsbl/DNSBL.pm
r73 r75 660 660 661 661 662 sub export_alt {663 my $self = shift;664 my $listhosts = shift;665 my $level = shift || 0;666 my $container = shift || '0.0.0.0/0';667 my $oobblock = shift || 0;668 my $ooborg = shift || 0;669 670 #print "\nDEBUG: called with $level, $container, $oobblock, $ooborg\n";671 # if $level > 2 or $container =~ /^64\.76\./;672 # my %listhosts;673 674 # $level = 0 if !$level;675 if ($level > 3) {676 warn "getting too deep, breaking off!\n";677 return;678 }679 680 my $sth = $dbh->prepare("select ip,s4list from iplist order by ip");681 my $bsth = $dbh->prepare("select b.block,b.listme,b.level,o.listme ".682 "from blocks b inner join orgs o on b.orgid=o.orgid ".683 "where b.block >> ?");684 while (my ($ip,$s4list) = $sth->fetchrow_array) {685 $bsth->execute($ip);686 while (my ($block,$blisted,$blevel,$olisted) = $bsth->fetchrow_array) {687 $listhosts->{$ip} |= 0;688 }689 }690 691 } # end export_alt()692 693 694 662 ## DNSBL::autolist_block() 695 663 # check if a block should be autolisted -
trunk/dnsbl/export-dnsbl
r74 r75 50 50 51 51 $dnsbl->initexport; 52 #$dnsbl->export($ipref,$mode,1,'50.22.0.0/15');53 #$dnsbl->export($ipref,$mode);54 $dnsbl->export_alt($ipref2, $mode);55 52 53 $dnsbl->export($ipref,$mode); 56 54 57 55 ##fixme - mode should pick actual output, not just export mode … … 65 63 # more or less raw CIDR block-and-IP info. rbldnsd format for convenience. 66 64 67 68 69 if (0) { 70 # foreach (sort ipcmp keys %iplist) { 71 foreach (keys %iplist) { 65 foreach (sort ipcmp keys %iplist) { 72 66 my $entry; 73 67 if ($iplist{$_} == -1) { … … 96 90 print $out; 97 91 } 98 }99 100 92 101 93 } else {
Note:
See TracChangeset
for help on using the changeset viewer.