| line |
true |
false |
branch |
|
145
|
0 |
0 |
if (not defined $opts{'spans'}) { } |
|
|
0 |
0 |
elsif (ref $opts{'spans'} ne 'ARRAY') { } |
|
182
|
0 |
0 |
if (defined $opts{$alert_type}) |
|
183
|
0 |
0 |
if (ref $opts{$alert_type} ne "") |
|
186
|
0 |
0 |
if ($opts{$alert_type} ne 0 and $opts{$alert_type} ne 1 and $opts{$alert_type} ne 2 and $opts{$alert_type} ne 3) |
|
196
|
0 |
0 |
if (defined $opts{$alert_type . '_to_ignore'}) |
|
197
|
0 |
0 |
if (ref $opts{$alert_type . '_to_ignore'} ne "ARRAY") |
|
210
|
0 |
0 |
if (defined $opts{'span_names'} and ref $opts{'span_names'} eq 'ARRAY') { } |
|
|
0 |
0 |
elsif (defined $opts{'span_names'} and ref $opts{'span_names'} ne 'ARRAY') { } |
|
217
|
0 |
0 |
if (defined $opts{'packets'} and &looks_like_number($opts{'packets'})) { } |
|
|
0 |
0 |
elsif (defined $opts{'packets'} and not &looks_like_number($opts{'packets'})) { } |
|
218
|
0 |
0 |
if ($opts{'packets'} < 1) |
|
227
|
0 |
0 |
if (defined $opts{'ports'} and ref $opts{'ports'} ne 'ARRAY') { } |
|
|
0 |
0 |
elsif (defined $opts{'ports'} and ref $opts{'ports'} eq 'ARRAY' and defined $opts{'ports'}[0]) { } |
|
231
|
0 |
0 |
if (ref $port ne '') { } |
|
|
0 |
0 |
elsif (not &looks_like_number($port)) { } |
|
246
|
0 |
0 |
if (defined $opts{'additional_ports'} and ref $opts{'additional_ports'} ne 'ARRAY') { } |
|
|
0 |
0 |
elsif (defined $opts{'additional_ports'} and ref $opts{'additional_ports'} eq 'ARRAY' and defined $opts{'additional_ports'}[0]) { } |
|
253
|
0 |
0 |
if (ref $port ne '') { } |
|
|
0 |
0 |
elsif (not &looks_like_number($port)) { } |
|
264
|
0 |
0 |
if (defined $opts{'duration'} and &looks_like_number($opts{'duration'})) |
|
271
|
0 |
0 |
if (ref $span ne "ARRAY") |
|
275
|
0 |
0 |
if (defined $span->[0]) |
|
277
|
0 |
0 |
if (ref $interface ne '') { } |
|
|
0 |
0 |
elsif (not defined $interfaces->{$interface}) { } |
|
292
|
0 |
0 |
if (defined $opts{'ignore_IPs'}) |
|
293
|
0 |
0 |
if (ref $opts{'ignore_IPs'} ne "ARRAY") |
|
298
|
0 |
0 |
unless ($ip =~ /^$Check::NetworkSpans::IPv6_re$/ or $ip =~ /^$Check::NetworkSpans::IPv4_re$/) |
|
305
|
0 |
0 |
if ($opts{'auto_ignore'}) |
|
307
|
0 |
0 |
if (defined $interfaces->{$interface}{'ip'} and $interfaces->{$interface}{'ip'} =~ /^$Check::NetworkSpans::IPv6_re$/ || $interfaces->{$interface}{'ip'} =~ /^$Check::NetworkSpans::IPv4_re$/) |
|
353
|
0 |
0 |
if ($self->{'ignore_IPs'}[0]) |
|
354
|
0 |
0 |
if ($self->{'debug'}) |
|
359
|
0 |
0 |
if ($ignore_IPs_int > 0) |
|
367
|
0 |
0 |
if ($ignore_IPs_int > 0) { } |
|
372
|
0 |
0 |
if ($self->{'debug'}) |
|
392
|
0 |
0 |
if ($self->{'debug'}) { } |
|
406
|
0 |
0 |
if ($self->{'debug'}) |
|
426
|
0 |
0 |
if ($self->{'debug'}) |
|
429
|
0 |
0 |
if (-f $span_name . '.pcap') { } |
|
431
|
0 |
0 |
if ($self->{'debug'}) |
|
435
|
0 |
0 |
if ($self->{'debug'}) |
|
441
|
0 |
0 |
if ($@) |
|
442
|
0 |
0 |
if ($self->{'debug'}) |
|
451
|
0 |
0 |
if ($self->{'debug'}) |
|
459
|
0 |
0 |
if ($self->{'debug'}) |
|
471
|
0 |
0 |
if ($self->{'debug'}) |
|
476
|
0 |
0 |
if (defined $span_packets->{$span_name} and ref $span_packets->{$span_name} eq 'ARRAY') { } |
|
482
|
0 |
0 |
if (defined $packet->{'_source'} and defined $packet->{'_source'}{'layers'} and defined $packet->{'_source'}{'layers'}{'eth'}) |
|
496
|
0 |
0 |
if (defined $packet->{'_source'}{'layers'}{'udp'}) |
|
498
|
0 |
0 |
if (defined $packet->{'_source'}{'layers'}{'udp'}{'udp.dstport'}) { } |
|
503
|
0 |
0 |
if (defined $packet->{'_source'}{'layers'}{'udp'}{'udp.srcport'}) { } |
|
509
|
0 |
0 |
if (defined $packet->{'_source'}{'layers'}{'tcp'}) |
|
511
|
0 |
0 |
if (defined $packet->{'_source'}{'layers'}{'tcp'}{'tcp.dstport'}) { } |
|
516
|
0 |
0 |
if (defined $packet->{'_source'}{'layers'}{'tcp'}{'tcp.srcport'}) { } |
|
522
|
0 |
0 |
if (defined $packet->{'_source'}{'layers'}{'ip'} and defined $packet->{'_source'}{'layers'}{'ip'}{'ip.src'}) { } |
|
529
|
0 |
0 |
if (defined $packet->{'_source'}{'layers'}{'ip'} and defined $packet->{'_source'}{'layers'}{'ip'}{'ip.dst'}) { } |
|
538
|
0 |
0 |
if ($add_it and defined $self->{'ports_check'}{$dst_port}) |
|
542
|
0 |
0 |
if ($add_it and defined $self->{'ports_check'}{$src_port}) |
|
547
|
0 |
0 |
if ($add_it) |
|
563
|
0 |
0 |
if ($self->{'debug'}) |
|
569
|
0 |
0 |
if ($self->{'debug'}) |
|
576
|
0 |
0 |
if (defined $packet->{'_source'}{'layers'}{'ip'} and defined $packet->{'_source'}{'layers'}{'ip'}{'ip.dst'} and defined $packet->{'_source'}{'layers'}{'ip'}{'ip.src'} and defined $packet->{'_source'}{'layers'}{'tcp'} && defined $packet->{'_source'}{'layers'}{'tcp'}{'tcp.dstport'} && defined $packet->{'_source'}{'layers'}{'tcp'}{'tcp.srcport'} || defined $packet->{'_source'}{'layers'}{'udp'} && defined $packet->{'_source'}{'layers'}{'udp'}{'udp.dstport'} && defined $packet->{'_source'}{'layers'}{'udp'}{'udp.srcport'}) |
|
601
|
0 |
0 |
if (defined $packet->{'_source'}{'layers'}{'udp'}) |
|
603
|
0 |
0 |
if (defined $packet->{'_source'}{'layers'}{'udp'}{'udp.dstport'}) |
|
606
|
0 |
0 |
if (defined $packet->{'_source'}{'layers'}{'udp'}{'udp.srcport'}) |
|
610
|
0 |
0 |
if (defined $packet->{'_source'}{'layers'}{'tcp'}) |
|
612
|
0 |
0 |
if (defined $packet->{'_source'}{'layers'}{'tcp'}{'tcp.dstport'}) |
|
615
|
0 |
0 |
if (defined $packet->{'_source'}{'layers'}{'tcp'}{'tcp.srcport'}) |
|
623
|
0 |
0 |
if (defined $connections->{$span_name}{$reverse_packet_name}) |
|
627
|
0 |
0 |
if ($found_it) |
|
634
|
0 |
0 |
if ($count < 1) { } |
|
636
|
0 |
0 |
if ($self->{'no_streams'} == 1) { } |
|
|
0 |
0 |
elsif ($self->{'no_streams'} == 2) { } |
|
|
0 |
0 |
elsif ($self->{'no_streams'} == 3) { } |
|
646
|
0 |
0 |
if ($self->{'no_streams_to_ignore'}{$self->get_span_name_for_check($span_int)} or $self->{'no_streams_to_ignore'}{$span_name}) { } |
|
663
|
0 |
0 |
if ($self->{'debug'}) |
|
669
|
0 |
0 |
if ($self->{'debug'}) |
|
673
|
0 |
0 |
if ($port_connections_per_span->{$span_name} > 0) |
|
676
|
0 |
0 |
if (not $ports_found) { } |
|
678
|
0 |
0 |
if ($self->{'port_check'} == 1) { } |
|
|
0 |
0 |
elsif ($self->{'port_check'} == 2) { } |
|
|
0 |
0 |
elsif ($self->{'port_check'} == 3) { } |
|
691
|
0 |
0 |
if ($self->{'port_check_to_ignore'}{$self->get_span_name_for_check($span_int)} or $self->{'port_check_to_ignore'}{$span_name}) { } |
|
715
|
0 |
0 |
if ($span_packet_count->{$span_name} == 0) |
|
717
|
0 |
0 |
if ($self->{'no_packets'} == 1) { } |
|
|
0 |
0 |
elsif ($self->{'no_packets'} == 2) { } |
|
|
0 |
0 |
elsif ($self->{'no_packets'} == 3) { } |
|
725
|
0 |
0 |
if ($self->{'no_streams_to_ignore'}{$self->get_span_name_for_check($span_int)} or $self->{'no_packets_to_ignore'}{$span_name}) { } |
|
740
|
0 |
0 |
if ($span_packet_count->{$span_name} < $self->{'packets'}) { } |
|
742
|
0 |
0 |
if ($self->{'low_packets'} == 1) { } |
|
|
0 |
0 |
elsif ($self->{'low_packets'} == 2) { } |
|
|
0 |
0 |
elsif ($self->{'low_packets'} == 3) { } |
|
756
|
0 |
0 |
if ($self->{'low_packets_to_ignore'}{$self->get_span_name_for_check($span_int)} or $self->{'low_packets_to_ignore'}{$span_name}) { } |
|
773
|
0 |
0 |
if ($#{$$self{'interfaces_missing'};} >= 0 and $self->{'missing_interface'} > 0) { } |
|
777
|
0 |
0 |
if ($self->{'missing_interface'} == 1) { } |
|
|
0 |
0 |
elsif ($self->{'missing_interface'} == 2) { } |
|
|
0 |
0 |
elsif ($self->{'missing_interface'} == 3) { } |
|
789
|
0 |
0 |
if (defined $self->{'missing_interface_to_ignore'}{$interface}) { } |
|
797
|
0 |
0 |
if (defined $ignored_interfaces[0]) |
|
803
|
0 |
0 |
if (defined $ignored_interfaces[0]) |
|
813
|
0 |
0 |
if (defined $results->{'errors'}[0]) { } |
|
|
0 |
0 |
elsif (defined $results->{'alerts'}[0]) { } |
|
|
0 |
0 |
elsif (defined $results->{'warnings'}[0]) { } |
|
834
|
0 |
0 |
unless (defined $span_int) |
|
838
|
0 |
0 |
unless (defined $self->{'spans'}[$span_int]) |
|
843
|
0 |
0 |
if (defined $self->{'span_names'}[$span_int] and $self->{'span_names'}[$span_int] ne "") |
|
860
|
0 |
0 |
unless (defined $span_int) |
|
864
|
0 |
0 |
unless (defined $self->{'spans'}[$span_int]) |
|
868
|
0 |
0 |
if (defined $self->{'span_names'}[$span_int] and $self->{'span_names'}[$span_int] ne "") |