Changeset 57
- Timestamp:
- 12/12/14 12:18:54 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dnsbl/DNSBLweb.pm
r54 r57 37 37 return; 38 38 } 39 my $ret ;39 my $ret = ''; 40 40 41 41 my %args = @_; 42 42 $args{ipseen} = \%ipseen if !defined($args{ipseen}); 43 my $pblock = $args{block} || '0/0';44 43 my $ip; 45 44 if ($args{ip}) { … … 49 48 } 50 49 my $ipcidr = new NetAddr::IP $ip; 50 if (!$args{block}) { 51 # Safety net - Don't try to return the entire dataset if we were only passed an IP that 52 # is not in a known block 53 ($args{block}) = $dbh->selectrow_array("SELECT block FROM blocks WHERE block >> ? AND level=0", undef, $ip); 54 return '' if !$args{block}; 55 } 56 my $pblock = $args{block} || '0/0'; 51 57 52 58 my $basesql = "SELECT b.block,o.orgname,b.listme,o.listme,b.comments,o.comments ".
Note:
See TracChangeset
for help on using the changeset viewer.