blib/lib/Net/DNSBL/Statistics.pm

filter: Statementstmt 98.4% 254 / 258 Branchbran 83.7% 124 / 148 Conditioncond 57.9% 62 / 107 MC/DCmcdc 33.9% 20 / 59 Subroutinesub 93.7% 15 / 16 Podpod 37.5% 3 / 8 totaltotal 80.2% 478 / 596 SCAR 51.3
CC
124
Cov
86%
run
140.3
cmurl
11.0
htmltxt
5.1
CRAP 168.3
↑ Summary recurse2txt »
1 #!/usr/bin/perl
2 package Net::DNSBL::Statistics;
3  
4 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 #use diagnostics;
6 6 ▶use Net::DNS::Codes qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 6 use Net::DNS::ToolKit qw(
8 newhead
9 gethead
10 inet_ntoa
11 6 ▶);
Subroutine BEGIN: called CC=1 SCAR=0.0
12 6 ▶use Net::DNS::ToolKit::RR;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 6 use Net::DNS::ToolKit::Utilities qw(
14 id
15 revIP
16 6 ▶);
Subroutine BEGIN: called CC=1 SCAR=0.0
17 6 use Net::DNSBL::Utilities qw(
18 DO
19 list2NetAddr
20 matchNetAddr
21 6 ▶);
Subroutine BEGIN: called CC=1 SCAR=0.0
22 #use Net::DNS::ToolKit::Debug qw(
23 # print_head
24 # print_buf
25 #);
26  
27 6 use vars qw(
28 $VERSION @ISA @EXPORT_OK
29 6 ▶);
Subroutine BEGIN: called CC=1 SCAR=0.0
30 6 require Exporter;
31 6 @ISA = qw(Exporter);
32  
33 6 $VERSION = do { my @r = (q$Revision: 0.13 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
34  
35 6 @EXPORT_OK = qw(
36 run
37 plaintxt
38 htmltxt
39 );
40  
41 # undocumented $DEBUG values
42 #
43 # 1 => return @ip array
44 # 2 => return %dnsbls initialization hash
45 # 3 => return ($iptr,$regexptr) ignore, regexp ptrs
46 # 4 => return %ips union aging hash
47 # 5 => return %qc hash
48 # other => return un-converted %dnsbls hash
49  
50 =head1 NAME
51  
52 Net::DNSBL::Statistics - gather DNSBL Statistics
53  
54 =head1 SYNOPSIS
55  
56 use Net::DNSBL::Statistics qw(
57 run
58 plaintxt
59 htmltxt
60 );
61  
62 %dnsblcounts=run(\%config,$NonBlockSock,$sockaddr_in);
63 $text = plaintxt(\%config,\%dnsblscounts);
64 $html = htmltxt(\%config,\%dnsblcounts);
65  
66 =head1 DESCRIPTION
67  
68 B<Net::DNSBL::Statistics> is the Perl module that collects statistics on the
69 interrogation success for a list of IP addresses against a list of DNSBL's.
70 The module is used to implement the reproting script B<dnsblstat>.
71  
72 =head1 CONFIGURATION FILE
73  
74 With the addition of a few elements, the configuration file for B<dnsblstat>
75 shares a common format with the Mail::SpamCannibal sc_BLcheck.pl script,
76 facilitating common maintenance of DNSBL's for your MTA installation.
77  
78 The sample configuration file
79 B<statistics.conf.sample> is heavily commented with the details for each
80 configuration element.
81  
82 =head1 SYSTEM SIGNALS
83  
84 B<dnsblstat> responds to the following system signals:
85  
86 =over 2
87  
88 =item * TERM
89  
90 Script is terminated.
91  
92 =back
93  
94 =head1 PERL MODULE DESCRIPTION - Script Implementation
95  
96 B<Net::DNSBL::Statistics> provides most of the functions that implement
97 B<dnsblstat> which is a script that collects statistics from a list of IP
98 address interrogations against a list of DNSBL's
99  
100 =head1 dnsblstat usage
101  
102 How to use B<dnsblstat>
103  
104 Syntax: dnsblstat path/to/config.file
105 or
106 dnsblstat -t path/to/config.file
107 dnsblstat -w path/to/config.file
108  
109 Normally dnsblstat prints a sorted list (by count)
110 of the DNSBL's interrogated with their reply count,
111 percentage of the total count, and any comments from
112 the DNSBL's 'comment' key field in the config file.
113 The 'comment' field may contain html markup text.
114  
115 i.e.
116 44 100.0% TOTAL IP's interrogated
117 41 93.2% UNION of all results
118 34 77.3% dnsbl.sorbs.net comment
119 ........
120  
121 The -t switch will print a start and stop time.
122  
123 i.e.
124 # start: Fri Jan 4 17:46:44 2008
125 # stop : Fri Jan 4 17:58:21 2008
126  
127 The -w switch will put the output into an HTML table
128 without the E<lt>tableE<gt> statement E<lt>/tableE<gt>>., a commment as above
129 and with an E<lt>a href="..."E<gt>dnsbl nameE<lt>/aE<gt> statement replacing
130 the dnsbl name if the 'url' key is present in the config file.
131  
132 i.e.
133 A one line example corresponding to the text line above:
134  
135 34 77.3% dnsbl.sorbs.net
136  
137 with a 'comment' key of: 127.0.0.2,5,7,8,9,10,12
138 and a 'url' key of: http://www.au.sorbs.net/using.shtml
139  
140 <tr class=dnsbl><td align=right>34</td>
141 <td align=right>77.3%</td>
142 <td align=left><a
143 href="http://www.au.sorbs.net/using.shtml">dnsbl.sorbs.net</a></td>
144 <td align=left>127.0.0.2,5,7,8,9,10,12</td>
145 </tr>
146  
147 =head1 Net::DNSBL::Statistics FUNCTIONS
148  
149 =over 4
150  
151 =item * %dnsblscounts=run(\%config,$NonBlockSock,$sockaddr_in);
152  
153 Returns the total number of IP's interrogated (IP list less white listed items) and a hash of DNSBL
154 names and their respective SPAM reply counts or equivalent for 'in-addr.arpa' and GENERIC.
155  
156 input: config pointer,
157 non-blocking socket descriptor,
158 sockaddr_in for local DNS host
159  
160 returns: dnsbl count hash
161  
162 The dnsbl count hash will have two added keys:
163  
164 TOTAL the total number of interrogations less whitelist
165 UNION the total number of spam 'hits'
166  
167 HINTs: use Net::NBsocket qw( open_udbNB sockaddr_in );
168 use Net::DNS::ToolKit qw( get_ns );
169  
170 my $sock = open_udpNB();
171 my $sockaddr_in = sockaddr_in(53, scalar get_ns());
172  
173 =cut
174  
175 6 my $w = 0;
176 6 my @w = qw( \ | / - );
177 sub whirl {
178 253 ▶ return;
Subroutine whirl: called CC=2 SCAR=14.0
Pod undocumented
179 0 print STDERR "\r",$w[$w],"\r";
180 0 ▶ $w = 0 if ++$w > $#w;
Branch: 1 branch
BranchTrueFalseTotal
if ++$w > $#w 0 0 0
181 }
182  
183 sub run {
184 13 ▶ my($conf,$Usock,$U_Sin,$DEBUG) = @_;
Subroutine run: called CC=103 SCAR=49.4
Pod documented
185 13 my %ips;
186 13 ▶ return () unless $conf->{FILES};
Branch: 1 branch
BranchTrueFalseTotal
unless $conf->{"FILES"} 1 12 13
187 12 ▶ my @files = (ref $conf->{FILES}) ? @{$conf->{FILES}} : ($conf->{FILES});
Branch: 1 branch
BranchTrueFalseTotal
ref $conf->{'FILES'} ? : 3 9 12
188  
189 12 local *F;
190 12 foreach (@files) {
191 15 ▶ next unless -e $_ && open F, $_;
Branch: 1 branch
BranchTrueFalseTotal
unless -e $_ and open F, $_ 5 10 15
Condition66%2/3
-e $_ and open F, $_
!ll&&!rl&&r
5010
MC/DC50%1/2
-e $_ and open F, $_
-e $_ open F, $_
Truth table66%2/3
A and B
A= -e $_B= open F, $_
ABresult
0X0
100
111
192 10 foreach (<F>) {
193 167 ▶ next unless $_ =~ /\S/;
Branch: 1 branch
BranchTrueFalseTotal
unless $_ =~ /\S/ 0 167 167
194 167 ▶ next if $_ =~ /^\s*#/;
Branch: 1 branch
BranchTrueFalseTotal
if $_ =~ /^\s*#/ 12 155 167
195 155 ▶ next unless $_ =~ /(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/;
Branch: 1 branch
BranchTrueFalseTotal
unless $_ =~ /(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/ 6 149 155
196 149 $ips{"$1"} = undef;
197 }
198 10 close F;
199 }
200 12 my @ips = keys %ips;
201 12 %ips = ();
202  
203 12 ▶ return @ips if $DEBUG && $DEBUG == 1;
Branch: 1 branch
BranchTrueFalseTotal
if $DEBUG and $DEBUG == 1 3 9 12
Condition100%3/3
$DEBUG and $DEBUG == 1
!ll&&!rl&&r
183
MC/DC100%2/2
$DEBUG and $DEBUG == 1
$DEBUG $DEBUG == 1
Truth table100%3/3
A and B
A= $DEBUGB= $DEBUG == 1
ABresult
0X0
100
111
204  
205 9 my @NAignor;
206 9 ▶ if ($conf->{IGNORE}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($conf->{"IGNORE"}) 9 0 9
207 9 list2NetAddr($conf->{IGNORE},\@NAignor);
208 }
209  
210 ############## configure %dnsbl has for accumulating stats ###############
211 9 ▶ my @DNSBLs = grep( $_ =~ /^[0-9a-z]+\.[0-9a-z]/i && $_ !~ /in-addr/i, keys %{$conf});
Condition66%2/3
$_ =~ /^[0-9a-z]+\.[0-9a-z]/i && !($_ =~ /in-addr/i)
!ll&&!rl&&r
36035
MC/DC50%1/2
$_ =~ /^[0-9a-z]+\.[0-9a-z]/i && !($_ =~ /in-addr/i)
$_ =~ /^[0-9a-z]+\.[0-9a-z]/i !($_ =~ /in-addr/i)
Truth table66%2/3
A && not(B)
A= $_ =~ /^[0-9a-z]+\.[0-9a-z]/iB= !($_ =~ /in-addr/i)
ABresult
0X0
100
111
212  
213 9 my %dnsbls;
214  
215 9 foreach(@DNSBLs) {
216 35 $dnsbls{"$_"} = {
217 C => 0, # count
218 TO => 0, # timeouts
219 };
220 }
221  
222 #### %dnsbls configuration complete, configure maximum union timeout
223 9 my $uto = 0;
224 9 foreach(keys %dnsbls) {
225 next unless exists $conf->{"$_"} &&
226 35 ▶ exists $conf->{"$_"}->{timeout};
Branch: 1 branch
BranchTrueFalseTotal
unless exists $$conf{"$_"} and exists $$conf{"$_"}{"timeout"} 0 35 35
Condition33%1/3
exists $$conf{"$_"} and exists $$conf{"$_"}{"timeout"}
!ll&&!rl&&r
0035
MC/DC0%0/2
exists $$conf{"$_"} and exists $$conf{"$_"}{"timeout"}
exists $$conf{"$_"} exists $$conf{"$_"}{"timeout"}
Truth table33%1/3
A and B
A= exists $$conf{"$_"}B= exists $$conf{"$_"}{"timeout"}
ABresult
0X0
100
111
227 35 ▶ next if $conf->{"$_"}->{timeout} < $uto;
Branch: 1 branch
BranchTrueFalseTotal
if $$conf{"$_"}{"timeout"} < $uto 1 34 35
228 34 $uto = $conf->{"$_"}->{timeout};
229 }
230  
231 9 my($iptr,$regexptr);
232 9 my $needPTR = 0;
233 9 ▶ if ($conf->{'in-addr.arpa'}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($conf->{"in-addr.arpa"}) 5 4 9
234 5 $dnsbls{'in-addr.arpa'} = { C => 0 };
235 5 ▶ $needPTR = $conf->{'in-addr.arpa'}->{timeout} || 30;
Condition50%1/2
$conf->{'in-addr.arpa'}{'timeout'} || 30
l!l
50
MC/DC0%0/1
$conf->{'in-addr.arpa'}{'timeout'} || 30
$conf->{'in-addr.arpa'}{'timeout'}
Truth table50%1/2
A
A= $conf->{'in-addr.arpa'}{'timeout'}
Aresult
11
00
236 }
237 9 ▶ if ($conf->{GENERIC}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($conf->{"GENERIC"}) 9 0 9
238 9 $dnsbls{GENERIC} = { C => 0 };
239 9 ▶ $needPTR = ($conf->{GENERIC}->{timeout} || 30)
Branch: 1 branch
BranchTrueFalseTotal
unless $needPTR 4 5 9
Condition50%1/2
$conf->{'GENERIC'}{'timeout'} || 30
l!l
40
MC/DC0%0/1
$conf->{'GENERIC'}{'timeout'} || 30
$conf->{'GENERIC'}{'timeout'}
Truth table50%1/2
A
A= $conf->{'GENERIC'}{'timeout'}
Aresult
11
00
240 unless $needPTR;
241 9 ▶ undef $regexptr unless ($regexptr = $conf->{GENERIC}->{regexp}) &&
Branch: 1 branch
BranchTrueFalseTotal
unless $regexptr = $conf->{"GENERIC"}{"regexp"} and ref $regexptr eq "ARRAY" and @$regexptr > 0 0 9 9
Condition33%2/6
$regexptr = $conf->{"GENERIC"}{"regexp"} and ref $regexptr eq "ARRAY" and @$regexptr > 0
!ll&&!rl&&r
009
$regexptr = $conf->{"GENERIC"}{"regexp"} and ref $regexptr eq "ARRAY"
!ll&&!rl&&r
009
MC/DC0%0/3
$regexptr = $conf->{"GENERIC"}{"regexp"} and ref $regexptr eq "ARRAY" and @$regexptr > 0
$regexptr = $conf->{"GENERIC"}{"regexp"} ref $regexptr eq "ARRAY" @$regexptr > 0
Truth table25%1/4
A and B and C
A= $regexptr = $conf->{"GENERIC"}{"regexp"}B= ref $regexptr eq "ARRAY"C= @$regexptr > 0
ABCresult
0XX0
10X0
1100
1111
242 ref $regexptr eq 'ARRAY' && @$regexptr > 0;
243 9 ▶ undef $iptr unless ($iptr = $conf->{GENERIC}->{ignore}) &&
Branch: 1 branch
BranchTrueFalseTotal
unless $iptr = $conf->{"GENERIC"}{"ignore"} and ref $iptr eq "ARRAY" and @$iptr > 0 0 9 9
Condition33%2/6
$iptr = $conf->{"GENERIC"}{"ignore"} and ref $iptr eq "ARRAY" and @$iptr > 0
!ll&&!rl&&r
009
$iptr = $conf->{"GENERIC"}{"ignore"} and ref $iptr eq "ARRAY"
!ll&&!rl&&r
009
MC/DC0%0/3
$iptr = $conf->{"GENERIC"}{"ignore"} and ref $iptr eq "ARRAY" and @$iptr > 0
$iptr = $conf->{"GENERIC"}{"ignore"} ref $iptr eq "ARRAY" @$iptr > 0
Truth table25%1/4
A and B and C
A= $iptr = $conf->{"GENERIC"}{"ignore"}B= ref $iptr eq "ARRAY"C= @$iptr > 0
ABCresult
0XX0
10X0
1100
1111
244 ref $iptr eq 'ARRAY' && @$iptr > 0;
245 }
246 ### adjust $uto to account for generic retries and in-addr.arpa timeouts
247 9 ▶ $uto = $needPTR
Branch: 1 branch
BranchTrueFalseTotal
if $uto < $needPTR 0 9 9
248 if $uto < $needPTR;
249 9 ▶ $uto = 30 unless $uto;
Branch: 1 branch
BranchTrueFalseTotal
unless $uto 0 9 9
250 #### maximum $uto = 2x max delay + a little
251 9 $uto *= 2;
252 9 $uto += 5;
253  
254 9 ▶ return %dnsbls if $DEBUG && $DEBUG == 2;
Branch: 1 branch
BranchTrueFalseTotal
if $DEBUG and $DEBUG == 2 1 8 9
Condition100%3/3
$DEBUG and $DEBUG == 2
!ll&&!rl&&r
171
MC/DC100%2/2
$DEBUG and $DEBUG == 2
$DEBUG $DEBUG == 2
Truth table100%3/3
A and B
A= $DEBUGB= $DEBUG == 2
ABresult
0X0
100
111
255  
256 8 ▶ return ($iptr,$regexptr) if $DEBUG && $DEBUG == 3;
Branch: 1 branch
BranchTrueFalseTotal
if $DEBUG and $DEBUG == 3 1 7 8
Condition100%3/3
$DEBUG and $DEBUG == 3
!ll&&!rl&&r
161
MC/DC100%2/2
$DEBUG and $DEBUG == 3
$DEBUG $DEBUG == 3
Truth table100%3/3
A and B
A= $DEBUGB= $DEBUG == 3
ABresult
0X0
100
111
257  
258 7 my %qc = (
259 'in-addr' => 0,
260 'regular' => 0,
261 # retries below
262 'generic' => 0,
263 'retry-r' => 0,
264 );
265  
266 7 my %queue;
267 7 my $fileno = fileno($Usock);
268 7 my $vin = '';
269 7 vec($vin,$fileno,1) = 1;
270 7 my $Run = 1;
271 7 ▶ local $SIG{TERM} = sub {$Run = 0};
Subroutine __ANON__: not called CC=1 SCAR=1.2
272  
273 7 my $qsize = keys %dnsbls;
274 7 my $then = time;
275 7 my $uage = $then; # union aging every 5 seconds
276 7 my ($get,$put,$parse) = new Net::DNS::ToolKit::RR;
277 7 my($rin,$rout,$win,$wout,$ip,$packet,$name,$id,$msg,$bl,$now,$revIP,$nfound,$answer,$ttl,$rdl,@rdata,@sndQ);
278  
279 LOOP:
280 7 ▶ while ($Run) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Run) 345 0 345
281 345 my $Q = keys %queue;
282 345 ▶ if ($qsize > $Q && ($ip = shift @ips)) { # run results for next IP if queue is not double full
Branch: 1 branch
BranchTrueFalseTotal
if ($qsize > $Q and $ip = shift @ips) 70 275 345
Condition100%3/3
$qsize > $Q and $ip = shift @ips
!ll&&!rl&&r
2383770
MC/DC100%2/2
$qsize > $Q and $ip = shift @ips
$qsize > $Q $ip = shift @ips
Truth table100%3/3
A and B
A= $qsize > $QB= $ip = shift @ips
ABresult
0X0
100
111
283 70 ▶ next if matchNetAddr($ip,\@NAignor);
Branch: 1 branch
BranchTrueFalseTotal
if matchNetAddr($ip, \@NAignor) 14 56 70
284 56 ++$dnsbls{TOTAL}->{C};
285 56 $now = time;
286 56 $revIP = revIP($ip);
287 56 ▶ if ($needPTR) {
Branch: 1 branch
BranchTrueFalseTotal
if ($needPTR) 56 0 56
288 56 $id = makid(\%queue);
289 56 $name = $revIP .'.in-addr.arpa';
290 56 $packet = makequery($put,$id,$name,T_PTR());
291 56 $queue{$id} = {
292 B => 'in-addr.arpa',
293 Q => $packet,
294 T => $now + $needPTR, # timeout
295 R => 0, # retry
296 X => $revIP,
297 };
298 56 push @sndQ, $packet;
299 56 ++$qc{'in-addr'};
300 }
301
302 56 foreach $bl (@DNSBLs) {
303 168 ▶ next if $dnsbls{"$bl"}->{TO} > 5; # ignore this BL if it timed out to many times
Branch: 1 branch
BranchTrueFalseTotal
if $dnsbls{"$bl"}{"TO"} > 5 8 160 168
304 160 $id = makid(\%queue);
305 160 $name = $revIP .'.'. $bl;
306 160 $packet = makequery($put,$id,$name,T_A());
307 $queue{$id} = {
308 B => "$bl",
309 Q => $packet,
310 160 ▶ T => $now + ($conf->{"$bl"}->{timeout} || 30),
Condition50%1/2
$$conf{"$bl"}{'timeout'} || 30
l!l
1600
MC/DC0%0/1
$$conf{"$bl"}{'timeout'} || 30
$$conf{"$bl"}{'timeout'}
Truth table50%1/2
A
A= $$conf{"$bl"}{'timeout'}
Aresult
11
00
311 R => 0,
312 X => $revIP,
313 };
314 160 push @sndQ, $packet;
315 160 ++$qc{regular};
316 }
317 }
318  
319 # wait for some responses
320 331 $rin = $vin;
321 331 ▶ if (@sndQ) {
Branch: 1 branch
BranchTrueFalseTotal
if (@sndQ) { } 73 258 331
322 73 $win = $vin;
323 } else {
324 258 $win = '';
325 }
326 331 $nfound = select($rout=$rin,$wout=$win,undef,0.5); # tick each second
327 331 ▶ if ($nfound > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($nfound > 0) { } 183 148 331
328 183 ▶ while (vec($wout,$fileno,1) && @sndQ) {
Branch: 1 branch
BranchTrueFalseTotal
if (vec $wout, $fileno, 1 and @sndQ) 296 183 479
Condition100%3/3
vec $wout, $fileno, 1 and @sndQ
!ll&&!rl&&r
11073296
MC/DC100%2/2
vec $wout, $fileno, 1 and @sndQ
vec $wout, $fileno, 1 @sndQ
Truth table100%3/3
A and B
A= vec $wout, $fileno, 1B= @sndQ
ABresult
0X0
100
111
329 296 $packet = shift @sndQ;
330 #print STDERR "WRITE\n";
331 #print_buf(\$packet);
332 #print STDERR "\n";
333 296 send($Usock,$packet,0,$U_Sin);
334 296 ▶ whirl() if $DEBUG;
Branch: 1 branch
BranchTrueFalseTotal
if $DEBUG 253 43 296
335 }
336 183 ▶ if (vec($rout,$fileno,1)) {
Branch: 1 branch
BranchTrueFalseTotal
if (vec $rout, $fileno, 1) 133 50 183
337 133 undef $msg;
338 133 ▶ next unless recv($Usock,$msg,,PACKETSZ,0); # ignore receive errors
Branch: 1 branch
BranchTrueFalseTotal
unless recv $Usock, $msg, PACKETSZ(), 0 0 133 133
339 133 ▶ next unless length($msg) > HFIXEDSZ; # ignore short packets
Branch: 1 branch
BranchTrueFalseTotal
unless length $msg > HFIXEDSZ() 0 133 133
340 #print STDERR "RECEIVE\n";
341 #print_buf(\$msg);
342 #print STDERR "\n";
343 133 my($off,$qr,$opcode,$aa,$tc,$rd,$ra,$mbz,$ad,$cd,$rcode,$qdcount,$ancount,$nscount,$arcount);
344 133 ($off,$id,$qr,$opcode,$aa,$tc,$rd,$ra,$mbz,$ad,$cd,$rcode,$qdcount,$ancount,$nscount,$arcount)= gethead(\$msg);
345 next unless
346 $tc == 0 &&
347 $qr == 1 &&
348 $opcode == QUERY &&
349 ($rcode == NOERROR || $rcode == NXDOMAIN || $rcode == SERVFAIL) &&
350 $qdcount == 1 &&
351 133 ▶ exists $queue{$id};
Branch: 1 branch
BranchTrueFalseTotal
unless $tc == 0 and $qr == 1 and $opcode == QUERY() and $rcode == NOERROR() || $rcode == NXDOMAIN() || $rcode == SERVFAIL() and $qdcount == 1 and exists $queue{$id} 0 133 133
Condition47%10/21
$tc == 0 and $qr == 1 and $opcode == QUERY() and $rcode == NOERROR() || $rcode == NXDOMAIN() || $rcode == SERVFAIL() and $qdcount == 1 and exists $queue{$id}
!ll&&!rl&&r
00133
$tc == 0 and $qr == 1 and $opcode == QUERY() and $rcode == NOERROR() || $rcode == NXDOMAIN() || $rcode == SERVFAIL() and $qdcount == 1
!ll&&!rl&&r
00133
$tc == 0 and $qr == 1 and $opcode == QUERY() and $rcode == NOERROR() || $rcode == NXDOMAIN() || $rcode == SERVFAIL()
!ll&&!rl&&r
00133
$tc == 0 and $qr == 1 and $opcode == QUERY()
!ll&&!rl&&r
00133
$tc == 0 and $qr == 1
!ll&&!rl&&r
00133
$rcode == NOERROR() or $rcode == NXDOMAIN() or $rcode == SERVFAIL()
l!l&&r!l&&!r
112210
$rcode == NOERROR() or $rcode == NXDOMAIN()
l!l&&r!l&&!r
842821
MC/DC0%0/8
$tc == 0 and $qr == 1 and $opcode == QUERY() and $rcode == NOERROR() || $rcode == NXDOMAIN() || $rcode == SERVFAIL() and $qdcount == 1 and exists $queue{$id}
$tc == 0 $qr == 1 $opcode == QUERY() $rcode == NOERROR() $rcode == NXDOMAIN() $rcode == SERVFAIL() $qdcount == 1 exists $queue{$id}
Truth table23%3/13
A and B and C and D or E or F and G and H
A= $tc == 0B= $qr == 1C= $opcode == QUERY()D= $rcode == NOERROR()E= $rcode == NXDOMAIN()F= $rcode == SERVFAIL()G= $qdcount == 1H= exists $queue{$id}
ABCDEFGHresult
0XXXXXXX0
10XXXXXX0
110XXXXX0
111000XX0
1111XX0X0
11101X0X0
1110010X0
1111XX100
11101X100
111001100
1111XX111
11101X111
111001111
352  
353 133 ($off,my($name,$t,$class)) = $get->Question(\$msg,$off);
354 133 ▶ next unless $class == C_IN; # not my question
Branch: 1 branch
BranchTrueFalseTotal
unless $class == C_IN() 0 133 133
355  
356 133 $bl = $queue{$id}->{B};
357 133 $revIP = $queue{$id}->{X};
358 133 delete $queue{$id};
359 133 ▶ $dnsbls{"$bl"}->{TO} = 0 # reset timeout count
Branch: 1 branch
BranchTrueFalseTotal
unless $bl eq "in-addr.arpa" 84 49 133
360 unless $bl eq 'in-addr.arpa';
361 133 ▶ if ($ancount && $rcode == &NOERROR) { # if good response
Branch: 3 branches
BranchTrueFalseTotal
if ($ancount and $rcode == &NOERROR) { } 84 49 133
elsif ($t == T_A()) { } 35 14 49
elsif ($needPTR and $t == T_PTR() and exists $conf->{'in-addr.arpa'}) { } 6 8 14
Condition66%2/3
$ancount and $rcode == &NOERROR
!ll&&!rl&&r
49084
MC/DC50%1/2
$ancount and $rcode == &NOERROR
$ancount $rcode == &NOERROR
Truth table66%2/3
A and B
A= $ancountB= $rcode == &NOERROR
ABresult
0X0
100
111
362 84 $name =~ /(?:\d+\.\d+\.\d+\.\d+\.)/i;
363 84 ▶ next unless lc $bl eq lc $' &&
Branch: 1 branch
BranchTrueFalseTotal
unless lc $bl eq lc $' and $t == T_A() || $t == T_PTR() 0 84 84
Condition66%4/6
lc $bl eq lc $' and $t == T_A() || $t == T_PTR()
!ll&&!rl&&r
0183
$t == T_A() or $t == T_PTR()
l!l&&r!l&&!r
49350
MC/DC0%0/3
lc $bl eq lc $' and $t == T_A() || $t == T_PTR()
lc $bl eq lc $' $t == T_A() $t == T_PTR()
Truth table25%1/4
A and B or C
A= lc $bl eq lc $'B= $t == T_A()C= $t == T_PTR()
ABCresult
0XX0
1000
11X1
1011
364 ($t == T_A || $t == T_PTR);
365  
366 84 undef $answer;
367 84 my @generic;
368 ANSWER:
369 84 foreach(0..$ancount-1) {
370 126 ($off,$name,$t,$class,$ttl,$rdl,@rdata) = $get->next(\$msg,$off);
371 126 ▶ if ($t == T_A) {
Branch: 2 branches
BranchTrueFalseTotal
if ($t == T_A()) { } 77 49 126
elsif ($needPTR and $t == T_PTR() and exists $dnsbls{'GENERIC'}) { } 49 0 49
372 77 ▶ while($answer = shift @rdata) {
Branch: 1 branch
BranchTrueFalseTotal
if ($answer = shift @rdata) 77 42 119
373 77 $ip = inet_ntoa($answer);
374 77 ▶ if (grep($ip eq $_,keys %{$conf->{"$bl"}->{accept}})) {
Branch: 1 branch
BranchTrueFalseTotal
if (grep(($ip eq $_), keys %{$$conf{"$bl"}{"accept"};})) 35 42 77
375 35 ++$dnsbls{"$bl"}->{C}; # bump dnsbl count
376 35 union(\%dnsbls,\%ips,$revIP,$now + $uto);
377 #print STDERR "FAILED $name $ip\n";
378 35 next LOOP;
379 }
380 }
381 }
382 ▶ elsif ($needPTR && $t == T_PTR && exists $dnsbls{GENERIC}) {
Condition33%2/6
$needPTR and $t == T_PTR() and exists $dnsbls{"GENERIC"}
!ll&&!rl&&r
0049
$needPTR and $t == T_PTR()
!ll&&!rl&&r
0049
MC/DC0%0/3
$needPTR and $t == T_PTR() and exists $dnsbls{"GENERIC"}
$needPTR $t == T_PTR() exists $dnsbls{"GENERIC"}
Truth table25%1/4
A and B and C
A= $needPTRB= $t == T_PTR()C= exists $dnsbls{"GENERIC"}
ABCresult
0XX0
10X0
1100
1111
383 # positive in-addr.arpa responses are ignored
384 49 push @generic, $rdata[0];
385 49 next ANSWER;
386 }
387 }
388 49 ▶ if (@generic) {
Branch: 1 branch
BranchTrueFalseTotal
if (@generic) 35 14 49
389 35 foreach my $g (@generic) {
390 49 ▶ next LOOP if $iptr && grep($g =~ /$_/i, @$iptr);
Branch: 1 branch
BranchTrueFalseTotal
if $iptr and grep(($g =~ /$_/i), @$iptr) 14 35 49
Condition66%2/3
$iptr and grep(($g =~ /$_/i), @$iptr)
!ll&&!rl&&r
03514
MC/DC50%1/2
$iptr and grep(($g =~ /$_/i), @$iptr)
$iptr grep(($g =~ /$_/i), @$iptr)
Truth table66%2/3
A and B
A= $iptrB= grep(($g =~ /$_/i), @$iptr)
ABresult
0X0
100
111
391 35 ▶ next LOOP if $g && ! grep($g =~ /$_/i, @$regexptr);
Branch: 1 branch
BranchTrueFalseTotal
if $g and not grep(($g =~ /$_/i), @$regexptr) 7 28 35
Condition66%2/3
$g and not grep(($g =~ /$_/i), @$regexptr)
!ll&&!rl&&r
0287
MC/DC50%1/2
$g and not grep(($g =~ /$_/i), @$regexptr)
$g not grep(($g =~ /$_/i), @$regexptr)
Truth table66%2/3
A and not(B)
A= $gB= not grep(($g =~ /$_/i), @$regexptr)
ABresult
0X0
100
111
392 }
393 14 ++$dnsbls{GENERIC}->{C}; # bump GENERIC count
394 14 union(\%dnsbls,\%ips,$revIP,$now + $uto);
395 #print STDERR "FAILED $name GENERIC\n";
396 }
397 }
398 elsif ($t == T_A) {
399 35 next LOOP; # tis a lookup failure or no response... ignore
400 }
401 ▶ elsif ($needPTR && $t == T_PTR && exists $conf->{'in-addr.arpa'}) {
Condition50%3/6
$needPTR and $t == T_PTR() and exists $conf->{"in-addr.arpa"}
!ll&&!rl&&r
086
$needPTR and $t == T_PTR()
!ll&&!rl&&r
0014
MC/DC33%1/3
$needPTR and $t == T_PTR() and exists $conf->{"in-addr.arpa"}
$needPTR $t == T_PTR() exists $conf->{"in-addr.arpa"}
Truth table50%2/4
A and B and C
A= $needPTRB= $t == T_PTR()C= exists $conf->{"in-addr.arpa"}
ABCresult
0XX0
10X0
1100
1111
402 6 ++$dnsbls{'in-addr.arpa'}->{C};
403 6 union(\%dnsbls,\%ips,$revIP,$now + $uto);
404 #print STDERR "FAILED $name ERROR\n";
405 6 next LOOP;
406 }
407 }
408 }
409 ######################################################################
410 else { # timeout
411 148 $now = time;
412 148 ▶ next unless $now > $then;
Branch: 1 branch
BranchTrueFalseTotal
unless $now > $then 74 74 148
413 74 $then = $now;
414 74 my @queue = sort {$queue{$a}->{T} <=> $queue{$b}->{T}} keys %queue;
415 74 foreach $id (@queue) { # check for DNSBL timeouts
416 198 ▶ last if $now < $queue{$id}->{T};
Branch: 1 branch
BranchTrueFalseTotal
if $now < $queue{$id}{"T"} 35 163 198
417 163 $bl = $queue{$id}->{B};
418 163 ▶ if ($bl eq 'in-addr.arpa') {
Branch: 1 branch
BranchTrueFalseTotal
if ($bl eq 'in-addr.arpa') { } 11 152 163
419 11 ▶ if (exists $conf->{'in-addr.arpa'}) {
Branch: 2 branches
BranchTrueFalseTotal
if (exists $conf->{'in-addr.arpa'}) { } 3 8 11
elsif (exists $dnsbls{'GENERIC'}) { } 8 0 8
420 3 $revIP = $queue{$id}->{X};
421 3 delete $queue{$id};
422 3 ++$dnsbls{'in-addr.arpa'}->{C};
423 3 union(\%dnsbls,\%ips,$revIP,$now + $uto);
424 #print STDERR "FAILED $revIP.in-addr.arpa timeout\n";
425 }
426 elsif (exists $dnsbls{GENERIC}) {
427 8 ▶ unless ($queue{$id}->{R}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($queue{$id}{'R'}) { } 4 4 8
428 4 $queue{$id}->{R} = 1; # retry generic queries
429 4 $queue{$id}->{T} = $now + $needPTR;
430 4 push @sndQ, $queue{$id}->{Q};
431 4 ++$qc{generic};
432 }
433 else {
434 4 delete $queue{$id};
435 }
436 }
437 }
438 else { # regular DNSBL
439 152 ▶ unless ($queue{$id}->{R}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($queue{$id}{'R'}) { } 76 76 152
440 76 $queue{$id}->{R} = 1;
441 76 ▶ $queue{$id}->{T} = $now + ($conf->{"$bl"}->{timeout} || 30);
Condition50%1/2
$$conf{"$bl"}{'timeout'} || 30
l!l
760
MC/DC0%0/1
$$conf{"$bl"}{'timeout'} || 30
$$conf{"$bl"}{'timeout'}
Truth table50%1/2
A
A= $$conf{"$bl"}{'timeout'}
Aresult
11
00
442 76 push @sndQ, $queue{$id}->{Q};
443 76 ++$qc{'retry-r'};
444 }
445 else {
446 76 $revIP = $queue{$id}->{X};
447 76 delete $queue{$id};
448 76 ++$dnsbls{"$bl"}->{TO};
449 }
450 }
451 }
452 74 ▶ last LOOP unless @ips || keys %queue; # run through all IP's and remaining queue items
Branch: 1 branch
BranchTrueFalseTotal
unless @ips or keys %queue 7 67 74
Condition100%3/3
@ips or keys %queue
l!l&&r!l&&!r
5897
MC/DC100%2/2
@ips or keys %queue
@ips keys %queue
Truth table100%3/3
A or B
A= @ipsB= keys %queue
ABresult
1X1
011
000
453 67 ▶ next unless $uage < $now;
Branch: 1 branch
BranchTrueFalseTotal
unless $uage < $now 53 14 67
454 14 $uage = $now + 5;
455 14 @_ = sort {$ips{"$a"} <=> $ips{"$b"}} keys %ips;
456 14 foreach (@_) {
457 14 ▶ last if $ips{"$_"} > $now;
Branch: 1 branch
BranchTrueFalseTotal
if $ips{"$_"} > $now 14 0 14
458 0 delete $ips{"$_"};
459 }
460 } # else nfound
461 } # while ($Run)
462  
463 7 ▶ close $Usock unless $DEBUG;
Branch: 1 branch
BranchTrueFalseTotal
unless $DEBUG 1 6 7
464  
465 7 ▶ if ($DEBUG) {
Branch: 1 branch
BranchTrueFalseTotal
if ($DEBUG) { } 6 1 7
466 6 ▶ return %ips if $DEBUG == 4;
Branch: 1 branch
BranchTrueFalseTotal
if $DEBUG == 4 2 4 6
467 4 ▶ return %qc if $DEBUG == 5;
Branch: 1 branch
BranchTrueFalseTotal
if $DEBUG == 5 2 2 4
468 2 return %dnsbls; # for any other debug value
469 }
470 else {
471 1 foreach(keys %dnsbls) {
472 6 $dnsbls{$_} = $dnsbls{$_}->{C};
473 }
474 }
475 1 return %dnsbls;
476 }
477  
478 sub makequery {
479 216 ▶ my($put,$id,$name,$type) = @_;
Subroutine makequery: called CC=1 SCAR=0.0
Pod undocumented
480 216 my $buf;
481 216 my $off = newhead(\$buf,
482 $id,
483 BITS_QUERY | RD,
484 1,0,0,0,
485 );
486 216 $off = $put->Question(\$buf,$off,$name,$type,C_IN);
487 216 return $buf;
488 }
489  
490 sub makid {
491 216 ▶ my $qp = shift;
Subroutine makid: called CC=2 SCAR=7.0
Pod undocumented
492 216 my $id;
493 do {
494 216 $id = id()
495 216 ▶ } while exists $qp->{$id};
Branch: 1 branch
BranchTrueFalseTotal
exists $qp->{$id} and do { do { $id = id() } } 0 216 216
496 216 return $id;
497 }
498  
499 sub union {
500 58 ▶ my($dnsbls,$union,$rip,$expire) = @_;
Subroutine union: called CC=3 SCAR=11.0
Pod undocumented
501 58 $expire += 30; # union cache expiration is alway longer than timeouts
502 58 ▶ if (exists $union->{"$rip"}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $$union{"$rip"}) { } 24 34 58
503 $union->{"$rip"} = $expire
504 24 ▶ if $expire > $union->{"$rip"};
Branch: 1 branch
BranchTrueFalseTotal
if $expire > $$union{"$rip"} 0 24 24
505 } else {
506 34 $union->{"$rip"} = $expire;
507 34 ++$dnsbls->{UNION}->{C};
508 }
509 }
510  
511 =item * $text = plaintxt($config,\%dnsbls);
512  
513 Generate a plain text report of the form:
514  
515 44 100.0% TOTAL IP's interrogated
516 41 93.2% UNION of all results
517 34 77.3% dnsbl.sorbs.net comment
518 22 50.0% GENERIC comment
519 13 29.5% in-addr.arpa comment
520 11 25.0% cbl.abuseat.org comment
521 9 20.5% list.dsbl.org comment
522 2 4.5% dnsbl.njabl.org comment
523 1 2.3% bl.spamcannibal.org comment
524 0 0.0% dynablock.njabl.org comment
525  
526 input: configuration pointer,
527 dnsbl count hash pointer
528 returns: text buffer
529  
530 The 'comment' comes from the config file 'comment' key field for each
531 specified DNSBL or is blank if there is no 'comment' key.
532  
533 =cut
534  
535 # return 'comment' and 'url' if present
536 # input: $conf, $bl, $nbsp
537 # output: if $nbsp ($comment,$url)
538 # if !$nbsp $comment
539 #
540 sub cmurl {
541 24 ▶ my($conf,$bl,$nbsp) = @_;
Subroutine cmurl: called CC=11 SCAR=24.0
Pod undocumented
542 24 ▶ if ($bl eq 'TOTAL') {
Branch: 2 branches
BranchTrueFalseTotal
if ($bl eq 'TOTAL') { } 2 22 24
elsif ($bl eq 'UNION') { } 2 20 22
543 2 ▶ if ($nbsp) {
Branch: 1 branch
BranchTrueFalseTotal
if ($nbsp) { } 1 1 2
544 1 return (q|IP's interrogated|,'');
545 } else {
546 1 return q|IP's interrogated|;
547 }
548 } elsif ($bl eq 'UNION') {
549 2 ▶ if ($nbsp) {
Branch: 1 branch
BranchTrueFalseTotal
if ($nbsp) { } 1 1 2
550 1 return (q|of all results|,'');
551 } else {
552 1 return q|of all results|;
553 }
554 }
555 my $comment = (exists $conf->{"$bl"}->{comment} && $conf->{"$bl"}->{comment})
556 ? $conf->{"$bl"}->{comment}
557 20 ▶ : ($nbsp) ? '&nbsp;' : '';
Branch: 2 branches
BranchTrueFalseTotal
exists $$conf{"$bl"}{'comment'} && $$conf{"$bl"}{'comment'} ? : 10 10 20
$nbsp ? : 5 5 10
Condition66%2/3
exists $$conf{"$bl"}{"comment"} and $$conf{"$bl"}{"comment"}
!ll&&!rl&&r
10010
MC/DC50%1/2
exists $$conf{"$bl"}{"comment"} and $$conf{"$bl"}{"comment"}
exists $$conf{"$bl"}{"comment"} $$conf{"$bl"}{"comment"}
Truth table66%2/3
A and B
A= exists $$conf{"$bl"}{"comment"}B= $$conf{"$bl"}{"comment"}
ABresult
0X0
100
111
558 20 ▶ return $comment unless $nbsp;
Branch: 1 branch
BranchTrueFalseTotal
unless $nbsp 10 10 20
559 my $url = (exists $conf->{"$bl"}->{url} && $conf->{"$bl"}->{url})
560 10 ▶ ? q|<a href="|. $conf->{"$bl"}->{url} .q|">|
Branch: 1 branch
BranchTrueFalseTotal
exists $$conf{"$bl"}{'url'} && $$conf{"$bl"}{'url'} ? : 3 7 10
Condition66%2/3
exists $$conf{"$bl"}{"url"} and $$conf{"$bl"}{"url"}
!ll&&!rl&&r
703
MC/DC50%1/2
exists $$conf{"$bl"}{"url"} and $$conf{"$bl"}{"url"}
exists $$conf{"$bl"}{"url"} $$conf{"$bl"}{"url"}
Truth table66%2/3
A and B
A= exists $$conf{"$bl"}{"url"}B= $$conf{"$bl"}{"url"}
ABresult
0X0
100
111
561 : '';
562 10 return ($comment,$url);
563 }
564
565 sub plaintxt {
566 1 ▶ my($conf,$dnsbls) = @_;
Subroutine plaintxt: called CC=4 SCAR=14.2
Pod documented
567 return "# ERROR list is empty\n"
568 1 ▶ unless keys %$dnsbls && $dnsbls->{TOTAL};
Branch: 1 branch
BranchTrueFalseTotal
unless keys %$dnsbls and $dnsbls->{"TOTAL"} 0 1 1
Condition33%1/3
keys %$dnsbls and $dnsbls->{"TOTAL"}
!ll&&!rl&&r
001
MC/DC0%0/2
keys %$dnsbls and $dnsbls->{"TOTAL"}
keys %$dnsbls $dnsbls->{"TOTAL"}
Truth table33%1/3
A and B
A= keys %$dnsblsB= $dnsbls->{"TOTAL"}
ABresult
0X0
100
111
569 1 my $txt = '';
570 1 my $tot = $dnsbls->{TOTAL}/100;
571 1 my $len = length($dnsbls->{TOTAL});
572 1 foreach(sort{$dnsbls->{"$b"} <=> $dnsbls->{"$a"}} keys %$dnsbls) {
573 12 my $comment = cmurl($conf,$_);
574 12 $txt .= sprintf("% ${len}u% 6.1f%% %s %s\n",$dnsbls->{"$_"},$dnsbls->{"$_"}/$tot,$_,$comment);
575 }
576 1 return $txt;
577 }
578  
579 =item * $html = htmltxt($config,\%dnsbls);
580  
581 Generate a report as above but with E<lt>trE<gt>E<lt>tdE<gt>E<lt>/tdE<gt>E<lt>/trE<gt> table markup. The
582 E<lt>tableE<gt>E<lt>/tableE<gt> tags are not generated. If there is a 'url' key field in the
583 respective DNSBL config entry, the DNSBL name is provide with E<lt>a href="url"E<gt>DNSBLE<lt>/aE<gt>
584 tags with the specified 'url' as the 'href' value.
585  
586 input: configuration pointer,
587 dnsbl count hash pointer
588 returns: html text buffer
589  
590 A one line example corresponding to the text line above:
591  
592 34 77.3% dnsbl.sorbs.net
593  
594 with a 'comment' key of: 127.0.0.2,5,7,8,9,10,12
595 and a 'url' key of: http://www.au.sorbs.net/using.shtml
596  
597 <tr class=dnsbl><td align=right>34</td>
598 <td align=right>77.3%</td>
599 <td align=left><a
600 href="http://www.au.sorbs.net/using.shtml">dnsbl.sorbs.net</a></td>
601 <td align=left>127.0.0.2,5,7,8,9,10,12</td>
602 </tr>
603  
604 =back
605  
606 =cut
607  
608 sub htmltxt {
609 1 ▶ my($conf,$dnsbls) = @_;
Subroutine htmltxt: called CC=5 SCAR=16.3
Pod documented
610 return "<!-- ERROR list is empty -->\n"
611 1 ▶ unless keys %$dnsbls && $dnsbls->{TOTAL};
Branch: 1 branch
BranchTrueFalseTotal
unless keys %$dnsbls and $dnsbls->{"TOTAL"} 0 1 1
Condition33%1/3
keys %$dnsbls and $dnsbls->{"TOTAL"}
!ll&&!rl&&r
001
MC/DC0%0/2
keys %$dnsbls and $dnsbls->{"TOTAL"}
keys %$dnsbls $dnsbls->{"TOTAL"}
Truth table33%1/3
A and B
A= keys %$dnsblsB= $dnsbls->{"TOTAL"}
ABresult
0X0
100
111
612 1 my $html = '';
613 1 my $tot = $dnsbls->{TOTAL}/100;
614 1 my $len = length($dnsbls->{TOTAL});
615 1 foreach(sort{$dnsbls->{"$b"} <=> $dnsbls->{"$a"}} keys %$dnsbls) {
616 12 my($comment,$url) = cmurl($conf,$_,1);
617 12 ▶ my $aa = $url ? '</a>' : '';
Branch: 1 branch
BranchTrueFalseTotal
$url ? : 3 9 12
618 12 my $count = $dnsbls->{"$_"};
619 12 $html .= '<tr class=dnsbl><td align=right>'.
620 $count .'</td><td align=right>'.
621 sprintf("%.1f",$count/$tot) .'%</td><td align=left>'.
622 $url . $_ . $aa .'</td><td align=left>'. $comment .'</td></tr>'."\n";
623 }
624 1 return $html;
625 }
626  
627 =head1 Statistics Web Page HOWTO
628  
629 Read the C<contrib/HOWTO> document that describes the scripts used with
630 'cron' to auto generate web pages for the statistics reports
631  
632 =head1 EXPORT_OK
633  
634 run
635 plaintxt
636 htmltxt
637  
638 =head1 AUTHOR
639  
640 Michael Robinton, michael@bizsystems.com
641  
642 =head1 COPYRIGHT
643  
644 Copyright 2008-2014, Michael Robinton.
645 This program is free software; you can redistribute it and/or modify
646 it under the terms of the GNU General Public License as published by
647 the Free Software Foundation; either version 2 of the License, or
648 (at your option) any later version.
649  
650 This program is distributed in the hope that it will be useful,
651 but WITHOUT ANY WARRANTY; without even the implied warranty of
652 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
653 GNU General Public License for more details.
654  
655 You should have received a copy of the GNU General Public License
656 along with this program; if not, write to the Free Software
657 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
658  
659 =head1 SEE ALSO
660  
661 L<Mail::SpamCannibal>,
662 L<Net::DNS::Codes>,
663 L<Net::DNS::ToolKit>,
664 L<Net::DNSBL::MultiDaemon>
665  
666 =cut
667  
668 6 1;
↑ Summary recurse2txt »