Forensic/Dcfldd.pm

filter: Statementstmt 100% 9 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 12 / 12 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« File/Xml.pm ↑ Summary Forensic/Pcap.pm »
1 #
2 # $Id$
3 #
4 # forensic::dcfldd Brik
5 #
6 package Metabrik::Forensic::Dcfldd;
7 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 ▶use base qw(Metabrik::Shell::Command Metabrik::System::Package);
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 # Default attribute values put here will BE inherited by subclasses
13 sub brik_properties {
14 return {
15 revision => '$Revision$',
16 tags => [ qw(unstable) ],
17 author => 'GomoR <GomoR[at]metabrik.org>',
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 my $self = shift;
36 my ($source, $dest) = @_;
37  
38 $self->brik_help_run_undef_arg('dump', $source) or return;
39 $self->brik_help_run_undef_arg('dump', $dest) or return;
40  
41 my $cmd = "dcfldd if=$source of=$dest hash=hash512 hashlog=$dest.hs";
42  
43 return $self->system($cmd);
44 }
45  
46 1;
47  
48 __END__
« File/Xml.pm ↑ Summary Forensic/Pcap.pm »