Branch Coverage

lib/SMB/Auth.pm
Criterion Covered Total %
branch 85 120 70.8


line true false branch
107 0 0 unless ref $user_passwords eq 'HASH'
178 0 0 unless open PASSWD, "<$filename"
180 0 0 unless close PASSWD
187 0 0 ($hash_str || '') =~ /^[0-9a-f]{64}$/ ? :
189 0 0 $username && $username =~ /^\w[\w.+-]*$/ && @hash_bytes ? :
207 0 1 unless $hmac
212 0 1 ref $password eq 'ARRAY' ? :
218 0 1 unless $hmac eq &hmac_md5($self->server_challenge . $client_data, $ntlmv2_hash)
231 6 35 if ($len >= 128)
243 4 37 if ($tag == 4) { }
7 30 elsif ($tag == 6) { }
2 28 elsif ($tag == 10) { }
12 16 elsif ($tag == 48 or $tag == 49 or $tag == 96) { }
16 0 elsif ($tag >= 160 and $tag <= 163) { }
250 7 51 if (0 == $idx++) { }
4 47 elsif ($_ >= 128) { }
256 0 2 unless $len == 1
276 4 37 if ($tag == 4) { }
7 30 elsif ($tag == 6) { }
2 28 elsif ($tag == 10) { }
12 16 elsif ($tag == 48 or $tag == 49 or $tag == 96) { }
16 0 elsif ($tag >= 160 and $tag <= 163) { }
282 0 47 $_ >= 268435456 ? :
0 47 $_ >= 2097152 ? :
0 47 $_ >= 16384 ? :
4 43 $_ >= 128 ? :
7 47 2 == $idx ? :
7 54 0 == $idx++ ? :
309 6 35 @sub_lens ? :
320 0 6 unless @bytes > 2
324 0 6 unless $struct
326 2 4 if (not defined $self->ntlmssp_supported or $options{'is_initial'})
328 0 2 unless ref $value eq 'ARRAY' and shift @$value == 48
331 2 0 if $_->[0] == 6 and $_->[1] eq '1.3.6.1.4.1.311.2.2.10'
338 3 1 ref $value eq 'ARRAY' && shift @$value == 4 ? :
342 3 1 unless (defined $self->client_challenge)
343 0 3 unless $ntlmssp_bytes
346 0 3 unless $parser->bytes(8) eq "NTLMSSP\000"
350 1 3 if (not defined $self->client_host) { }
1 2 elsif (not defined $self->server_challenge) { }
1 1 elsif (not defined $self->client_challenge) { }
1 0 elsif (not defined $self->auth_completed) { }
351 0 1 unless $parser->uint32 == 1
361 0 1 unless $parser->uint32 == 2
370 1 5 if $itemtype == 7
373 1 4 if $itemtype == 1
375 1 4 if $itemtype == 2
377 1 4 if $itemtype == 3
379 1 4 if $itemtype == 4
383 0 1 unless $parser->uint32 == 3
403 0 1 unless ref $value eq 'ARRAY' and shift @$value == 10
405 1 0 shift @$value == 0 ? :
419 2 4 if (not defined $self->ntlmssp_supported or $options{'is_initial'})
436 1 3 if (not defined $self->client_host) { }
1 2 elsif (not defined $self->server_challenge) { }
1 1 elsif (not defined $self->client_challenge) { }
1 0 elsif (not defined $self->auth_completed) { }
596 1 0 $self->is_user_authenticated ? :
598 1 0 if $self->auth_completed
606 0 6 unless $struct