line |
true |
false |
branch |
54
|
0 |
27 |
unless ref $self |
55
|
0 |
27 |
unless $self->{'QUERY'} |
79
|
19 |
2 |
if ref $host |
96
|
21 |
0 |
if eval {
do {
$sock = "IO::Socket::INET"->new("PeerAddr", $host, "PeerPort", $port, "Timeout", $timeout);
1
}
} |
107
|
0 |
0 |
unless $iter == $retries |
127
|
0 |
0 |
if $ip =~ /^:[^:]/ or $ip =~ /[^:]:$/ |
132
|
0 |
0 |
if $seg[0] eq "" |
133
|
0 |
0 |
if $seg[-1] eq "" |
136
|
0 |
0 |
if ($seg[-1] =~ tr/.//) |
137
|
0 |
0 |
unless &is_valid_ipv4(pop @seg) |
143
|
0 |
0 |
if ($seg eq "") |
146
|
0 |
0 |
if $cmp |
150
|
0 |
0 |
if $seg =~ /[^0-9a-fA-F]/ |
151
|
0 |
0 |
if length $seg == 0 or length $seg > 4 |
153
|
0 |
0 |
if ($cmp) |
167
|
1 |
22 |
unless defined $ip |
168
|
0 |
22 |
index($ip, ':') >= 0 ? : |
176
|
2 |
14 |
unless $source |
177
|
2 |
14 |
unless $source |
178
|
14 |
0 |
unless (ref $source) |
179
|
13 |
1 |
if ($IANA{$source}) |
187
|
0 |
0 |
if ref $_ and ref $_ eq "ARRAY" and @{$_;} and ref $_->[0] and ref $_->[0] eq "ARRAY" and @{$_->[0];} |
|
0 |
0 |
unless ref $source eq "HASH" and scalar grep({$_->[0][0] if ref $_ and ref $_ eq "ARRAY" and @{$_;} and ref $_->[0] and ref $_->[0] eq "ARRAY" and @{$_->[0];};} values %{$source;} == scalar keys %{$source;}) |
197
|
3 |
16 |
unless (&is_valid_ip($param{'-ip'})) |
209
|
1 |
15 |
if ($set_source == 1) { } |
|
0 |
15 |
elsif ($set_source == 2) { } |
234
|
19 |
0 |
if (my $sock = &whois_connect($server_ref)) |
236
|
19 |
0 |
$query_code && ref $query_code eq 'CODE' ? : |
249
|
310 |
0 |
if defined $query{$qkey} |
251
|
2 |
308 |
if $qkey =~ /abuse/i and $query{$qkey} =~ /\@/ |
253
|
13 |
2 |
unless ($query{'abuse'}) |
254
|
10 |
3 |
if ($query{'fullinfo'} and $query{'fullinfo'} =~ /(\S*abuse\S*\@\S+)/m) { } |
|
1 |
2 |
elsif ($query{'email'} or $query{'e-mail'} or $query{'orgtechemail'}) { } |
262
|
4 |
11 |
unless (ref $query{'cidr'}) |
263
|
0 |
4 |
if (defined $query{'cidr'} and $query{'cidr'} =~ /\,/) { } |
281
|
0 |
65 |
if $params{'-debug'} |
286
|
4 |
15 |
unless keys %query |
288
|
0 |
15 |
if ($query{'permission'} and $query{'permission'} eq "denied") |
311
|
0 |
214 |
if /ERROR:201/ |
312
|
97 |
117 |
if /^(\%|\#)/ or not /\:/ |
316
|
45 |
72 |
$query{lc $field} ? : |
326
|
1 |
4 |
if (defined $query{'remarks'} and $query{'remarks'} =~ /The country is really world wide/ or defined $query{'netname'} and $query{'netname'} =~ /IANA-BLK/ or defined $query{'netname'} and $query{'netname'} =~ /AFRINIC-NET-TRANSFERRED/ or defined $query{'country'} and $query{'country'} =~ /world wide/) { } |
|
0 |
4 |
elsif (not $query{'inet6num'} || $query{'inetnum'}) { } |
351
|
0 |
5 |
unless defined $query{'country'} |
364
|
0 |
220 |
if /^\%201/ |
365
|
37 |
183 |
if (/^\%/) |
370
|
0 |
37 |
if (/^\%.*0\.0\.0\.0\s+/) |
377
|
0 |
183 |
if $skip_block |
378
|
48 |
135 |
unless /\:/ |
382
|
7 |
128 |
if ($field =~ /^inet6?num$/) |
383
|
0 |
7 |
if $value =~ /0\.0\.0\.0\s+/ |
389
|
1 |
134 |
if $lc_field eq "country" and defined $query{$lc_field} |
390
|
42 |
92 |
$query{$lc_field} ? : |
394
|
3 |
15 |
unless defined $query{$_} |
402
|
1 |
3 |
if (defined $query{'remarks'} and $query{'remarks'} =~ /address range is not administered by APNIC|This network in not allocated/ or defined $query{'descr'} and $query{'descr'} =~ /not allocated to|by APNIC|placeholder reference/i) { } |
|
0 |
3 |
elsif (not $query{'inet6num'} || $query{'inetnum'}) { } |
436
|
0 |
327 |
if /^\#201/ |
437
|
0 |
327 |
if /no match found for/i |
438
|
152 |
175 |
if /^\#/ or not /\:/ |
442
|
4 |
171 |
if ($field eq "OrgName" or $field eq "CustName") |
448
|
27 |
148 |
$query{lc $field} ? : |
452
|
0 |
4 |
if defined $query{'custname'} |
455
|
33 |
19 |
unless defined $query{$_} |
465
|
2 |
2 |
if $query{'orgid'} and $query{'orgid'} =~ /^\s*RIPE|LACNIC|APNIC|AFRINIC\s*$/ |
473
|
1 |
1 |
if (defined $query{'cidr'} and $query{'cidr'} =~ /\,/) { } |
500
|
0 |
218 |
if /^\%201/ or /^\% Query rate limit exceeded/ or /^\% Not assigned to LACNIC/ or /\% Permission denied/ |
503
|
3 |
215 |
if (/^\% (\S+) resource:/) |
505
|
0 |
3 |
unless $srv =~ /lacnic|brazil/i |
507
|
84 |
134 |
if /^\%/ or not /\:/ |
511
|
5 |
3 |
if $field eq "country" and $query{'country'} |
512
|
52 |
77 |
$query{lc $field} ? : |
525
|
4 |
0 |
if ($query{'inetnum'}) |
529
|
1 |
3 |
unless ($query{'country'}) |
530
|
1 |
0 |
if ($query{'nserver'} and $query{'nserver'} =~ /\.(\w\w)$/) { } |
|
0 |
0 |
elsif ($query{'descr'} and $query{'descr'} =~ /\s(\w\w)$/) { } |
558
|
0 |
2 |
if defined $query{'remarks'} and $query{'remarks'} =~ /country is really worldwide/ or defined $query{'descr'} and $query{'descr'} =~ /Here for in-addr\.arpa authentication/ |
560
|
0 |
2 |
unless ($query{'inet6num'} or $query{'inetnum'}) |
581
|
0 |
4 |
unless &is_valid_ip($ip) |
582
|
2 |
2 |
unless (scalar @cidr) |
584
|
2 |
0 |
if ref $out |