How do i display the internal structure of zip files



  • Man page for zipdetails. Part of Perl documentation.

    $ zipdetails foo.zip
    
    0000 LOCAL HEADER #1       04034B50
    0004 Extract Zip Spec      0A '1.0'
    0005 Extract OS            00 'MS-DOS'
    0006 General Purpose Flag  0000
    0008 Compression Method    0000 'Stored'
    000A Last Mod Time         4E4491E1 'Mon Feb  4 18:15:02 2019'
    000E CRC                   00000000
    0012 Compressed Length     00000000
    0016 Uncompressed Length   00000000
    001A Filename Length       0004
    001C Extra Length          001C
    001E Filename              'foo/'
    0022 Extra ID #0001        5455 'UT: Extended Timestamp'
    0024   Length              0009
    0026   Flags               '03 mod access'
    0027   Mod Time            5C588126 'Mon Feb  4 18:15:02 2019'
    002B   Access Time         5C5881D4 'Mon Feb  4 18:17:56 2019'
    002F Extra ID #0002        7875 'ux: Unix Extra Type 3'
    0031   Length              000B
    0033   Version             01
    0034   UID Size            04
    0035   UID                 000003E8
    0039   GID Size            04
    003A   GID                 000003E8
    
    003E LOCAL HEADER #2       04034B50
    0042 Extract Zip Spec      0A '1.0'
    0043 Extract OS            00 'MS-DOS'
    0044 General Purpose Flag  0000
    0046 Compression Method    0000 'Stored'
    0048 Last Mod Time         4E4491E1 'Mon Feb  4 18:15:02 2019'
    004C CRC                   00000000
    0050 Compressed Length     00000000
    0054 Uncompressed Length   00000000
    0058 Filename Length       0009
    005A Extra Length          001C
    005C Filename              'foo/fileA'
    0065 Extra ID #0001        5455 'UT: Extended Timestamp'
    0067   Length              0009
    0069   Flags               '03 mod access'
    006A   Mod Time            5C588126 'Mon Feb  4 18:15:02 2019'
    006E   Access Time         5C588126 'Mon Feb  4 18:15:02 2019'
    0072 Extra ID #0002        7875 'ux: Unix Extra Type 3'
    0074   Length              000B
    0076   Version             01
    0077   UID Size            04
    0078   UID                 000003E8
    007C   GID Size            04
    007D   GID                 000003E8
    
    0081 LOCAL HEADER #3       04034B50
    0085 Extract Zip Spec      0A '1.0'
    0086 Extract OS            00 'MS-DOS'
    0087 General Purpose Flag  0000
    0089 Compression Method    0000 'Stored'
    008B Last Mod Time         4E4491E1 'Mon Feb  4 18:15:02 2019'
    008F CRC                   00000000
    0093 Compressed Length     00000000
    0097 Uncompressed Length   00000000
    009B Filename Length       0009
    009D Extra Length          001C
    009F Filename              'foo/fileB'
    00A8 Extra ID #0001        5455 'UT: Extended Timestamp'
    00AA   Length              0009
    00AC   Flags               '03 mod access'
    00AD   Mod Time            5C588126 'Mon Feb  4 18:15:02 2019'
    00B1   Access Time         5C588126 'Mon Feb  4 18:15:02 2019'
    00B5 Extra ID #0002        7875 'ux: Unix Extra Type 3'
    00B7   Length              000B
    00B9   Version             01
    00BA   UID Size            04
    00BB   UID                 000003E8
    00BF   GID Size            04
    00C0   GID                 000003E8
    
    00C4 LOCAL HEADER #4       04034B50
    00C8 Extract Zip Spec      0A '1.0'
    00C9 Extract OS            00 'MS-DOS'
    00CA General Purpose Flag  0000
    00CC Compression Method    0000 'Stored'
    00CE Last Mod Time         4E4491E1 'Mon Feb  4 18:15:02 2019'
    00D2 CRC                   00000000
    00D6 Compressed Length     00000000
    00DA Uncompressed Length   00000000
    00DE Filename Length       0009
    00E0 Extra Length          001C
    00E2 Filename              'foo/fileC'
    00EB Extra ID #0001        5455 'UT: Extended Timestamp'
    00ED   Length              0009
    00EF   Flags               '03 mod access'
    00F0   Mod Time            5C588126 'Mon Feb  4 18:15:02 2019'
    00F4   Access Time         5C588126 'Mon Feb  4 18:15:02 2019'
    00F8 Extra ID #0002        7875 'ux: Unix Extra Type 3'
    00FA   Length              000B
    00FC   Version             01
    00FD   UID Size            04
    00FE   UID                 000003E8
    0102   GID Size            04
    0103   GID                 000003E8
    
    0107 CENTRAL HEADER #1     02014B50
    010B Created Zip Spec      1E '3.0'
    010C Created OS            03 'Unix'
    010D Extract Zip Spec      0A '1.0'
    010E Extract OS            00 'MS-DOS'
    010F General Purpose Flag  0000
    0111 Compression Method    0000 'Stored'
    0113 Last Mod Time         4E4491E1 'Mon Feb  4 18:15:02 2019'
    0117 CRC                   00000000
    011B Compressed Length     00000000
    011F Uncompressed Length   00000000
    0123 Filename Length       0004
    0125 Extra Length          0018
    0127 Comment Length        0000
    0129 Disk Start            0000
    012B Int File Attributes   0000
         [Bit 0]               0 'Binary Data'
    012D Ext File Attributes   41FD0010
         [Bit 4]               Directory
    0131 Local Header Offset   00000000
    0135 Filename              'foo/'
    0139 Extra ID #0001        5455 'UT: Extended Timestamp'
    013B   Length              0005
    013D   Flags               '03 mod access'
    013E   Mod Time            5C588126 'Mon Feb  4 18:15:02 2019'
    0142 Extra ID #0002        7875 'ux: Unix Extra Type 3'
    0144   Length              000B
    0146   Version             01
    0147   UID Size            04
    0148   UID                 000003E8
    014C   GID Size            04
    014D   GID                 000003E8
    
    0151 CENTRAL HEADER #2     02014B50
    0155 Created Zip Spec      1E '3.0'
    0156 Created OS            03 'Unix'
    0157 Extract Zip Spec      0A '1.0'
    0158 Extract OS            00 'MS-DOS'
    0159 General Purpose Flag  0000
    015B Compression Method    0000 'Stored'
    015D Last Mod Time         4E4491E1 'Mon Feb  4 18:15:02 2019'
    0161 CRC                   00000000
    0165 Compressed Length     00000000
    0169 Uncompressed Length   00000000
    016D Filename Length       0009
    016F Extra Length          0018
    0171 Comment Length        0000
    0173 Disk Start            0000
    0175 Int File Attributes   0000
         [Bit 0]               0 'Binary Data'
    0177 Ext File Attributes   81B40000
    017B Local Header Offset   0000003E
    017F Filename              'foo/fileA'
    0188 Extra ID #0001        5455 'UT: Extended Timestamp'
    018A   Length              0005
    018C   Flags               '03 mod access'
    018D   Mod Time            5C588126 'Mon Feb  4 18:15:02 2019'
    0191 Extra ID #0002        7875 'ux: Unix Extra Type 3'
    0193   Length              000B
    0195   Version             01
    0196   UID Size            04
    0197   UID                 000003E8
    019B   GID Size            04
    019C   GID                 000003E8
    
    01A0 CENTRAL HEADER #3     02014B50
    01A4 Created Zip Spec      1E '3.0'
    01A5 Created OS            03 'Unix'
    01A6 Extract Zip Spec      0A '1.0'
    01A7 Extract OS            00 'MS-DOS'
    01A8 General Purpose Flag  0000
    01AA Compression Method    0000 'Stored'
    01AC Last Mod Time         4E4491E1 'Mon Feb  4 18:15:02 2019'
    01B0 CRC                   00000000
    01B4 Compressed Length     00000000
    01B8 Uncompressed Length   00000000
    01BC Filename Length       0009
    01BE Extra Length          0018
    01C0 Comment Length        0000
    01C2 Disk Start            0000
    01C4 Int File Attributes   0000
         [Bit 0]               0 'Binary Data'
    01C6 Ext File Attributes   81B40000
    01CA Local Header Offset   00000081
    01CE Filename              'foo/fileB'
    01D7 Extra ID #0001        5455 'UT: Extended Timestamp'
    01D9   Length              0005
    01DB   Flags               '03 mod access'
    01DC   Mod Time            5C588126 'Mon Feb  4 18:15:02 2019'
    01E0 Extra ID #0002        7875 'ux: Unix Extra Type 3'
    01E2   Length              000B
    01E4   Version             01
    01E5   UID Size            04
    01E6   UID                 000003E8
    01EA   GID Size            04
    01EB   GID                 000003E8
    
    01EF CENTRAL HEADER #4     02014B50
    01F3 Created Zip Spec      1E '3.0'
    01F4 Created OS            03 'Unix'
    01F5 Extract Zip Spec      0A '1.0'
    01F6 Extract OS            00 'MS-DOS'
    01F7 General Purpose Flag  0000
    01F9 Compression Method    0000 'Stored'
    01FB Last Mod Time         4E4491E1 'Mon Feb  4 18:15:02 2019'
    01FF CRC                   00000000
    0203 Compressed Length     00000000
    0207 Uncompressed Length   00000000
    020B Filename Length       0009
    020D Extra Length          0018
    020F Comment Length        0000
    0211 Disk Start            0000
    0213 Int File Attributes   0000
         [Bit 0]               0 'Binary Data'
    0215 Ext File Attributes   81B40000
    0219 Local Header Offset   000000C4
    021D Filename              'foo/fileC'
    0226 Extra ID #0001        5455 'UT: Extended Timestamp'
    0228   Length              0005
    022A   Flags               '03 mod access'
    022B   Mod Time            5C588126 'Mon Feb  4 18:15:02 2019'
    022F Extra ID #0002        7875 'ux: Unix Extra Type 3'
    0231   Length              000B
    0233   Version             01
    0234   UID Size            04
    0235   UID                 000003E8
    0239   GID Size            04
    023A   GID                 000003E8
    
    023E END CENTRAL HEADER    06054B50
    0242 Number of this disk   0000
    0244 Central Dir Disk no   0000
    0246 Entries in this disk  0004
    0248 Total Entries         0004
    024A Size of Central Dir   00000137
    024E Offset to Central Dir 00000107
    0252 Comment Length        0000
    Done
    

Log in to reply
 

© Lightnetics 2019