line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Archive::Zip::Parser::Entry::CentralDirectory; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
57
|
|
4
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
56
|
|
5
|
2
|
|
|
2
|
|
10
|
use Data::ParseBinary; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
1125
|
|
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
14
|
use base qw( Archive::Zip::Parser::Entry::Header ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
1011
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub get_version_made_by { |
10
|
2
|
|
|
2
|
1
|
2040
|
my ( $self, $argref ) = @_; |
11
|
|
|
|
|
|
|
|
12
|
2
|
|
|
|
|
12
|
my $version_made_by_struct |
13
|
|
|
|
|
|
|
= Struct( |
14
|
|
|
|
|
|
|
'_version_made_by', |
15
|
|
|
|
|
|
|
Byte('_specification_version'), |
16
|
|
|
|
|
|
|
Byte('_attribute_information'), |
17
|
|
|
|
|
|
|
); |
18
|
2
|
|
|
|
|
133
|
my $parsed_version_made_by_struct = |
19
|
|
|
|
|
|
|
$version_made_by_struct->parse( $self->{'_version_made_by'} ); |
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
|
|
443
|
my %version_made_by; |
22
|
2
|
|
|
|
|
7
|
my $specification_version = |
23
|
|
|
|
|
|
|
$parsed_version_made_by_struct->{'_specification_version'}; |
24
|
2
|
|
|
|
|
18
|
$version_made_by{'specification_version'} = |
25
|
|
|
|
|
|
|
int( $specification_version / 10 ) . '.' |
26
|
|
|
|
|
|
|
. $specification_version % 10; |
27
|
|
|
|
|
|
|
|
28
|
2
|
100
|
|
|
|
10
|
if ( $argref->{'describe'} ) { |
29
|
1
|
|
|
|
|
39
|
my %attribute_information_description_mapping = ( |
30
|
|
|
|
|
|
|
'0' => 'MS-DOX and OS/2 (FAT / VFAT / FAT32 file systems)', |
31
|
|
|
|
|
|
|
'1' => 'Amiga', |
32
|
|
|
|
|
|
|
'2' => 'OpenVMS', |
33
|
|
|
|
|
|
|
'3' => 'UNIX', |
34
|
|
|
|
|
|
|
'4' => 'VM/CMS', |
35
|
|
|
|
|
|
|
'5' => 'Atari ST', |
36
|
|
|
|
|
|
|
'6' => 'OS/2 H.P.F.S.', |
37
|
|
|
|
|
|
|
'7' => 'Macintosh', |
38
|
|
|
|
|
|
|
'8' => 'Z-System', |
39
|
|
|
|
|
|
|
'9' => 'CP/M', |
40
|
|
|
|
|
|
|
'10' => 'Windows NTFS', |
41
|
|
|
|
|
|
|
'11' => 'MVS (OS/390 - Z/OS)', |
42
|
|
|
|
|
|
|
'12' => 'VSE', |
43
|
|
|
|
|
|
|
'13' => 'Acorn RISC', |
44
|
|
|
|
|
|
|
'14' => 'VFAT', |
45
|
|
|
|
|
|
|
'15' => 'alternate MVS', |
46
|
|
|
|
|
|
|
'16' => 'BeOS', |
47
|
|
|
|
|
|
|
'17' => 'Tandem', |
48
|
|
|
|
|
|
|
'18' => 'OS/400', |
49
|
|
|
|
|
|
|
'19' => 'OS/X (Darwin)', |
50
|
|
|
|
|
|
|
); |
51
|
|
|
|
|
|
|
$version_made_by{'attribute_information'} = |
52
|
|
|
|
|
|
|
$attribute_information_description_mapping{ |
53
|
1
|
|
|
|
|
4
|
$parsed_version_made_by_struct->{'_attribute_information'} }; |
54
|
|
|
|
|
|
|
|
55
|
1
|
|
|
|
|
20
|
return %version_made_by; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
1
|
|
|
|
|
14
|
$version_made_by{'attribute_information'} = |
59
|
|
|
|
|
|
|
$parsed_version_made_by_struct->{'_attribute_information'}, |
60
|
|
|
|
|
|
|
return %version_made_by; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub get_file_comment_length { |
64
|
1
|
|
|
1
|
1
|
3
|
my $self = shift; |
65
|
1
|
|
|
|
|
8
|
return $self->{'_file_comment_length'}; |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
sub get_start_disk_number { |
69
|
1
|
|
|
1
|
1
|
3
|
my $self = shift; |
70
|
1
|
|
|
|
|
8
|
return $self->{'_start_disk_number'}; |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
sub get_internal_file_attr { |
74
|
1
|
|
|
1
|
1
|
4
|
my $self = shift; |
75
|
1
|
|
|
|
|
12
|
return unpack( 'H*', pack( 'N', $self->{'_internal_file_attr'} ) ); |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
sub get_external_file_attr { |
79
|
1
|
|
|
1
|
1
|
4
|
my $self = shift; |
80
|
1
|
|
|
|
|
9
|
return unpack( 'H*', pack( 'N', $self->{'_external_file_attr'} ) ); |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
sub get_rel_offset_local_header { |
84
|
1
|
|
|
1
|
1
|
3
|
my $self = shift; |
85
|
1
|
|
|
|
|
10
|
return unpack( 'H*', pack( 'N', $self->{'_rel_offset_local_header'} ) ); |
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
sub get_file_comment { |
89
|
1
|
|
|
1
|
1
|
3
|
my $self = shift; |
90
|
1
|
|
|
|
|
8
|
return $self->{'_file_comment'}; |
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
1; |
94
|
|
|
|
|
|
|
__END__ |