Branch Coverage

blib/lib/Metabrik/Network/Arp.pm
Criterion Covered Total %
branch 0 78 0.0


line true false branch
98 0 0 unless ($self->brik_has_binary("arpspoof"))
103 0 0 unless $self->brik_help_run_undef_arg("half_poison", $gateway)
104 0 0 unless $self->brik_help_run_undef_arg("half_poison", $device)
107 0 0 if defined $victim
110 0 0 unless my $sc = "Metabrik::Shell::Command"->new_from_brik_init($self)
111 0 0 unless my $sp = "Metabrik::System::Process"->new_from_brik_init($self)
124 0 0 unless ($self->brik_has_binary("arpspoof"))
129 0 0 unless $self->brik_help_run_undef_arg("full_poison", $gateway)
130 0 0 unless $self->brik_help_run_undef_arg("full_poison", $device)
133 0 0 if defined $victim
136 0 0 unless my $sc = "Metabrik::Shell::Command"->new_from_brik_init($self)
137 0 0 unless my $sp = "Metabrik::System::Process"->new_from_brik_init($self)
151 0 0 unless $self->brik_help_run_undef_arg("mac2eui64", $mac)
153 0 0 unless ($mac =~ /^[0-9a-z]{2}:[0-9a-z]{2}:[0-9a-z]{2}:[0-9a-z]{2}:[0-9a-z]{2}:[0-9a-z]{2}$/i)
181 0 0 unless $self->brik_help_run_must_be_root("scan")
184 0 0 unless $self->brik_help_run_undef_arg("scan", $device)
186 0 0 unless my $interface = $self->get_device_info($device)
189 0 0 unless $self->brik_help_run_undef_arg("scan", $subnet)
191 0 0 unless my $arp_cache = $self->cache
202 0 0 unless my $na = "Metabrik::Network::Address"->new_from_brik_init($self)
204 0 0 unless my $ip_list = $na->ipv4_list($subnet)
210 0 0 if (exists $interface->{'ipv4'} and $ip eq $interface->{'ipv4'})
214 0 0 if (exists $scan_arp_cache->{$ip}) { }
224 0 0 unless my $nw = "Metabrik::Network::Write"->new_from_brik_init($self)
226 0 0 unless my $write = $nw->open(2, $interface->{'device'})
228 0 0 unless my $nr = "Metabrik::Network::Read"->new_from_brik_init($self)
233 0 0 unless my $read = $nr->open(2, $interface->{'device'}, $filter)
242 0 0 unless (exists $reply_cache->{$dst_ip})
243 0 0 unless $nw->send($r->raw)
254 0 0 if ($r->ref->{'ARP'}->opCode != &Net::Frame::Layer::ARP::NF_ARP_OPCODE_REPLY)
259 0 0 unless (exists $reply_cache->{$src_ip})
293 0 0 unless my $scan = $self->scan($subnet, $device)
295 0 0 unless (defined $ipv4)
306 0 0 unless my $scan = $self->scan($subnet, $device)
308 0 0 unless (defined $ipv6)
319 0 0 unless my $scan = $self->scan($subnet, $device)
321 0 0 unless (defined $mac)
332 0 0 if (defined $pidfile)
333 0 0 unless my $sp = "Metabrik::System::Process"->new_from_brik_init($self)