| line |
true |
false |
branch |
|
39
|
1 |
0 |
if (eval "require $_") |
|
44
|
0 |
1 |
unless $sockclass |
|
52
|
2 |
0 |
if @args and ref $args[0] |
|
53
|
0 |
2 |
if @args |
|
59
|
2 |
0 |
unless ref $self |
|
62
|
0 |
2 |
if ($pcapdir) |
|
63
|
0 |
0 |
unless -d $pcapdir and -w _ |
|
64
|
0 |
0 |
unless eval {
do {
require Net::PcapWriter
}
} |
|
69
|
0 |
2 |
if (my $f = $self->{'mitm_ca'}) |
|
73
|
0 |
0 |
if (-d $cachedir or mkdir $cachedir, 448) |
|
75
|
0 |
0 |
unless -f $f and -r _ and -s _ |
|
77
|
0 |
0 |
unless my $key = PEM_file2key($f) |
|
78
|
0 |
0 |
unless my $cert = PEM_file2cert($f) |
|
80
|
0 |
0 |
if $sn >= $serial |
|
94
|
0 |
0 |
if (not @_) { } |
|
95
|
0 |
0 |
unless $e = $cache_hash->{$id} |
|
104
|
0 |
0 |
if (@_ || !(-f $f) and open my $fh, '>', $f) { } |
|
126
|
2 |
0 |
if ($filter and @$filter) |
|
131
|
0 |
2 |
if (ref $f) |
|
143
|
2 |
2 |
if (eval "require $mod") |
|
148
|
0 |
2 |
unless $found |
|
149
|
1 |
1 |
$args ? : |
|
151
|
0 |
2 |
if @err |
|
169
|
0 |
2 |
if ($self->{'childs'}) |
|
174
|
2 |
0 |
if (not $mitm) { } |
|
|
0 |
0 |
elsif ($self->{'no_check_certificate'}) { } |
|
|
0 |
0 |
elsif ($capath = $self->{'capath'}) { } |
|
182
|
0 |
0 |
if (eval {
do {
require Mozilla::CA
}
}) { } |
|
|
0 |
0 |
elsif (glob '/etc/ssl/certs/*.pem') { } |
|
|
0 |
0 |
elsif (-f '/etc/ssl/certs.pem' and -r _ and -s _) { } |
|
206
|
2 |
0 |
if $self->{'addr'} and ref $self->{'addr'} ne 'ARRAY' |
|
208
|
0 |
2 |
ref $spec ? : |
|
|
0 |
2 |
ref $spec eq 'ARRAY' ? : |
|
213
|
0 |
2 |
if (ref $addr) { } |
|
218
|
0 |
0 |
$addr =~ /:/ ? : |
|
220
|
0 |
2 |
unless $srv = $sockclass->new('LocalAddr', $addr, 'Listen', 10, 'ReuseAddr', 1) |
|
231
|
0 |
0 |
unless my $cl = $srv->accept |
|
233
|
0 |
0 |
if ($self->{'max_connect_per_child'} > 0 and 0 == --$self->{'max_connect_per_child'}) |
|
238
|
0 |
0 |
unless defined(my $pid = fork) |
|
239
|
0 |
0 |
if ($pid) { } |
|
240
|
0 |
0 |
if $App::HTTP_Proxy_IMP::DEBUG |
|
246
|
0 |
0 |
if $App::HTTP_Proxy_IMP::DEBUG |
|
256
|
2 |
0 |
unless $self->{'childs'} |
|
258
|
2 |
0 |
if defined wantarray |
|
264
|
0 |
0 |
unless ref(my $ch = delete $self->{'childs'}) |
|
274
|
0 |
0 |
if $loop |
|
278
|
0 |
0 |
if $self->{'childs'} |
|
283
|
0 |
0 |
$was_debug ? : |
|
292
|
0 |
0 |
if (not @relays) { } |
|
314
|
0 |
0 |
if $App::HTTP_Proxy_IMP::DEBUG |
|
317
|
0 |
0 |
unless my(@pid) = grep({$_;} @{$$self{'childs'};}) |
|
323
|
0 |
0 |
unless my(@pid) = grep({$_;} @{$$self{'childs'};}) |
|
334
|
0 |
0 |
if $_ |
|
336
|
0 |
0 |
unless (defined(my $pid = fork)) |
|
341
|
0 |
0 |
if ($pid == 0) |
|
348
|
0 |
0 |
if $App::HTTP_Proxy_IMP::DEBUG |
|
351
|
0 |
0 |
unless my $pid = waitpid(-1, 0) |
|
352
|
0 |
0 |
if $App::HTTP_Proxy_IMP::DEBUG |
|
353
|
0 |
0 |
unless my $ch = $self->{'childs'} |
|
355
|
0 |
0 |
if $_ == $pid |
|
373
|
0 |
0 |
if ($_[1] eq '-') { } |
|
381
|
0 |
0 |
if ($_[1] eq '-') { } |
|
390
|
0 |
0 |
$_[1] ? : |
|
395
|
0 |
0 |
if ($_[1]) |
|
397
|
0 |
0 |
unless $rx |
|
408
|
0 |
0 |
unless $self->{'addr'} or @addr |
|
417
|
0 |
0 |
if $msg |
|
486
|
0 |
0 |
unless defined(my $fn = fileno $fh) |
|
487
|
0 |
0 |
if ($cb) { } |
|
503
|
0 |
0 |
unless defined(my $fn = fileno $fh) |
|
504
|
0 |
0 |
if ($cb) { } |
|
519
|
0 |
0 |
$interval ? : |