Changeset 24 for trunk/dnsbl/DNSBL.pm
- Timestamp:
- 09/02/10 17:52:48 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dnsbl/DNSBL.pm
r23 r24 44 44 # probably needs some tuning; even 7 hits in a /24 is a pretty small percentage 45 45 # number of IPs in a block of the given masklength needed to have that block automatically listed 46 # defaults: (overridden by entries in db:autolist) 46 47 our %autolist = ( 47 48 31 => 1, … … 121 122 }) 122 123 or die "database inaccessible: ".$DBI::errstr; 124 my $sth = $dbh->prepare("SELECT masklen,ipcount FROM autolist"); 125 $sth->execute; 126 while (my ($masklen,$ipcount) = $sth->fetchrow_array) { 127 $autolist{$masklen} = $ipcount; 128 } 123 129 return $dbh; 124 130 }
Note:
See TracChangeset
for help on using the changeset viewer.