line |
true |
false |
branch |
54
|
0 |
27 |
unless ref $self |
55
|
0 |
27 |
unless $self->{'QUERY'} |
79
|
17 |
2 |
if ref $host |
96
|
19 |
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
|
17 |
0 |
if (my $sock = &whois_connect($server_ref)) |
236
|
17 |
0 |
$query_code && ref $query_code eq 'CODE' ? : |
249
|
324 |
1 |
if defined $query{$qkey} |
251
|
2 |
323 |
if $qkey =~ /abuse/i and $query{$qkey} =~ /\@/ |
253
|
13 |
2 |
unless ($query{'abuse'}) |
254
|
9 |
4 |
if ($query{'fullinfo'} and $query{'fullinfo'} =~ /(\S*abuse\S*\@\S+)/m) { } |
|
1 |
3 |
elsif ($query{'email'} or $query{'e-mail'} or $query{'orgtechemail'}) { } |
262
|
3 |
12 |
unless (ref $query{'cidr'}) |
263
|
0 |
3 |
if (defined $query{'cidr'} and $query{'cidr'} =~ /\,/) { } |
281
|
0 |
63 |
if $params{'-debug'} |
286
|
2 |
15 |
unless keys %query |
288
|
0 |
15 |
if ($query{'permission'} and $query{'permission'} eq "denied") |
311
|
0 |
163 |
if /ERROR:201/ |
312
|
80 |
83 |
if /^(\%|\#)/ or not /\:/ |
316
|
23 |
60 |
$query{lc $field} ? : |
326
|
0 |
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 |
4 |
unless defined $query{'country'} |
364
|
0 |
189 |
if /^\%201/ |
365
|
32 |
157 |
if (/^\%/) |
370
|
0 |
32 |
if (/^\%.*0\.0\.0\.0\s+/) |
377
|
0 |
157 |
if $skip_block |
378
|
43 |
114 |
unless /\:/ |
382
|
6 |
108 |
if ($field =~ /^inet6?num$/) |
383
|
0 |
6 |
if $value =~ /0\.0\.0\.0\s+/ |
389
|
0 |
114 |
if $lc_field eq "country" and defined $query{$lc_field} |
390
|
30 |
84 |
$query{$lc_field} ? : |
394
|
3 |
14 |
unless defined $query{$_} |
402
|
0 |
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 |
255 |
if /^\#201/ |
437
|
0 |
255 |
if /no match found for/i |
438
|
115 |
140 |
if /^\#/ or not /\:/ |
442
|
3 |
137 |
if ($field eq "OrgName" or $field eq "CustName") |
448
|
26 |
114 |
$query{lc $field} ? : |
452
|
0 |
3 |
if defined $query{'custname'} |
455
|
25 |
14 |
unless defined $query{$_} |
465
|
1 |
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 |
172 |
if /^\%201/ or /^\% Query rate limit exceeded/ or /^\% Not assigned to LACNIC/ or /\% Permission denied/ |
503
|
2 |
170 |
if (/^\% (\S+) resource:/) |
505
|
0 |
2 |
unless $srv =~ /lacnic|brazil/i |
507
|
63 |
109 |
if /^\%/ or not /\:/ |
511
|
4 |
2 |
if $field eq "country" and $query{'country'} |
512
|
46 |
59 |
$query{lc $field} ? : |
525
|
3 |
0 |
if ($query{'inetnum'}) |
529
|
1 |
2 |
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 |