1ZIPDETAILS(1) User Contributed Perl Documentation ZIPDETAILS(1)
2
3
4
6 zipdetails - display the internal structure of zip files
7
9 zipdetails [-v][--scan] zipfile.zip
10 zipdetails -h
11 zipdetails --version
12
14 Zipdetails displays information about the internal record structure of
15 zip files. It is not concerned with displaying any details of the
16 compressed data stored in the zip file.
17
18 The program assumes prior understanding of the internal structure of a
19 Zip file. You should have a copy of the Zip APPNOTE file at hand to
20 help understand the output from this program ("SEE ALSO" for details).
21
22 Default Behaviour
23 By default the program expects to be given a well-formed zip file. It
24 will navigate the Zip file by first parsing the zip central directory
25 at the end of the file. If that is found, it will then walk through
26 the zip records starting at the beginning of the file. Any badly formed
27 zip data structures encountered are likely to terminate the program.
28
29 If the program finds any structural problems with the zip file it will
30 print a summary at the end of the output report. The set of error cases
31 reported is very much a work in progress, so don't rely on this feature
32 to find all the possible errors in a zip file. If you have suggestions
33 for use-cases where this could be enhanced please consider creating an
34 enhancement request (see "SUPPORT").
35
36 Scan-Mode
37 If you do have a potentially corrupt zip file, particulatly where the
38 central directory at the end of the file is absent/incomplete, you can
39 try usng the "--scan" option to search for zip records that are still
40 present.
41
42 When Scan-mode is enabled, the program will walk the zip file from the
43 start blindly looking for the 4-byte signatures that preceed each of
44 the zip data structures. If it finds any of the recognised signatures
45 it will attempt to dump the associated zip record. For very large zip
46 files, this operation can take a long time to run.
47
48 Note that the 4-byte signatures used in zip files can sometimes match
49 with random data stored in the zip file, so care is needed interpreting
50 the results.
51
52 OPTIONS
53 -h Display help
54
55 --scan
56 Walk the zip file loking for possible zip records. Can be error-
57 prone. See "Scan-Mode"
58
59 -v Enable Verbose mode. See "Verbose Output".
60
61 --version
62 Display version number of the program and exit.
63
64 Default Output
65 By default zipdetails will output the details of the zip file in three
66 columns.
67
68 Column 1
69 This contains the offset from the start of the file in hex.
70
71 Column 2
72 This contains a textual description of the field.
73
74 Column 3
75 If the field contains a numeric value it will be displayed in hex.
76 Zip stores most numbers in little-endian format - the value
77 displayed will have the little-endian encoding removed.
78
79 Next, is an optional description of what the value means.
80
81 Verbose Output
82 If the "-v" option is present, column 1 is expanded to include
83
84 • The offset from the start of the file in hex.
85
86 • The length of the field in hex.
87
88 • A hex dump of the bytes in field in the order they are stored in
89 the zip file.
90
92 The following zip file features are not supported by this program:
93
94 • Multi-part archives.
95
96 • The strong encryption features defined in the "APPNOTE" document.
97
99 Error handling is a work in progress. If the program encounters a
100 problem reading a zip file it is likely to terminate with an unhelpful
101 error message.
102
104 General feedback/questions/bug reports should be sent to
105 <https://github.com/pmqs/IO-Compress/issues> (preferred) or
106 <https://rt.cpan.org/Public/Dist/Display.html?Name=IO-Compress>.
107
109 The primary reference for Zip files is the "APPNOTE" document available
110 at <http://www.pkware.com/documents/casestudies/APPNOTE.TXT>.
111
112 An alternative reference is the Info-Zip appnote. This is available
113 from <ftp://ftp.info-zip.org/pub/infozip/doc/>
114
115 The "zipinfo" program that comes with the info-zip distribution
116 (<http://www.info-zip.org/>) can also display details of the structure
117 of a zip file.
118
119 See also Archive::Zip::SimpleZip, IO::Compress::Zip,
120 IO::Uncompress::Unzip.
121
123 Paul Marquess pmqs@cpan.org.
124
126 Copyright (c) 2011-2021 Paul Marquess. All rights reserved.
127
128 This program is free software; you can redistribute it and/or modify it
129 under the same terms as Perl itself.
130
131
132
133perl v5.32.1 2021-03-01 ZIPDETAILS(1)