Changeset 24
- Timestamp:
- 09/02/10 17:52:48 (14 years ago)
- Location:
- trunk/dnsbl
- Files:
-
- 2 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 } -
trunk/dnsbl/dnsbl.cgi
r22 r24 22 22 my $dnsbl = new DNSBL; 23 23 24 print "Content-type: text/html\n\n"; 25 24 26 my $dbh = $dnsbl->connect; 25 26 print "Content-type: text/html\n\n";27 27 28 28 my $page;
Note:
See TracChangeset
for help on using the changeset viewer.