Branch Coverage

blib/lib/Metabrik/Forensic/Pcap.pm
Criterion Covered Total %
branch 0 58 0.0


line true false branch
79 0 0 unless $self->brik_help_run_undef_arg("pcap_to_elasticsearch", $file)
80 0 0 unless $self->brik_help_run_file_not_found("pcap_to_elasticsearch", $file)
82 0 0 unless my $fp = "Metabrik::File::Pcap"->new_from_brik_init($self)
83 0 0 unless $fp->open($file, "read", $filter)
85 0 0 unless my $tu = "Metabrik::Time::Universal"->new_from_brik_init($self)
91 0 0 unless $self->create_client
94 0 0 if ($self->is_index_exists($index))
96 0 0 unless (defined $count_before)
103 0 0 unless $self->open_bulk_mode($index, $type)
114 0 0 unless (defined $h)
119 0 0 if @$h == 0
125 0 0 unless (defined $simple)
146 0 0 if ($skip_payload) { }
153 0 0 if ($layer->layer eq "TCP")
156 0 0 if (defined $h{'payload'} and not $h{'payload'} =~ /$print_re/)
161 0 0 if ($layer->layer eq 'UDP') { }
0 0 elsif ($layer->layer eq 'IPv4') { }
163 0 0 if (defined $h{'payload'} and not $h{'payload'} =~ /$print_re/)
179 0 0 unless (defined $r)
193 0 0 unless my $count_current = $self->count($index, $type)
198 0 0 $count_current - $count_before == $read ? :
199 0 0 if ($complete) { }
206 0 0 if (not $complete) { }
221 0 0 unless $self->brik_help_run_undef_arg("show_sessions", $ip_address)
222 0 0 unless $self->brik_help_run_undef_arg("show_sessions", $port)
225 0 0 if ($protocol ne "tcp" and $protocol ne "udp")
243 0 0 if ($protocol eq 'tcp') { }
273 0 0 unless my $r = $self->query($q)
274 0 0 unless my $hits = $self->get_query_result_hits($r)