File Coverage

blib/lib/Metabrik/Forensic/Dcfldd.pm
Criterion Covered Total %
statement 9 16 56.2
branch 0 4 0.0
condition n/a
subroutine 3 5 60.0
pod 1 2 50.0
total 13 27 48.1


line stmt bran cond sub pod time code
1             #
2             # $Id$
3             #
4             # forensic::dcfldd Brik
5             #
6             package Metabrik::Forensic::Dcfldd;
7 1     1   542 use strict;
  1         3  
  1         30  
8 1     1   5 use warnings;
  1         2  
  1         30  
9              
10 1     1   5 use base qw(Metabrik::Shell::Command Metabrik::System::Package);
  1         2  
  1         425  
11              
12             # Default attribute values put here will BE inherited by subclasses
13             sub brik_properties {
14             return {
15 0     0 1   revision => '$Revision$',
16             tags => [ qw(unstable) ],
17             author => 'GomoR ',
18             license => 'http://opensource.org/licenses/BSD-3-Clause',
19             commands => {
20             install => [ ], # Inherited
21             dump => [ qw(source destination) ],
22             },
23             require_binaries => {
24             'dcfldd' => [ ],
25             },
26             need_packages => {
27             ubuntu => [ qw(dcfldd) ],
28             debian => [ qw(dcfldd) ],
29             kali => [ qw(dcfldd) ],
30             },
31             };
32             }
33              
34             sub dump {
35 0     0 0   my $self = shift;
36 0           my ($source, $dest) = @_;
37              
38 0 0         $self->brik_help_run_undef_arg('dump', $source) or return;
39 0 0         $self->brik_help_run_undef_arg('dump', $dest) or return;
40              
41 0           my $cmd = "dcfldd if=$source of=$dest hash=hash512 hashlog=$dest.hs";
42              
43 0           return $self->system($cmd);
44             }
45              
46             1;
47              
48             __END__