line |
true |
false |
branch |
52
|
0 |
10 |
if $depth > 10 |
53
|
1 |
9 |
if $self->_bad_host($host) |
56
|
4 |
5 |
if $host =~ /^\d+\.\d+\.\d+\.\d+$/ |
58
|
0 |
5 |
unless my $sock = $res->bgsend($host) |
63
|
3 |
2 |
unless ($sock and $sock eq 'MOCK') |
67
|
0 |
3 |
unless $nf |
70
|
0 |
5 |
unless my $packet = $res->bgread($sock) |
77
|
4 |
1 |
if ($rr->type eq 'A') { } |
|
1 |
0 |
elsif ($rr->type eq 'CNAME') { } |
78
|
1 |
3 |
if $self->_bad_host($rr->address) |
87
|
3 |
1 |
if @addr |
88
|
0 |
1 |
unless $cname |
97
|
0 |
72 |
unless $self->{$list_name} |
98
|
0 |
103 |
if (ref $rule eq 'CODE') { } |
|
34 |
69 |
elsif (ref $rule) { } |
99
|
0 |
0 |
if &$rule($host) |
102
|
3 |
31 |
if $host =~ /$rule/ |
104
|
9 |
60 |
if $host eq $rule |
113
|
8 |
30 |
if $self->_host_list_match('whitelisted_hosts', $host) |
114
|
3 |
27 |
if $self->_host_list_match('blocked_hosts', $host) |
115
|
1 |
26 |
if $host =~ /^localhost$/i or $host =~ /\s/i |
126
|
0 |
26 |
if @parts > 4 |
131
|
10 |
49 |
unless /^\d+$/ or /^0x[a-f\d]+$/ |
133
|
14 |
35 |
if /^0/ |
137
|
0 |
16 |
if $overflow_flag |
141
|
2 |
14 |
if (@parts == 1) { } |
|
4 |
10 |
elsif (@parts == 2) { } |
|
1 |
9 |
elsif (@parts == 3) { } |
|
9 |
0 |
elsif (@parts == 4) { } |
143
|
0 |
2 |
if $parts[0] > 4294967295 |
148
|
0 |
4 |
if $parts[0] > 255 or $parts[1] > 16777215 |
154
|
0 |
1 |
if $parts[0] > 255 or $parts[1] > 255 or $parts[2] > 65535 |
161
|
0 |
9 |
if $parts[0] > 255 or $parts[1] > 255 or $parts[2] > 255 or $parts[3] > 255 |
172
|
1 |
4 |
if ($haddr & 4278190080) == 0 or ($haddr & 4278190080) == 167772160 or ($haddr & 4278190080) == 2130706432 or ($haddr & 4293918720) == 2886729728 or ($haddr & 4294901760) == 2851995648 or ($haddr & 4294901760) == 3232235520 or ($haddr & 4294967040) == 3221225984 or ($haddr & 4294967040) == 3227017984 or $haddr == 4294967295 or ($haddr & 4026531840) == 3758096384 |
187
|
1 |
3 |
if $self->_host_list_match('blocked_hosts', $can_ip) |
200
|
4 |
20 |
$first_res ? : |
203
|
15 |
9 |
if ($self->_bad_host($host)) |
213
|
0 |
9 |
if (my $pp = $self->{'paranoid_proxy'}) |
234
|
0 |
9 |
unless $method |
236
|
0 |
9 |
unless $url |
238
|
0 |
9 |
unless $url->scheme |
240
|
0 |
9 |
if $self->_need_proxy($url) |
246
|
0 |
9 |
unless $scheme eq 'http' or $scheme eq 'https' |
257
|
0 |
9 |
if ($x = $self->protocols_allowed) { } |
|
0 |
9 |
elsif ($x = $self->protocols_forbidden) { } |
258
|
0 |
0 |
if (grep((lc $_ eq $scheme), @$x)) { } |
268
|
0 |
0 |
if (grep((lc $_ eq $scheme), @$x)) { } |
280
|
9 |
0 |
unless ($protocol) |
283
|
0 |
9 |
if ($@) |
289
|
9 |
0 |
$scheme eq 'http' ? : |
290
|
0 |
9 |
if ($@) |
293
|
0 |
0 |
if ($scheme eq 'https') |
311
|
9 |
0 |
if ($use_eval) { } |
318
|
2 |
7 |
if ($error) |
332
|
0 |
9 |
if $cookie_jar |
334
|
9 |
0 |
if $self->can('run_handlers') |
342
|
1 |
0 |
if (@_) |
347
|
0 |
0 |
unless $self->{'blocked_hosts'} |
354
|
1 |
0 |
if (@_) |
359
|
0 |
0 |
unless $self->{'whitelisted_hosts'} |
366
|
8 |
11 |
if (@_) |
370
|
0 |
8 |
unless UNIVERSAL::isa($self->{'resolver'}, 'Net::DNS::Resolver') |
380
|
0 |
9 |
unless ref $url |
383
|
0 |
9 |
if (my $proxy = $self->{'proxy'}{$scheme}) |
384
|
0 |
0 |
if ($self->{'no_proxy'} and @{$self->{'no_proxy'};}) |
385
|
0 |
0 |
if (my $host = eval {
do {
$url->host
}
}) |
387
|
0 |
0 |
if ($host =~ /\Q$domain\E$/) |
406
|
9 |
0 |
if (defined $request) { } |
407
|
9 |
0 |
if (ref $request) { } |
408
|
0 |
9 |
if ref $request eq 'ARRAY' or ref $request eq 'HASH' or not $request->can('method') or not $request->can('uri') |