1b6cee71dSXin LI#------------------------------------------------------------------------------ 2*2726a701SXin LI# $File: archive,v 1.138 2020/06/07 23:29:26 christos Exp $ 3b6cee71dSXin LI# archive: file(1) magic for archive formats (see also "msdos" for self- 4b6cee71dSXin LI# extracting compressed archives) 5b6cee71dSXin LI# 6b6cee71dSXin LI# cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc. 758a0f0d0SEitan Adler# pre-POSIX "tar" archives are also handled in the C code ../../src/is_tar.c. 8b6cee71dSXin LI 9b6cee71dSXin LI# POSIX tar archives 1058a0f0d0SEitan Adler# URL: https://en.wikipedia.org/wiki/Tar_(computing) 1158a0f0d0SEitan Adler# Reference: https://www.freebsd.org/cgi/man.cgi?query=tar&sektion=5&manpath=FreeBSD+8-current 1258a0f0d0SEitan Adler# header mainly padded with nul bytes 1358a0f0d0SEitan Adler500 quad 0 142dc4dbb9SEitan Adler!:strength /2 1558a0f0d0SEitan Adler# filename or extended attribute printable strings in range space null til umlaut ue 1658a0f0d0SEitan Adler>0 ubeshort >0x1F00 1758a0f0d0SEitan Adler>>0 ubeshort <0xFCFD 1858a0f0d0SEitan Adler# last 4 header bytes often null but tar\0 in gtarfail2.tar gtarfail.tar-bad 1958a0f0d0SEitan Adler# at https://sourceforge.net/projects/s-tar/files/testscripts/ 2058a0f0d0SEitan Adler>>>508 ubelong&0x8B9E8DFF 0 2158a0f0d0SEitan Adler# nul, space or ascii digit 0-7 at start of mode 2258a0f0d0SEitan Adler>>>>100 ubyte&0xC8 =0 2358a0f0d0SEitan Adler>>>>>101 ubyte&0xC8 =0 2458a0f0d0SEitan Adler# nul, space at end of check sum 2558a0f0d0SEitan Adler>>>>>>155 ubyte&0xDF =0 2658a0f0d0SEitan Adler# space or ascii digit 0 at start of check sum 2758a0f0d0SEitan Adler>>>>>>>148 ubyte&0xEF =0x20 2858a0f0d0SEitan Adler>>>>>>>>0 use tar-file 2958a0f0d0SEitan Adler# minimal check and then display tar archive information which can also be 3058a0f0d0SEitan Adler# embedded inside others like Android Backup, Clam AntiVirus database 3158a0f0d0SEitan Adler0 name tar-file 3258a0f0d0SEitan Adler>257 string !ustar 3358a0f0d0SEitan Adler# header padded with nuls 3458a0f0d0SEitan Adler>>257 ulong =0 3558a0f0d0SEitan Adler# GNU tar version 1.29 with non pax format option without refusing 3658a0f0d0SEitan Adler# creates misleading V7 header for Long path, Multi-volume, Volume type 3758a0f0d0SEitan Adler>>>156 ubyte 0x4c GNU tar archive 3858a0f0d0SEitan Adler!:mime application/x-gtar 3958a0f0d0SEitan Adler!:ext tar/gtar 4058a0f0d0SEitan Adler>>>156 ubyte 0x4d GNU tar archive 4158a0f0d0SEitan Adler!:mime application/x-gtar 4258a0f0d0SEitan Adler!:ext tar/gtar 4358a0f0d0SEitan Adler>>>156 ubyte 0x56 GNU tar archive 4458a0f0d0SEitan Adler!:mime application/x-gtar 4558a0f0d0SEitan Adler!:ext tar/gtar 4658a0f0d0SEitan Adler>>>156 default x tar archive (V7) 4758a0f0d0SEitan Adler!:mime application/x-tar 4858a0f0d0SEitan Adler!:ext tar 4958a0f0d0SEitan Adler# other stuff in padding 5058a0f0d0SEitan Adler# some implementations add new fields to the blank area at the end of the header record 5158a0f0d0SEitan Adler# created for example by DOS TAR 3.20g 1994 Tim V.Shapore with -j option 5258a0f0d0SEitan Adler>>257 ulong !0 tar archive (old) 5358a0f0d0SEitan Adler!:mime application/x-tar 5458a0f0d0SEitan Adler!:ext tar 5558a0f0d0SEitan Adler# magic in newer, GNU, posix variants 5658a0f0d0SEitan Adler>257 string =ustar 5758a0f0d0SEitan Adler# 2 last char of magic and UStar version because string expression does not work 5858a0f0d0SEitan Adler# 2 space characters followed by a null for GNU variant 5958a0f0d0SEitan Adler>>261 ubelong =0x72202000 POSIX tar archive (GNU) 6058a0f0d0SEitan Adler!:mime application/x-gtar 6158a0f0d0SEitan Adler!:ext tar/gtar 6258a0f0d0SEitan Adler# UStar version with ASCII "00" 6358a0f0d0SEitan Adler>>261 ubelong 0x72003030 POSIX 6458a0f0d0SEitan Adler# gLOBAL and ExTENSION type only found in POSIX.1-2001 format 6558a0f0d0SEitan Adler>>>156 ubyte 0x67 \b.1-2001 6658a0f0d0SEitan Adler>>>156 ubyte 0x78 \b.1-2001 6758a0f0d0SEitan Adler>>>156 ubyte x tar archive 6858a0f0d0SEitan Adler!:mime application/x-ustar 6958a0f0d0SEitan Adler!:ext tar/ustar 7058a0f0d0SEitan Adler# version with 2 binary nuls embedded in Android Backup like com.android.settings.ab 7158a0f0d0SEitan Adler>>261 ubelong 0x72000000 tar archive (ustar) 7258a0f0d0SEitan Adler!:mime application/x-ustar 7358a0f0d0SEitan Adler!:ext tar/ustar 7458a0f0d0SEitan Adler# not seen ustar variant with garbish version 7558a0f0d0SEitan Adler>>261 default x tar archive (unknown ustar) 7658a0f0d0SEitan Adler!:mime application/x-ustar 7758a0f0d0SEitan Adler!:ext tar/ustar 7858a0f0d0SEitan Adler# type flag of 1st tar archive member 7958a0f0d0SEitan Adler#>156 ubyte x \b, %c-type 8058a0f0d0SEitan Adler>156 ubyte x 8158a0f0d0SEitan Adler>>156 ubyte 0 \b, file 8258a0f0d0SEitan Adler>>156 ubyte 0x30 \b, file 8358a0f0d0SEitan Adler>>156 ubyte 0x31 \b, hard link 8458a0f0d0SEitan Adler>>156 ubyte 0x32 \b, symlink 8558a0f0d0SEitan Adler>>156 ubyte 0x33 \b, char device 8658a0f0d0SEitan Adler>>156 ubyte 0x34 \b, block device 8758a0f0d0SEitan Adler>>156 ubyte 0x35 \b, directory 8858a0f0d0SEitan Adler>>156 ubyte 0x36 \b, fifo 8958a0f0d0SEitan Adler>>156 ubyte 0x37 \b, reserved 9058a0f0d0SEitan Adler>>156 ubyte 0x4c \b, long path 9158a0f0d0SEitan Adler>>156 ubyte 0x4d \b, multi volume 9258a0f0d0SEitan Adler>>156 ubyte 0x56 \b, volume 9358a0f0d0SEitan Adler>>156 ubyte 0x67 \b, global 9458a0f0d0SEitan Adler>>156 ubyte 0x78 \b, extension 9558a0f0d0SEitan Adler>>156 default x \b, type 9658a0f0d0SEitan Adler>>>156 ubyte x '%c' 9758a0f0d0SEitan Adler# name[100] 9858a0f0d0SEitan Adler>0 string >\0 %-.60s 9958a0f0d0SEitan Adler# mode mainly stored as an octal number in ASCII null or space terminated 10058a0f0d0SEitan Adler>100 string >\0 \b, mode %-.7s 10158a0f0d0SEitan Adler# user id mainly as octal numbers in ASCII null or space terminated 10258a0f0d0SEitan Adler>108 string >\0 \b, uid %-.7s 10358a0f0d0SEitan Adler# group id mainly as octal numbers in ASCII null or space terminated 10458a0f0d0SEitan Adler>116 string >\0 \b, gid %-.7s 10558a0f0d0SEitan Adler# size mainly as octal number in ASCII 10658a0f0d0SEitan Adler>124 ubyte <0x38 10758a0f0d0SEitan Adler>>124 string >\0 \b, size %-.12s 10858a0f0d0SEitan Adler# coding indicated by setting the high-order bit of the leftmost byte 10958a0f0d0SEitan Adler>124 ubyte >0xEF \b, size 0x 11058a0f0d0SEitan Adler>>124 ubyte !0xff \b%2.2x 11158a0f0d0SEitan Adler>>125 ubyte !0xff \b%2.2x 11258a0f0d0SEitan Adler>>126 ubyte !0xff \b%2.2x 11358a0f0d0SEitan Adler>>127 ubyte !0xff \b%2.2x 11458a0f0d0SEitan Adler>>128 ubyte !0xff \b%2.2x 11558a0f0d0SEitan Adler>>129 ubyte !0xff \b%2.2x 11658a0f0d0SEitan Adler>>130 ubyte !0xff \b%2.2x 11758a0f0d0SEitan Adler>>131 ubyte !0xff \b%2.2x 11858a0f0d0SEitan Adler>>132 ubyte !0xff \b%2.2x 11958a0f0d0SEitan Adler>>133 ubyte !0xff \b%2.2x 12058a0f0d0SEitan Adler>>134 ubyte !0xff \b%2.2x 12158a0f0d0SEitan Adler>>135 ubyte !0xff \b%2.2x 12258a0f0d0SEitan Adler# seconds since 0:0:0 1 jan 1970 UTC as octal number mainly in ASCII null or space terminated 12358a0f0d0SEitan Adler>136 string >\0 \b, seconds %-.11s 12458a0f0d0SEitan Adler# header checksum stored as an octal number in ASCII null or space terminated 12558a0f0d0SEitan Adler#>148 string x \b, cksum %.7s 12658a0f0d0SEitan Adler# linkname[100] 12758a0f0d0SEitan Adler>157 string >\0 \b, linkname %-.40s 12858a0f0d0SEitan Adler# additional fields for ustar 12958a0f0d0SEitan Adler>257 string =ustar 13058a0f0d0SEitan Adler# owner user name null terminated 13158a0f0d0SEitan Adler>>265 string >\0 \b, user %-.32s 13258a0f0d0SEitan Adler# group name null terminated 13358a0f0d0SEitan Adler>>297 string >\0 \b, group %-.32s 13458a0f0d0SEitan Adler# device major minor if not zero 13558a0f0d0SEitan Adler>>329 ubequad&0xCFCFCFCFcFcFcFdf !0 13658a0f0d0SEitan Adler>>>329 string x \b, devmaj %-.7s 13758a0f0d0SEitan Adler>>337 ubequad&0xCFCFCFCFcFcFcFdf !0 13858a0f0d0SEitan Adler>>>337 string x \b, devmin %-.7s 13958a0f0d0SEitan Adler# prefix[155] 14058a0f0d0SEitan Adler>>345 string >\0 \b, prefix %-.155s 14158a0f0d0SEitan Adler# old non ustar/POSIX tar 14258a0f0d0SEitan Adler>257 string !ustar 14358a0f0d0SEitan Adler>>508 string =tar\0 14458a0f0d0SEitan Adler# padding[255] in old star 14558a0f0d0SEitan Adler>>>257 string >\0 \b, padding: %-.40s 14658a0f0d0SEitan Adler>>508 default x 14758a0f0d0SEitan Adler# padding[255] in old tar sometimes comment field 14858a0f0d0SEitan Adler>>>257 string >\0 \b, comment: %-.40s 149b6cee71dSXin LI 150b6cee71dSXin LI# Incremental snapshot gnu-tar format from: 15148c779cdSXin LI# https://www.gnu.org/software/tar/manual/html_node/Snapshot-Files.html 152b6cee71dSXin LI0 string GNU\ tar- GNU tar incremental snapshot data 153b6cee71dSXin LI>&0 regex [0-9]\.[0-9]+-[0-9]+ version %s 154b6cee71dSXin LI 155b6cee71dSXin LI# cpio archives 156b6cee71dSXin LI# 157b6cee71dSXin LI# Yes, the top two "cpio archive" formats *are* supposed to just be "short". 158b6cee71dSXin LI# The idea is to indicate archives produced on machines with the same 159b6cee71dSXin LI# byte order as the machine running "file" with "cpio archive", and 160b6cee71dSXin LI# to indicate archives produced on machines with the opposite byte order 161b6cee71dSXin LI# from the machine running "file" with "byte-swapped cpio archive". 162b6cee71dSXin LI# 163b6cee71dSXin LI# The SVR4 "cpio(4)" hints that there are additional formats, but they 164b6cee71dSXin LI# are defined as "short"s; I think all the new formats are 165b6cee71dSXin LI# character-header formats and thus are strings, not numbers. 166b6cee71dSXin LI0 short 070707 cpio archive 167b6cee71dSXin LI!:mime application/x-cpio 168b6cee71dSXin LI0 short 0143561 byte-swapped cpio archive 169b6cee71dSXin LI!:mime application/x-cpio # encoding: swapped 170b6cee71dSXin LI0 string 070707 ASCII cpio archive (pre-SVR4 or odc) 171b6cee71dSXin LI0 string 070701 ASCII cpio archive (SVR4 with no CRC) 172b6cee71dSXin LI0 string 070702 ASCII cpio archive (SVR4 with CRC) 173b6cee71dSXin LI 174b6cee71dSXin LI# 175b6cee71dSXin LI# Various archive formats used by various versions of the "ar" 176b6cee71dSXin LI# command. 177b6cee71dSXin LI# 178b6cee71dSXin LI 179b6cee71dSXin LI# 180b6cee71dSXin LI# Original UNIX archive formats. 181b6cee71dSXin LI# They were written with binary values in host byte order, and 182b6cee71dSXin LI# the magic number was a host "int", which might have been 16 bits 183b6cee71dSXin LI# or 32 bits. We don't say "PDP-11" or "VAX", as there might have 184b6cee71dSXin LI# been ports to little-endian 16-bit-int or 32-bit-int platforms 185b6cee71dSXin LI# (x86?) using some of those formats; if none existed, feel free 186b6cee71dSXin LI# to use "PDP-11" for little-endian 16-bit and "VAX" for little-endian 187b6cee71dSXin LI# 32-bit. There might have been big-endian ports of that sort as 188b6cee71dSXin LI# well. 189b6cee71dSXin LI# 190b6cee71dSXin LI0 leshort 0177555 very old 16-bit-int little-endian archive 191b6cee71dSXin LI0 beshort 0177555 very old 16-bit-int big-endian archive 192b6cee71dSXin LI0 lelong 0177555 very old 32-bit-int little-endian archive 193b6cee71dSXin LI0 belong 0177555 very old 32-bit-int big-endian archive 194b6cee71dSXin LI 195b6cee71dSXin LI0 leshort 0177545 old 16-bit-int little-endian archive 196b6cee71dSXin LI>2 string __.SYMDEF random library 197b6cee71dSXin LI0 beshort 0177545 old 16-bit-int big-endian archive 198b6cee71dSXin LI>2 string __.SYMDEF random library 199b6cee71dSXin LI0 lelong 0177545 old 32-bit-int little-endian archive 200b6cee71dSXin LI>4 string __.SYMDEF random library 201b6cee71dSXin LI0 belong 0177545 old 32-bit-int big-endian archive 202b6cee71dSXin LI>4 string __.SYMDEF random library 203b6cee71dSXin LI 204b6cee71dSXin LI# 205b6cee71dSXin LI# From "pdp" (but why a 4-byte quantity?) 206b6cee71dSXin LI# 207b6cee71dSXin LI0 lelong 0x39bed PDP-11 old archive 208b6cee71dSXin LI0 lelong 0x39bee PDP-11 4.0 archive 209b6cee71dSXin LI 210b6cee71dSXin LI# 211b6cee71dSXin LI# XXX - what flavor of APL used this, and was it a variant of 212b6cee71dSXin LI# some ar archive format? It's similar to, but not the same 213b6cee71dSXin LI# as, the APL workspace magic numbers in pdp. 214b6cee71dSXin LI# 215b6cee71dSXin LI0 long 0100554 apl workspace 216b6cee71dSXin LI 217b6cee71dSXin LI# 218b6cee71dSXin LI# System V Release 1 portable(?) archive format. 219b6cee71dSXin LI# 220b6cee71dSXin LI0 string =<ar> System V Release 1 ar archive 221b6cee71dSXin LI!:mime application/x-archive 222b6cee71dSXin LI 223b6cee71dSXin LI# 224b6cee71dSXin LI# Debian package; it's in the portable archive format, and needs to go 225b6cee71dSXin LI# before the entry for regular portable archives, as it's recognized as 226b6cee71dSXin LI# a portable archive whose first member has a name beginning with 227b6cee71dSXin LI# "debian". 228b6cee71dSXin LI# 22948c779cdSXin LI# Update: Joerg Jenderek 23048c779cdSXin LI# URL: https://en.wikipedia.org/wiki/Deb_(file_format) 231b6cee71dSXin LI0 string =!<arch>\ndebian 23248c779cdSXin LI# https://manpages.debian.org/testing/dpkg/dpkg-split.1.en.html 23348c779cdSXin LI>14 string -split part of multipart Debian package 234b6cee71dSXin LI!:mime application/vnd.debian.binary-package 23548c779cdSXin LI# udeb is used for stripped down deb file 23648c779cdSXin LI!:ext deb/udeb 23748c779cdSXin LI>14 string -binary Debian binary package 238b6cee71dSXin LI!:mime application/vnd.debian.binary-package 239*2726a701SXin LI# For ipk packager see also https://en.wikipedia.org/wiki/Opkg 240*2726a701SXin LI!:ext deb/udeb/ipk 24148c779cdSXin LI# This should not happen 24248c779cdSXin LI>14 default x Unknown Debian package 24348c779cdSXin LI# NL terminated version; for most Debian cases this is 2.0 or 2.1 for splitted 244b6cee71dSXin LI>68 string >\0 (format %s) 24548c779cdSXin LI#>68 string !2.0\n 24648c779cdSXin LI#>>68 string x (format %.3s) 24748c779cdSXin LI>68 string =2.0\n 24848c779cdSXin LI# 2nd archive name=control archive name like control.tar.gz or control.tar.xz 24948c779cdSXin LI>>72 string >\0 \b, with %.14s 25048c779cdSXin LI# look for 3rd archive name=data archive name like data.tar.{gz,xz,bz2,lzma} 25148c779cdSXin LI>>0 search/0x93e4f data.tar. \b, data compression 25248c779cdSXin LI# the above line only works if FILE_BYTES_MAX in ../../src/file.h is raised 25348c779cdSXin LI# for example like libreoffice-dev-doc_1%3a5.2.7-1+rpi1+deb9u3_all.deb 254*2726a701SXin LI>>>&0 string x %.2s 255*2726a701SXin LI# skip space (0x20 BSD) and slash (0x2f System V) character marking end of name 256*2726a701SXin LI>>>&2 ubyte !0x20 257*2726a701SXin LI>>>>&-1 ubyte !0x2f 258*2726a701SXin LI# display 3rd character of file name extension like 2 of bz2 or m of lzma 259*2726a701SXin LI>>>>>&-1 ubyte x \b%c 260*2726a701SXin LI>>>>>>&0 ubyte !0x20 261*2726a701SXin LI>>>>>>>&-1 ubyte !0x2f 262*2726a701SXin LI# display 4th character of file name extension like a of lzma 263*2726a701SXin LI>>>>>>>>&-1 ubyte x \b%c 26448c779cdSXin LI# splitted debian package case 26548c779cdSXin LI>68 string =2.1\n 26648c779cdSXin LI# dpkg-1.18.25/dpkg-split/info.c 26748c779cdSXin LI# NL terminated ASCII package name like ckermit 26848c779cdSXin LI>>&0 string x \b, %s 26948c779cdSXin LI# NL terminated package version like 302-5.3 27048c779cdSXin LI>>>&1 string x %s 27148c779cdSXin LI# NL terminated MD5 checksum 27248c779cdSXin LI>>>>&1 string x \b, MD5 %s 27348c779cdSXin LI# NL terminated original package length 27448c779cdSXin LI>>>>>&1 string x \b, unsplitted size %s 27548c779cdSXin LI# NL terminated part length 276d38c30c0SXin LI>>>>>>&1 string x \b, part length %s 27748c779cdSXin LI# NL terminated package part like n/m 27848c779cdSXin LI>>>>>>>&1 string x \b, part %s 27948c779cdSXin LI# NL terminated package architecture like armhf since dpkg 1.16.1 or later 28048c779cdSXin LI>>>>>>>>&1 string x \b, %s 281b6cee71dSXin LI 282b6cee71dSXin LI# 283b6cee71dSXin LI# MIPS archive; they're in the portable archive format, and need to go 284b6cee71dSXin LI# before the entry for regular portable archives, as it's recognized as 285b6cee71dSXin LI# a portable archive whose first member has a name beginning with 286b6cee71dSXin LI# "__________E". 287b6cee71dSXin LI# 288b6cee71dSXin LI0 string =!<arch>\n__________E MIPS archive 289b6cee71dSXin LI!:mime application/x-archive 290b6cee71dSXin LI>20 string U with MIPS Ucode members 291b6cee71dSXin LI>21 string L with MIPSEL members 292b6cee71dSXin LI>21 string B with MIPSEB members 293b6cee71dSXin LI>19 string L and an EL hash table 294b6cee71dSXin LI>19 string B and an EB hash table 295b6cee71dSXin LI>22 string X -- out of date 296b6cee71dSXin LI 297b6cee71dSXin LI# 298b6cee71dSXin LI# BSD/SVR2-and-later portable archive formats. 299b6cee71dSXin LI# 30048c779cdSXin LI# Update: Joerg Jenderek 30148c779cdSXin LI# URL: http://fileformats.archiveteam.org/wiki/AR 30248c779cdSXin LI# Reference: https://www.unix.com/man-page/opensolaris/3HEAD/ar.h/ 30348c779cdSXin LI# Note: Mach-O universal binary in ./cafebabe is dependent 30448c779cdSXin LI# TODO: unify current ar archive, MIPS archive, Debian package 30548c779cdSXin LI# distinguish BSD, SVR; 32, 64 bit; HP from other 32-bit SVR; 30648c779cdSXin LI# *.ar packages from *.a libraries. handle empty archive 3072dc4dbb9SEitan Adler0 string =!<arch>\n current ar archive 30848c779cdSXin LI# print first and possibly second ar_name[16] for debugging purpose 30948c779cdSXin LI#>8 string x \b, 1st "%.16s" 31048c779cdSXin LI#>68 string x \b, 2nd "%.16s" 311b6cee71dSXin LI!:mime application/x-archive 31248c779cdSXin LI# a in most case for libraries; lib for Microsoft libraries; ar else cases 31348c779cdSXin LI!:ext a/lib/ar 314b6cee71dSXin LI>8 string __.SYMDEF random library 31548c779cdSXin LI# first member with long marked name __.SYMDEF SORTED implies BSD library 316b6cee71dSXin LI>68 string __.SYMDEF\ SORTED random library 31748c779cdSXin LI# Reference: https://parisc.wiki.kernel.org/images-parisc/b/b2/Rad_11_0_32.pdf 31848c779cdSXin LI# "archive file" entry moved from ./hp 31948c779cdSXin LI# LST header system_id 0210h~PA-RISC 1.1,... identifies the target architecture 32048c779cdSXin LI# LST header a_magic 0619h~relocatable library 32148c779cdSXin LI>68 belong 0x020b0619 - PA-RISC1.0 relocatable library 32248c779cdSXin LI>68 belong 0x02100619 - PA-RISC1.1 relocatable library 32348c779cdSXin LI>68 belong 0x02110619 - PA-RISC1.2 relocatable library 32448c779cdSXin LI>68 belong 0x02140619 - PA-RISC2.0 relocatable library 32548c779cdSXin LI#EOF for common ar archives 326b6cee71dSXin LI 327b6cee71dSXin LI# 328b6cee71dSXin LI# "Thin" archive, as can be produced by GNU ar. 329b6cee71dSXin LI# 330b6cee71dSXin LI0 string =!<thin>\n thin archive with 331b6cee71dSXin LI>68 belong 0 no symbol entries 332b6cee71dSXin LI>68 belong 1 %d symbol entry 333b6cee71dSXin LI>68 belong >1 %d symbol entries 334b6cee71dSXin LI 33548c779cdSXin LI0 search/1 -h- Software Tools format archive text 33648c779cdSXin LI 337b6cee71dSXin LI# ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com) 338b6cee71dSXin LI# 339b6cee71dSXin LI# The first byte is the magic (0x1a), byte 2 is the compression type for 340b6cee71dSXin LI# the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS 341b6cee71dSXin LI# filename of the first file (null terminated). Since some types collide 342b6cee71dSXin LI# we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%), 343b6cee71dSXin LI# 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%). 0x01 collides with terminfo. 344b6cee71dSXin LI0 lelong&0x8080ffff 0x0000081a ARC archive data, dynamic LZW 345b6cee71dSXin LI!:mime application/x-arc 346b6cee71dSXin LI0 lelong&0x8080ffff 0x0000091a ARC archive data, squashed 347b6cee71dSXin LI!:mime application/x-arc 348b6cee71dSXin LI0 lelong&0x8080ffff 0x0000021a ARC archive data, uncompressed 349b6cee71dSXin LI!:mime application/x-arc 350b6cee71dSXin LI0 lelong&0x8080ffff 0x0000031a ARC archive data, packed 351b6cee71dSXin LI!:mime application/x-arc 352b6cee71dSXin LI0 lelong&0x8080ffff 0x0000041a ARC archive data, squeezed 353b6cee71dSXin LI!:mime application/x-arc 354b6cee71dSXin LI0 lelong&0x8080ffff 0x0000061a ARC archive data, crunched 355b6cee71dSXin LI!:mime application/x-arc 356b6cee71dSXin LI# [JW] stuff taken from idarc, obviously ARC successors: 357b6cee71dSXin LI0 lelong&0x8080ffff 0x00000a1a PAK archive data 358b6cee71dSXin LI!:mime application/x-arc 359b6cee71dSXin LI0 lelong&0x8080ffff 0x0000141a ARC+ archive data 360b6cee71dSXin LI!:mime application/x-arc 361b6cee71dSXin LI0 lelong&0x8080ffff 0x0000481a HYP archive data 362b6cee71dSXin LI!:mime application/x-arc 363b6cee71dSXin LI 364b6cee71dSXin LI# Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk) 365b6cee71dSXin LI# I can't create either SPARK or ArcFS archives so I have not tested this stuff 366b6cee71dSXin LI# [GRR: the original entries collide with ARC, above; replaced with combined 367b6cee71dSXin LI# version (not tested)] 368b6cee71dSXin LI#0 byte 0x1a RISC OS archive (spark format) 369b6cee71dSXin LI0 string \032archive RISC OS archive (ArcFS format) 370b6cee71dSXin LI0 string Archive\000 RISC OS archive (ArcFS format) 371b6cee71dSXin LI 372b6cee71dSXin LI# All these were taken from idarc, many could not be verified. Unfortunately, 373b6cee71dSXin LI# there were many low-quality sigs, i.e. easy to trigger false positives. 374b6cee71dSXin LI# Please notify me of any real-world fishy/ambiguous signatures and I'll try 375b6cee71dSXin LI# to get my hands on the actual archiver and see if I find something better. [JW] 376b6cee71dSXin LI# probably many can be enhanced by finding some 0-byte or control char near the start 377b6cee71dSXin LI 378b6cee71dSXin LI# idarc calls this Crush/Uncompressed... *shrug* 379b6cee71dSXin LI0 string CRUSH Crush archive data 380b6cee71dSXin LI# Squeeze It (.sqz) 381b6cee71dSXin LI0 string HLSQZ Squeeze It archive data 382b6cee71dSXin LI# SQWEZ 383b6cee71dSXin LI0 string SQWEZ SQWEZ archive data 384b6cee71dSXin LI# HPack (.hpk) 385b6cee71dSXin LI0 string HPAK HPack archive data 386b6cee71dSXin LI# HAP 387b6cee71dSXin LI0 string \x91\x33HF HAP archive data 388b6cee71dSXin LI# MD/MDCD 389b6cee71dSXin LI0 string MDmd MDCD archive data 390b6cee71dSXin LI# LIM 391b6cee71dSXin LI0 string LIM\x1a LIM archive data 392b6cee71dSXin LI# SAR 393b6cee71dSXin LI3 string LH5 SAR archive data 394b6cee71dSXin LI# BSArc/BS2 395b6cee71dSXin LI0 string \212\3SB\020\0 BSArc/BS2 archive data 396b6cee71dSXin LI# Bethesda Softworks Archive (Oblivion) 397b6cee71dSXin LI0 string BSA\0 BSArc archive data 398b6cee71dSXin LI>4 lelong x version %d 399b6cee71dSXin LI# MAR 400b6cee71dSXin LI2 string =-ah MAR archive data 401b6cee71dSXin LI# ACB 402b6cee71dSXin LI#0 belong&0x00f800ff 0x00800000 ACB archive data 403b6cee71dSXin LI# CPZ 404b6cee71dSXin LI# TODO, this is what idarc says: 0 string \0\0\0 CPZ archive data 405b6cee71dSXin LI# JRC 406b6cee71dSXin LI0 string JRchive JRC archive data 407b6cee71dSXin LI# Quantum 408b6cee71dSXin LI0 string DS\0 Quantum archive data 409b6cee71dSXin LI# ReSOF 410b6cee71dSXin LI0 string PK\3\6 ReSOF archive data 411b6cee71dSXin LI# QuArk 412b6cee71dSXin LI0 string 7\4 QuArk archive data 413b6cee71dSXin LI# YAC 414b6cee71dSXin LI14 string YC YAC archive data 415b6cee71dSXin LI# X1 416b6cee71dSXin LI0 string X1 X1 archive data 417b6cee71dSXin LI0 string XhDr X1 archive data 418b6cee71dSXin LI# CDC Codec (.dqt) 419b6cee71dSXin LI0 belong&0xffffe000 0x76ff2000 CDC Codec archive data 420b6cee71dSXin LI# AMGC 421b6cee71dSXin LI0 string \xad6" AMGC archive data 422b6cee71dSXin LI# NuLIB 423b6cee71dSXin LI0 string N\xc3\xb5F\xc3\xa9lx\xc3\xa5 NuLIB archive data 424b6cee71dSXin LI# PakLeo 425b6cee71dSXin LI0 string LEOLZW PAKLeo archive data 426b6cee71dSXin LI# ChArc 427b6cee71dSXin LI0 string SChF ChArc archive data 428b6cee71dSXin LI# PSA 429b6cee71dSXin LI0 string PSA PSA archive data 430b6cee71dSXin LI# CrossePAC 431b6cee71dSXin LI0 string DSIGDCC CrossePAC archive data 432b6cee71dSXin LI# Freeze 433b6cee71dSXin LI0 string \x1f\x9f\x4a\x10\x0a Freeze archive data 434b6cee71dSXin LI# KBoom 435b6cee71dSXin LI0 string \xc2\xa8MP\xc2\xa8 KBoom archive data 436b6cee71dSXin LI# NSQ, must go after CDC Codec 437b6cee71dSXin LI0 string \x76\xff NSQ archive data 438b6cee71dSXin LI# DPA 439b6cee71dSXin LI0 string Dirk\ Paehl DPA archive data 440b6cee71dSXin LI# BA 441b6cee71dSXin LI# TODO: idarc says "bytes 0-2 == bytes 3-5" 442b6cee71dSXin LI# TTComp 4433e41d09dSXin LI# URL: http://fileformats.archiveteam.org/wiki/TTComp_archive 4443e41d09dSXin LI# Update: Joerg Jenderek 4453e41d09dSXin LI# GRR: line below is too general as it matches also Panorama database "TCDB 2003-10 demo.pan", others 4463e41d09dSXin LI0 string \0\6 4473e41d09dSXin LI# look for first keyword of Panorama database *.pan 4483e41d09dSXin LI>12 search/261 DESIGN 4493e41d09dSXin LI# skip keyword with low entropy 4503e41d09dSXin LI>12 default x TTComp archive, binary, 4K dictionary 4513e41d09dSXin LI# (version 5.25) labeled the above entry as "TTComp archive data" 452d38c30c0SXin LI# From: Joerg Jenderek 453d38c30c0SXin LI# URL: https://wiki.68kmla.org/DiskCopy_4.2_format_specification 454d38c30c0SXin LI# reference: http://nulib.com/library/FTN.e00005.htm 455d38c30c0SXin LI0x52 ubeshort 0x0100 456d38c30c0SXin LI# test for disk size equal or above 400k 457d38c30c0SXin LI>0x40 ubelong >409599 Apple DiskCopy 4.2 image 458d38c30c0SXin LI#!:mime application/octet-stream 459d38c30c0SXin LI!:apple dCpydImg 460d38c30c0SXin LI!:ext image/dc42 461d38c30c0SXin LI# image pascal name padded with NULs like Microsoft Mail 462d38c30c0SXin LI>>00 pstring/B x %s 463d38c30c0SXin LI# data size in bytes like 409600 464d38c30c0SXin LI>>0x40 ubelong x \b, %u bytes 465d38c30c0SXin LI# tag size in bytes 466d38c30c0SXin LI>>0x44 ubelong >0 \b, 0x%x tag size 467d38c30c0SXin LI# data checksum 468d38c30c0SXin LI#>>0x48 ubelong x \b, 0x%x checksum 469d38c30c0SXin LI# tag checksum 470d38c30c0SXin LI#>>0x4c ubelong x \b, 0x%x tag checksum 471d38c30c0SXin LI# disk encoding 472d38c30c0SXin LI>>0x50 ubyte 0 \b, GCR CLV ssdd (400k) 473d38c30c0SXin LI>>0x50 ubyte 1 \b, GCR CLV dsdd (800k) 474d38c30c0SXin LI>>0x50 ubyte 2 \b, MFM CAV dsdd (720k) 475d38c30c0SXin LI>>0x50 ubyte 3 \b, MFM CAV dshd (1440k) 476d38c30c0SXin LI>>0x50 ubyte >3 \b, 0x%x encoding 477d38c30c0SXin LI# format byte 478d38c30c0SXin LI>>0x51 ubyte x \b, 0x%x format 479d38c30c0SXin LI#>>0x54 ubequad x \b, data 0x%16.16llx 480b6cee71dSXin LI# ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation? 481b6cee71dSXin LI0 string ESP ESP archive data 482b6cee71dSXin LI# ZPack 483b6cee71dSXin LI0 string \1ZPK\1 ZPack archive data 484b6cee71dSXin LI# Sky 485b6cee71dSXin LI0 string \xbc\x40 Sky archive data 486b6cee71dSXin LI# UFA 487b6cee71dSXin LI0 string UFA UFA archive data 488b6cee71dSXin LI# Dry 489b6cee71dSXin LI0 string =-H2O DRY archive data 490b6cee71dSXin LI# FoxSQZ 491b6cee71dSXin LI0 string FOXSQZ FoxSQZ archive data 492b6cee71dSXin LI# AR7 493b6cee71dSXin LI0 string ,AR7 AR7 archive data 494b6cee71dSXin LI# PPMZ 495b6cee71dSXin LI0 string PPMZ PPMZ archive data 496b6cee71dSXin LI# MS Compress 49758a0f0d0SEitan Adler# Update: Joerg Jenderek 49858a0f0d0SEitan Adler# URL: http://fileformats.archiveteam.org/wiki/MS-DOS_installation_compression 49958a0f0d0SEitan Adler# Reference: https://hwiegman.home.xs4all.nl/fileformats/compress/szdd_kwaj_format.html 50058a0f0d0SEitan Adler# Note: use correct version of extracting tool like EXPAND, UNPACK, DECOMP or 7Z 50158a0f0d0SEitan Adler4 string \x88\xf0\x27 50258a0f0d0SEitan Adler# KWAJ variant 50358a0f0d0SEitan Adler>0 string KWAJ MS Compress archive data, KWAJ variant 50458a0f0d0SEitan Adler!:mime application/x-ms-compress-kwaj 50558a0f0d0SEitan Adler# extension not working in version 5.32 50658a0f0d0SEitan Adler# magic/Magdir/archive, 284: Warning: EXTENSION type ` ??_' has bad char '?' 50758a0f0d0SEitan Adler# file: line 284: Bad magic entry ' ??_' 50858a0f0d0SEitan Adler!:ext ??_ 50958a0f0d0SEitan Adler# compression method (0-4) 51058a0f0d0SEitan Adler>>8 uleshort x \b, %u method 51158a0f0d0SEitan Adler# offset of compressed data 51258a0f0d0SEitan Adler>>10 uleshort x \b, 0x%x offset 51358a0f0d0SEitan Adler#>>(10.s) uleshort x 51458a0f0d0SEitan Adler#>>>&-6 string x \b, TEST extension %-.3s 51558a0f0d0SEitan Adler# header flags to mark header extensions 51658a0f0d0SEitan Adler>>12 uleshort >0 \b, 0x%x flags 51758a0f0d0SEitan Adler# 4 bytes: decompressed length of file 51858a0f0d0SEitan Adler>>12 uleshort &0x01 51958a0f0d0SEitan Adler>>>14 ulelong x \b, original size: %u bytes 52058a0f0d0SEitan Adler# 2 bytes: unknown purpose 52158a0f0d0SEitan Adler# 2 bytes: length of unknown data + mentioned bytes 52258a0f0d0SEitan Adler# 1-9 bytes: null-terminated file name 52358a0f0d0SEitan Adler# 1-4 bytes: null-terminated file extension 52458a0f0d0SEitan Adler>>12 uleshort &0x08 52558a0f0d0SEitan Adler>>>12 uleshort ^0x01 52658a0f0d0SEitan Adler>>>>12 uleshort ^0x02 52758a0f0d0SEitan Adler>>>>>12 uleshort ^0x04 52858a0f0d0SEitan Adler>>>>>>12 uleshort ^0x10 52958a0f0d0SEitan Adler>>>>>>>14 string x \b, %-.8s 53058a0f0d0SEitan Adler>>>>>>12 uleshort &0x10 53158a0f0d0SEitan Adler>>>>>>>14 string x \b, %-.8s 53258a0f0d0SEitan Adler>>>>>>>>&1 string x \b.%-.3s 53358a0f0d0SEitan Adler>>>>>12 uleshort &0x04 53458a0f0d0SEitan Adler>>>>>>12 uleshort ^0x10 53558a0f0d0SEitan Adler>>>>>>>(14.s) uleshort x 53658a0f0d0SEitan Adler>>>>>>>>&14 string x \b, %-.8s 53758a0f0d0SEitan Adler>>>>>>12 uleshort &0x10 53858a0f0d0SEitan Adler>>>>>>>(14.s) uleshort x 53958a0f0d0SEitan Adler>>>>>>>>&14 string x \b, %-.8s 54058a0f0d0SEitan Adler>>>>>>>>>&1 string x \b.%-.3s 54158a0f0d0SEitan Adler>>>>12 uleshort &0x02 54258a0f0d0SEitan Adler>>>>>12 uleshort ^0x04 54358a0f0d0SEitan Adler>>>>>>12 uleshort ^0x10 54458a0f0d0SEitan Adler>>>>>>>16 string x \b, %-.8s 54558a0f0d0SEitan Adler>>>>>>12 uleshort &0x10 54658a0f0d0SEitan Adler>>>>>>>16 string x \b, %-.8s 54758a0f0d0SEitan Adler>>>>>>>>&1 string x \b.%-.3s 54858a0f0d0SEitan Adler>>>>>12 uleshort &0x04 54958a0f0d0SEitan Adler>>>>>>12 uleshort ^0x10 55058a0f0d0SEitan Adler>>>>>>>(16.s) uleshort x 55158a0f0d0SEitan Adler>>>>>>>>&16 string x \b, %-.8s 55258a0f0d0SEitan Adler>>>>>>12 uleshort &0x10 55358a0f0d0SEitan Adler>>>>>>>(16.s) uleshort x 55458a0f0d0SEitan Adler>>>>>>>&16 string x %-.8s 55558a0f0d0SEitan Adler>>>>>>>>&1 string x \b.%-.3s 55658a0f0d0SEitan Adler>>>12 uleshort &0x01 55758a0f0d0SEitan Adler>>>>12 uleshort ^0x02 55858a0f0d0SEitan Adler>>>>>12 uleshort ^0x04 55958a0f0d0SEitan Adler>>>>>>12 uleshort ^0x10 56058a0f0d0SEitan Adler>>>>>>>18 string x \b, %-.8s 56158a0f0d0SEitan Adler>>>>>>12 uleshort &0x10 56258a0f0d0SEitan Adler>>>>>>>18 string x \b, %-.8s 56358a0f0d0SEitan Adler>>>>>>>>&1 string x \b.%-.3s 56458a0f0d0SEitan Adler>>>>>12 uleshort &0x04 56558a0f0d0SEitan Adler>>>>>>12 uleshort ^0x10 56658a0f0d0SEitan Adler>>>>>>>(18.s) uleshort x 56758a0f0d0SEitan Adler>>>>>>>>&18 string x \b, %-.8s 56858a0f0d0SEitan Adler>>>>>>12 uleshort &0x10 56958a0f0d0SEitan Adler>>>>>>>(18.s) uleshort x 57058a0f0d0SEitan Adler>>>>>>>>&18 string x \b, %-.8s 57158a0f0d0SEitan Adler>>>>>>>>>&1 string x \b.%-.3s 57258a0f0d0SEitan Adler>>>>12 uleshort &0x02 57358a0f0d0SEitan Adler>>>>>12 uleshort ^0x04 57458a0f0d0SEitan Adler>>>>>>12 uleshort ^0x10 57558a0f0d0SEitan Adler>>>>>>>20 string x \b, %-.8s 57658a0f0d0SEitan Adler>>>>>>12 uleshort &0x10 57758a0f0d0SEitan Adler>>>>>>>20 string x \b, %-.8s 57858a0f0d0SEitan Adler>>>>>>>>&1 string x \b.%-.3s 57958a0f0d0SEitan Adler>>>>>12 uleshort &0x04 58058a0f0d0SEitan Adler>>>>>>12 uleshort ^0x10 58158a0f0d0SEitan Adler>>>>>>>(20.s) uleshort x 58258a0f0d0SEitan Adler>>>>>>>>&20 string x \b, %-.8s 58358a0f0d0SEitan Adler>>>>>>12 uleshort &0x10 58458a0f0d0SEitan Adler>>>>>>>(20.s) uleshort x 58558a0f0d0SEitan Adler>>>>>>>>&20 string x \b, %-.8s 58658a0f0d0SEitan Adler>>>>>>>>>&1 string x \b.%-.3s 58758a0f0d0SEitan Adler# 2 bytes: length of data + mentioned bytes 58858a0f0d0SEitan Adler# 58958a0f0d0SEitan Adler# SZDD variant Haruhiko Okumura's LZSS or 7z type MsLZ 59058a0f0d0SEitan Adler>0 string SZDD MS Compress archive data, SZDD variant 59158a0f0d0SEitan Adler!:mime application/x-ms-compress-szdd 59258a0f0d0SEitan Adler!:ext ??_ 59358a0f0d0SEitan Adler# The character missing from the end of the filename (0=unknown) 59458a0f0d0SEitan Adler>>9 string >\0 \b, %-.1s is last character of original name 59558a0f0d0SEitan Adler# https://www.betaarchive.com/forum/viewtopic.php?t=26161 59658a0f0d0SEitan Adler# Compression mode: "A" (0x41) found but sometimes "B" in Windows 3.1 builds 026 and 034e 59758a0f0d0SEitan Adler>>8 string !A \b, %-.1s method 59858a0f0d0SEitan Adler>>10 ulelong >0 \b, original size: %u bytes 59958a0f0d0SEitan Adler# QBasic SZDD variant 60058a0f0d0SEitan Adler3 string \x88\xf0\x27 60158a0f0d0SEitan Adler>0 string SZ\x20 MS Compress archive data, QBasic variant 60258a0f0d0SEitan Adler!:mime application/x-ms-compress-sz 60358a0f0d0SEitan Adler!:ext ??$ 60458a0f0d0SEitan Adler>>8 ulelong >0 \b, original size: %u bytes 60558a0f0d0SEitan Adler 606b6cee71dSXin LI# MP3 (archiver, not lossy audio compression) 607b6cee71dSXin LI0 string MP3\x1a MP3-Archiver archive data 608b6cee71dSXin LI# ZET 609b6cee71dSXin LI0 string OZ\xc3\x9d ZET archive data 610b6cee71dSXin LI# TSComp 611b6cee71dSXin LI0 string \x65\x5d\x13\x8c\x08\x01\x03\x00 TSComp archive data 612b6cee71dSXin LI# ARQ 613b6cee71dSXin LI0 string gW\4\1 ARQ archive data 614b6cee71dSXin LI# Squash 615b6cee71dSXin LI3 string OctSqu Squash archive data 616b6cee71dSXin LI# Terse 617b6cee71dSXin LI0 string \5\1\1\0 Terse archive data 618b6cee71dSXin LI# PUCrunch 619b6cee71dSXin LI0 string \x01\x08\x0b\x08\xef\x00\x9e\x32\x30\x36\x31 PUCrunch archive data 620b6cee71dSXin LI# UHarc 621b6cee71dSXin LI0 string UHA UHarc archive data 622b6cee71dSXin LI# ABComp 623b6cee71dSXin LI0 string \2AB ABComp archive data 624b6cee71dSXin LI0 string \3AB2 ABComp archive data 625b6cee71dSXin LI# CMP 626b6cee71dSXin LI0 string CO\0 CMP archive data 627b6cee71dSXin LI# Splint 628b6cee71dSXin LI0 string \x93\xb9\x06 Splint archive data 629b6cee71dSXin LI# InstallShield 630b6cee71dSXin LI0 string \x13\x5d\x65\x8c InstallShield Z archive Data 631b6cee71dSXin LI# Gather 632b6cee71dSXin LI1 string GTH Gather archive data 633b6cee71dSXin LI# BOA 634b6cee71dSXin LI0 string BOA BOA archive data 635b6cee71dSXin LI# RAX 636b6cee71dSXin LI0 string ULEB\xa RAX archive data 637b6cee71dSXin LI# Xtreme 638b6cee71dSXin LI0 string ULEB\0 Xtreme archive data 639b6cee71dSXin LI# Pack Magic 640b6cee71dSXin LI0 string @\xc3\xa2\1\0 Pack Magic archive data 641b6cee71dSXin LI# BTS 642b6cee71dSXin LI0 belong&0xfeffffff 0x1a034465 BTS archive data 643b6cee71dSXin LI# ELI 5750 644b6cee71dSXin LI0 string Ora\ ELI 5750 archive data 645b6cee71dSXin LI# QFC 646b6cee71dSXin LI0 string \x1aFC\x1a QFC archive data 647b6cee71dSXin LI0 string \x1aQF\x1a QFC archive data 648b6cee71dSXin LI# PRO-PACK 649b6cee71dSXin LI0 string RNC PRO-PACK archive data 650b6cee71dSXin LI# 777 651b6cee71dSXin LI0 string 777 777 archive data 652b6cee71dSXin LI# LZS221 653b6cee71dSXin LI0 string sTaC LZS221 archive data 654b6cee71dSXin LI# HPA 655b6cee71dSXin LI0 string HPA HPA archive data 656b6cee71dSXin LI# Arhangel 657b6cee71dSXin LI0 string LG Arhangel archive data 658b6cee71dSXin LI# EXP1, uses bzip2 659b6cee71dSXin LI0 string 0123456789012345BZh EXP1 archive data 660b6cee71dSXin LI# IMP 661b6cee71dSXin LI0 string IMP\xa IMP archive data 662b6cee71dSXin LI# NRV 663b6cee71dSXin LI0 string \x00\x9E\x6E\x72\x76\xFF NRV archive data 664b6cee71dSXin LI# Squish 665b6cee71dSXin LI0 string \x73\xb2\x90\xf4 Squish archive data 666b6cee71dSXin LI# Par 667b6cee71dSXin LI0 string PHILIPP Par archive data 668b6cee71dSXin LI0 string PAR Par archive data 669b6cee71dSXin LI# HIT 670b6cee71dSXin LI0 string UB HIT archive data 671b6cee71dSXin LI# SBX 672b6cee71dSXin LI0 belong&0xfffff000 0x53423000 SBX archive data 673b6cee71dSXin LI# NaShrink 674b6cee71dSXin LI0 string NSK NaShrink archive data 675b6cee71dSXin LI# SAPCAR 676b6cee71dSXin LI0 string #\ CAR\ archive\ header SAPCAR archive data 677b6cee71dSXin LI0 string CAR\ 2.00RG SAPCAR archive data 678b6cee71dSXin LI# Disintegrator 679b6cee71dSXin LI0 string DST Disintegrator archive data 680b6cee71dSXin LI# ASD 681b6cee71dSXin LI0 string ASD ASD archive data 682b6cee71dSXin LI# InstallShield CAB 683b6cee71dSXin LI0 string ISc( InstallShield CAB 684b6cee71dSXin LI# TOP4 685b6cee71dSXin LI0 string T4\x1a TOP4 archive data 686b6cee71dSXin LI# BatComp left out: sig looks like COM executable 687b6cee71dSXin LI# so TODO: get real 4dos batcomp file and find sig 688b6cee71dSXin LI# BlakHole 689b6cee71dSXin LI0 string BH\5\7 BlakHole archive data 690b6cee71dSXin LI# BIX 691b6cee71dSXin LI0 string BIX0 BIX archive data 692b6cee71dSXin LI# ChiefLZA 693b6cee71dSXin LI0 string ChfLZ ChiefLZA archive data 694b6cee71dSXin LI# Blink 695b6cee71dSXin LI0 string Blink Blink archive data 696b6cee71dSXin LI# Logitech Compress 697b6cee71dSXin LI0 string \xda\xfa Logitech Compress archive data 698b6cee71dSXin LI# ARS-Sfx (FIXME: really a SFX? then goto COM/EXE) 699b6cee71dSXin LI1 string (C)\ STEPANYUK ARS-Sfx archive data 700b6cee71dSXin LI# AKT/AKT32 701b6cee71dSXin LI0 string AKT32 AKT32 archive data 702b6cee71dSXin LI0 string AKT AKT archive data 703b6cee71dSXin LI# NPack 704b6cee71dSXin LI0 string MSTSM NPack archive data 705b6cee71dSXin LI# PFT 706b6cee71dSXin LI0 string \0\x50\0\x14 PFT archive data 707b6cee71dSXin LI# SemOne 708b6cee71dSXin LI0 string SEM SemOne archive data 709b6cee71dSXin LI# PPMD 710b6cee71dSXin LI0 string \x8f\xaf\xac\x84 PPMD archive data 711b6cee71dSXin LI# FIZ 712b6cee71dSXin LI0 string FIZ FIZ archive data 713b6cee71dSXin LI# MSXiE 714b6cee71dSXin LI0 belong&0xfffff0f0 0x4d530000 MSXiE archive data 715b6cee71dSXin LI# DeepFreezer 716b6cee71dSXin LI0 belong&0xfffffff0 0x797a3030 DeepFreezer archive data 717b6cee71dSXin LI# DC 718b6cee71dSXin LI0 string =<DC- DC archive data 719b6cee71dSXin LI# TPac 720b6cee71dSXin LI0 string \4TPAC\3 TPac archive data 721b6cee71dSXin LI# Ai 722b6cee71dSXin LI0 string Ai\1\1\0 Ai archive data 723b6cee71dSXin LI0 string Ai\1\0\0 Ai archive data 724b6cee71dSXin LI# Ai32 725b6cee71dSXin LI0 string Ai\2\0 Ai32 archive data 726b6cee71dSXin LI0 string Ai\2\1 Ai32 archive data 727b6cee71dSXin LI# SBC 728b6cee71dSXin LI0 string SBC SBC archive data 729b6cee71dSXin LI# Ybs 730b6cee71dSXin LI0 string YBS Ybs archive data 731b6cee71dSXin LI# DitPack 732b6cee71dSXin LI0 string \x9e\0\0 DitPack archive data 733b6cee71dSXin LI# DMS 734b6cee71dSXin LI0 string DMS! DMS archive data 735b6cee71dSXin LI# EPC 736b6cee71dSXin LI0 string \x8f\xaf\xac\x8c EPC archive data 737b6cee71dSXin LI# VSARC 738b6cee71dSXin LI0 string VS\x1a VSARC archive data 739b6cee71dSXin LI# PDZ 740b6cee71dSXin LI0 string PDZ PDZ archive data 741b6cee71dSXin LI# ReDuq 742b6cee71dSXin LI0 string rdqx ReDuq archive data 743b6cee71dSXin LI# GCA 744b6cee71dSXin LI0 string GCAX GCA archive data 745b6cee71dSXin LI# PPMN 746b6cee71dSXin LI0 string pN PPMN archive data 747b6cee71dSXin LI# WinImage 748b6cee71dSXin LI3 string WINIMAGE WinImage archive data 749b6cee71dSXin LI# Compressia 750b6cee71dSXin LI0 string CMP0CMP Compressia archive data 751b6cee71dSXin LI# UHBC 752b6cee71dSXin LI0 string UHB UHBC archive data 753b6cee71dSXin LI# WinHKI 754b6cee71dSXin LI0 string \x61\x5C\x04\x05 WinHKI archive data 755b6cee71dSXin LI# WWPack data file 756b6cee71dSXin LI0 string WWP WWPack archive data 757b6cee71dSXin LI# BSN (BSA, PTS-DOS) 758b6cee71dSXin LI0 string \xffBSG BSN archive data 759b6cee71dSXin LI1 string \xffBSG BSN archive data 760b6cee71dSXin LI3 string \xffBSG BSN archive data 761b6cee71dSXin LI1 string \0\xae\2 BSN archive data 762b6cee71dSXin LI1 string \0\xae\3 BSN archive data 763b6cee71dSXin LI1 string \0\xae\7 BSN archive data 764b6cee71dSXin LI# AIN 765b6cee71dSXin LI0 string \x33\x18 AIN archive data 766b6cee71dSXin LI0 string \x33\x17 AIN archive data 7679ce06829SXin LI# XPA32 test moved and merged with XPA by Joerg Jenderek at Sep 2015 768b6cee71dSXin LI# SZip (TODO: doesn't catch all versions) 769b6cee71dSXin LI0 string SZ\x0a\4 SZip archive data 770b6cee71dSXin LI# XPack DiskImage 7719ce06829SXin LI# *.XDI updated by Joerg Jenderek Sep 2015 7729ce06829SXin LI# ftp://ftp.sac.sk/pub/sac/pack/0index.txt 7739ce06829SXin LI# GRR: this test is still too general as it catches also text files starting with jm 7749ce06829SXin LI0 string jm 7759ce06829SXin LI# only found examples with this additional characteristic 2 bytes 7769ce06829SXin LI>2 string \x2\x4 Xpack DiskImage archive data 7779ce06829SXin LI#!:ext xdi 778b6cee71dSXin LI# XPack Data 7799ce06829SXin LI# *.xpa updated by Joerg Jenderek Sep 2015 7809ce06829SXin LI# ftp://ftp.elf.stuba.sk/pub/pc/pack/ 7819ce06829SXin LI0 string xpa XPA 7829ce06829SXin LI!:ext xpa 7839ce06829SXin LI# XPA32 7849ce06829SXin LI# ftp://ftp.elf.stuba.sk/pub/pc/pack/xpa32.zip 7859ce06829SXin LI# created by XPA32.EXE version 1.0.2 for Windows 7869ce06829SXin LI>0 string xpa\0\1 \b32 archive data 7879ce06829SXin LI# created by XPACK.COM version 1.67m or 1.67r with short 0x1800 7889ce06829SXin LI>3 ubeshort !0x0001 \bck archive data 789b6cee71dSXin LI# XPack Single Data 7909ce06829SXin LI# changed by Joerg Jenderek Sep 2015 back to like in version 5.12 7919ce06829SXin LI# letter 'I'+ acute accent is equivalent to \xcd 7929ce06829SXin LI0 string \xcd\ jm Xpack single archive data 7939ce06829SXin LI#!:mime application/x-xpa-compressed 7949ce06829SXin LI!:ext xpa 795b6cee71dSXin LI 796b6cee71dSXin LI# TODO: missing due to unknown magic/magic at end of file: 797b6cee71dSXin LI#DWC 798b6cee71dSXin LI#ARG 799b6cee71dSXin LI#ZAR 800b6cee71dSXin LI#PC/3270 801b6cee71dSXin LI#InstallIt 802b6cee71dSXin LI#RKive 803b6cee71dSXin LI#RK 804b6cee71dSXin LI#XPack Diskimage 805b6cee71dSXin LI 806b6cee71dSXin LI# These were inspired by idarc, but actually verified 807b6cee71dSXin LI# Dzip archiver (.dz) 80858a0f0d0SEitan Adler# Update: Joerg Jenderek 80958a0f0d0SEitan Adler# URL: http://speeddemosarchive.com/dzip/ 81058a0f0d0SEitan Adler# reference: http://speeddemosarchive.com/dzip/dz29src.zip/main.c 81158a0f0d0SEitan Adler# GRR: line below is too general as it matches also ASCII texts like Doszip commander help dz.txt 81258a0f0d0SEitan Adler0 string DZ 81358a0f0d0SEitan Adler# latest version is 2.9 dated 7 may 2003 81458a0f0d0SEitan Adler>2 byte <4 Dzip archive data 81558a0f0d0SEitan Adler!:mime application/x-dzip 81658a0f0d0SEitan Adler!:ext dz 81758a0f0d0SEitan Adler>>2 byte x \b, version %i 81858a0f0d0SEitan Adler>>3 byte x \b.%i 81958a0f0d0SEitan Adler>>4 ulelong x \b, offset 0x%x 82058a0f0d0SEitan Adler>>8 ulelong x \b, %u files 821b6cee71dSXin LI# ZZip archiver (.zz) 822b6cee71dSXin LI0 string ZZ\ \0\0 ZZip archive data 823b6cee71dSXin LI0 string ZZ0 ZZip archive data 824b6cee71dSXin LI# PAQ archiver (.paq) 825b6cee71dSXin LI0 string \xaa\x40\x5f\x77\x1f\xe5\x82\x0d PAQ archive data 826b6cee71dSXin LI0 string PAQ PAQ archive data 827b6cee71dSXin LI>3 byte&0xf0 0x30 828b6cee71dSXin LI>>3 byte x (v%c) 829b6cee71dSXin LI# JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP) 830b6cee71dSXin LI0xe string \x1aJar\x1b JAR (ARJ Software, Inc.) archive data 831b6cee71dSXin LI0 string JARCS JAR (ARJ Software, Inc.) archive data 832b6cee71dSXin LI 833b6cee71dSXin LI# ARJ archiver (jason@jarthur.Claremont.EDU) 834b6cee71dSXin LI0 leshort 0xea60 ARJ archive data 835b6cee71dSXin LI!:mime application/x-arj 836b6cee71dSXin LI>5 byte x \b, v%d, 837b6cee71dSXin LI>8 byte &0x04 multi-volume, 838b6cee71dSXin LI>8 byte &0x10 slash-switched, 839b6cee71dSXin LI>8 byte &0x20 backup, 840b6cee71dSXin LI>34 string x original name: %s, 841b6cee71dSXin LI>7 byte 0 os: MS-DOS 842b6cee71dSXin LI>7 byte 1 os: PRIMOS 843b6cee71dSXin LI>7 byte 2 os: Unix 844b6cee71dSXin LI>7 byte 3 os: Amiga 845b6cee71dSXin LI>7 byte 4 os: Macintosh 846b6cee71dSXin LI>7 byte 5 os: OS/2 847b6cee71dSXin LI>7 byte 6 os: Apple ][ GS 848b6cee71dSXin LI>7 byte 7 os: Atari ST 849b6cee71dSXin LI>7 byte 8 os: NeXT 850b6cee71dSXin LI>7 byte 9 os: VAX/VMS 851b6cee71dSXin LI>3 byte >0 %d] 852b6cee71dSXin LI# [JW] idarc says this is also possible 853b6cee71dSXin LI2 leshort 0xea60 ARJ archive data 854b6cee71dSXin LI 855b6cee71dSXin LI# HA archiver (Greg Roelofs, newt@uchicago.edu) 856b6cee71dSXin LI# This is a really bad format. A file containing HAWAII will match this... 857b6cee71dSXin LI#0 string HA HA archive data, 858b6cee71dSXin LI#>2 leshort =1 1 file, 859b6cee71dSXin LI#>2 leshort >1 %hu files, 860b6cee71dSXin LI#>4 byte&0x0f =0 first is type CPY 861b6cee71dSXin LI#>4 byte&0x0f =1 first is type ASC 862b6cee71dSXin LI#>4 byte&0x0f =2 first is type HSC 863b6cee71dSXin LI#>4 byte&0x0f =0x0e first is type DIR 864b6cee71dSXin LI#>4 byte&0x0f =0x0f first is type SPECIAL 865b6cee71dSXin LI# suggestion: at least identify small archives (<1024 files) 866b6cee71dSXin LI0 belong&0xffff00fc 0x48410000 HA archive data 867b6cee71dSXin LI>2 leshort =1 1 file, 868b6cee71dSXin LI>2 leshort >1 %u files, 869b6cee71dSXin LI>4 byte&0x0f =0 first is type CPY 870b6cee71dSXin LI>4 byte&0x0f =1 first is type ASC 871b6cee71dSXin LI>4 byte&0x0f =2 first is type HSC 872b6cee71dSXin LI>4 byte&0x0f =0x0e first is type DIR 873b6cee71dSXin LI>4 byte&0x0f =0x0f first is type SPECIAL 874b6cee71dSXin LI 875b6cee71dSXin LI# HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz) 876b6cee71dSXin LI0 string HPAK HPACK archive data 877b6cee71dSXin LI 878b6cee71dSXin LI# JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net 879b6cee71dSXin LI0 string \351,\001JAM\ JAM archive, 880b6cee71dSXin LI>7 string >\0 version %.4s 881b6cee71dSXin LI>0x26 byte =0x27 - 882b6cee71dSXin LI>>0x2b string >\0 label %.11s, 883b6cee71dSXin LI>>0x27 lelong x serial %08x, 884b6cee71dSXin LI>>0x36 string >\0 fstype %.8s 885b6cee71dSXin LI 886b6cee71dSXin LI# LHARC/LHA archiver (Greg Roelofs, newt@uchicago.edu) 8873e41d09dSXin LI# Update: Joerg Jenderek 8883e41d09dSXin LI# URL: https://en.wikipedia.org/wiki/LHA_(file_format) 88948c779cdSXin LI# Reference: https://web.archive.org/web/20021005080911/http://www.osirusoft.com/joejared/lzhformat.html 8903e41d09dSXin LI# 8913e41d09dSXin LI# check and display information of lharc (LHa,PMarc) file 8923e41d09dSXin LI0 name lharc-file 8933e41d09dSXin LI# check 1st character of method id like -lz4- -lh5- or -pm2- 8943e41d09dSXin LI>2 string - 8953e41d09dSXin LI# check 5th character of method id 8963e41d09dSXin LI>>6 string - 8973e41d09dSXin LI# check header level 0 1 2 3 8983e41d09dSXin LI>>>20 ubyte <4 8993e41d09dSXin LI# check 2nd, 3th and 4th character of method id 9003e41d09dSXin LI>>>>3 regex \^(lh[0-9a-ex]|lz[s2-8]|pm[012]|pc1) \b 9013e41d09dSXin LI!:mime application/x-lzh-compressed 9023e41d09dSXin LI# creator type "LHA " 9033e41d09dSXin LI!:apple ????LHA 9043e41d09dSXin LI# display archive type name like "LHa/LZS archive data" or "LArc archive" 9053e41d09dSXin LI>>>>>2 string -lz \b 9063e41d09dSXin LI!:ext lzs 9073e41d09dSXin LI# already known -lzs- -lz4- -lz5- with old names 9083e41d09dSXin LI>>>>>>2 string -lzs LHa/LZS archive data 9093e41d09dSXin LI>>>>>>3 regex \^lz[45] LHarc 1.x archive data 9103e41d09dSXin LI# missing -lz?- with wikipedia names 9113e41d09dSXin LI>>>>>>3 regex \^lz[2378] LArc archive 9123e41d09dSXin LI# display archive type name like "LHa (2.x) archive data" 9133e41d09dSXin LI>>>>>2 string -lh \b 9143e41d09dSXin LI# already known -lh0- -lh1- -lh2- -lh3- -lh4- -lh5- -lh6- -lh7- -lhd- variants with old names 9153e41d09dSXin LI>>>>>>3 regex \^lh[01] LHarc 1.x/ARX archive data 9163e41d09dSXin LI# LHice archiver use ".ICE" as name extension instead usual one ".lzh" 9173e41d09dSXin LI# FOOBAR archiver use ".foo" as name extension instead usual one 9183e41d09dSXin LI# "Florain Orjanov's and Olga Bachetska's ARchiver" not found at the moment 9193e41d09dSXin LI>>>>>>>2 string -lh1 \b 9203e41d09dSXin LI!:ext lha/lzh/ice 9213e41d09dSXin LI>>>>>>3 regex \^lh[23d] LHa 2.x? archive data 9223e41d09dSXin LI>>>>>>3 regex \^lh[7] LHa (2.x)/LHark archive data 9233e41d09dSXin LI>>>>>>3 regex \^lh[456] LHa (2.x) archive data 9243e41d09dSXin LI>>>>>>>2 string -lh5 \b 9253e41d09dSXin LI# https://en.wikipedia.org/wiki/BIOS 9263e41d09dSXin LI# Some mainboard BIOS like Award use LHa compression. So archives with unusal extension are found like 9273e41d09dSXin LI# bios.rom , kd7_v14.bin, 1010.004, ... 9283e41d09dSXin LI!:ext lha/lzh/rom/bin 9293e41d09dSXin LI# missing -lh?- variants (Joe Jared) 9303e41d09dSXin LI>>>>>>3 regex \^lh[89a-ce] LHa (Joe Jared) archive 9313e41d09dSXin LI# UNLHA32 2.67a 9323e41d09dSXin LI>>>>>>2 string -lhx LHa (UNLHA32) archive 9333e41d09dSXin LI# lha archives with standard file name extensions ".lha" ".lzh" 9343e41d09dSXin LI>>>>>>3 regex !\^(lh1|lh5) \b 9353e41d09dSXin LI!:ext lha/lzh 9363e41d09dSXin LI# this should not happen if all -lh variants are described 9373e41d09dSXin LI>>>>>>2 default x LHa (unknown) archive 9383e41d09dSXin LI#!:ext lha 9393e41d09dSXin LI# PMarc 9403e41d09dSXin LI>>>>>3 regex \^pm[012] PMarc archive data 9413e41d09dSXin LI!:ext pma 9423e41d09dSXin LI# append method id without leading and trailing minus character 9433e41d09dSXin LI>>>>>3 string x [%3.3s] 9443e41d09dSXin LI>>>>>>0 use lharc-header 9453e41d09dSXin LI# 9463e41d09dSXin LI# check and display information of lharc header 9473e41d09dSXin LI0 name lharc-header 9483e41d09dSXin LI# header size 0x4 , 0x1b-0x61 9493e41d09dSXin LI>0 ubyte x 9503e41d09dSXin LI# compressed data size != compressed file size 9513e41d09dSXin LI#>7 ulelong x \b, data size %d 9523e41d09dSXin LI# attribute: 0x2~?? 0x10~symlink|target 0x20~normal 9533e41d09dSXin LI#>19 ubyte x \b, 19_0x%x 9543e41d09dSXin LI# level identifier 0 1 2 3 9553e41d09dSXin LI#>20 ubyte x \b, level %d 9563e41d09dSXin LI# time stamp 9573e41d09dSXin LI#>15 ubelong x DATE 0x%8.8x 9583e41d09dSXin LI# OS ID for level 1 9593e41d09dSXin LI>20 ubyte 1 9603e41d09dSXin LI# 0x20 types find for *.rom files 9613e41d09dSXin LI>>(21.b+24) ubyte <0x21 \b, 0x%x OS 9623e41d09dSXin LI# ascii type like M for MSDOS 9633e41d09dSXin LI>>(21.b+24) ubyte >0x20 \b, '%c' OS 9643e41d09dSXin LI# OS ID for level 2 9653e41d09dSXin LI>20 ubyte 2 9663e41d09dSXin LI#>>23 ubyte x \b, OS ID 0x%x 9673e41d09dSXin LI>>23 ubyte <0x21 \b, 0x%x OS 9683e41d09dSXin LI>>23 ubyte >0x20 \b, '%c' OS 9693e41d09dSXin LI# filename only for level 0 and 1 9703e41d09dSXin LI>20 ubyte <2 9713e41d09dSXin LI# length of filename 9723e41d09dSXin LI>>21 ubyte >0 \b, with 9733e41d09dSXin LI# filename 9743e41d09dSXin LI>>>21 pstring x "%s" 9753e41d09dSXin LI# 9763e41d09dSXin LI#2 string -lh0- LHarc 1.x/ARX archive data [lh0] 9773e41d09dSXin LI#!:mime application/x-lharc 9783e41d09dSXin LI2 string -lh0- 9793e41d09dSXin LI>0 use lharc-file 9803e41d09dSXin LI#2 string -lh1- LHarc 1.x/ARX archive data [lh1] 9813e41d09dSXin LI#!:mime application/x-lharc 9823e41d09dSXin LI2 string -lh1- 9833e41d09dSXin LI>0 use lharc-file 9843e41d09dSXin LI# NEW -lz2- ... -lz8- 9853e41d09dSXin LI2 string -lz2- 9863e41d09dSXin LI>0 use lharc-file 9873e41d09dSXin LI2 string -lz3- 9883e41d09dSXin LI>0 use lharc-file 9893e41d09dSXin LI2 string -lz4- 9903e41d09dSXin LI>0 use lharc-file 9913e41d09dSXin LI2 string -lz5- 9923e41d09dSXin LI>0 use lharc-file 9933e41d09dSXin LI2 string -lz7- 9943e41d09dSXin LI>0 use lharc-file 9953e41d09dSXin LI2 string -lz8- 9963e41d09dSXin LI>0 use lharc-file 997b6cee71dSXin LI# [never seen any but the last; -lh4- reported in comp.compression:] 9983e41d09dSXin LI#2 string -lzs- LHa/LZS archive data [lzs] 9993e41d09dSXin LI2 string -lzs- 10003e41d09dSXin LI>0 use lharc-file 10013e41d09dSXin LI# According to wikipedia and others such a version does not exist 10023e41d09dSXin LI#2 string -lh\40- LHa 2.x? archive data [lh ] 10033e41d09dSXin LI#2 string -lhd- LHa 2.x? archive data [lhd] 10043e41d09dSXin LI2 string -lhd- 10053e41d09dSXin LI>0 use lharc-file 10063e41d09dSXin LI#2 string -lh2- LHa 2.x? archive data [lh2] 10073e41d09dSXin LI2 string -lh2- 10083e41d09dSXin LI>0 use lharc-file 10093e41d09dSXin LI#2 string -lh3- LHa 2.x? archive data [lh3] 10103e41d09dSXin LI2 string -lh3- 10113e41d09dSXin LI>0 use lharc-file 10123e41d09dSXin LI#2 string -lh4- LHa (2.x) archive data [lh4] 10133e41d09dSXin LI2 string -lh4- 10143e41d09dSXin LI>0 use lharc-file 10153e41d09dSXin LI#2 string -lh5- LHa (2.x) archive data [lh5] 10163e41d09dSXin LI2 string -lh5- 10173e41d09dSXin LI>0 use lharc-file 10183e41d09dSXin LI#2 string -lh6- LHa (2.x) archive data [lh6] 10193e41d09dSXin LI2 string -lh6- 10203e41d09dSXin LI>0 use lharc-file 10213e41d09dSXin LI#2 string -lh7- LHa (2.x)/LHark archive data [lh7] 10223e41d09dSXin LI2 string -lh7- 10233e41d09dSXin LI# !:mime application/x-lha 10243e41d09dSXin LI# >20 byte x - header level %d 10253e41d09dSXin LI>0 use lharc-file 10263e41d09dSXin LI# NEW -lh8- ... -lhe- , -lhx- 10273e41d09dSXin LI2 string -lh8- 10283e41d09dSXin LI>0 use lharc-file 10293e41d09dSXin LI2 string -lh9- 10303e41d09dSXin LI>0 use lharc-file 10313e41d09dSXin LI2 string -lha- 10323e41d09dSXin LI>0 use lharc-file 10333e41d09dSXin LI2 string -lhb- 10343e41d09dSXin LI>0 use lharc-file 10353e41d09dSXin LI2 string -lhc- 10363e41d09dSXin LI>0 use lharc-file 10373e41d09dSXin LI2 string -lhe- 10383e41d09dSXin LI>0 use lharc-file 10393e41d09dSXin LI2 string -lhx- 10403e41d09dSXin LI>0 use lharc-file 1041b6cee71dSXin LI# taken from idarc [JW] 1042b6cee71dSXin LI2 string -lZ PUT archive data 10433e41d09dSXin LI# already done by LHarc magics 10443e41d09dSXin LI# this should never happen if all sub types of LZS archive are identified 10453e41d09dSXin LI#2 string -lz LZS archive data 1046b6cee71dSXin LI2 string -sw1- Swag archive data 1047b6cee71dSXin LI 10483e41d09dSXin LI0 name rar-file-header 10493e41d09dSXin LI>24 byte 15 \b, v1.5 10503e41d09dSXin LI>24 byte 20 \b, v2.0 10513e41d09dSXin LI>24 byte 29 \b, v4 10523e41d09dSXin LI>15 byte 0 \b, os: MS-DOS 10533e41d09dSXin LI>15 byte 1 \b, os: OS/2 10543e41d09dSXin LI>15 byte 2 \b, os: Win32 10553e41d09dSXin LI>15 byte 3 \b, os: Unix 10563e41d09dSXin LI>15 byte 4 \b, os: Mac OS 10573e41d09dSXin LI>15 byte 5 \b, os: BeOS 10583e41d09dSXin LI 10593e41d09dSXin LI0 name rar-archive-header 10603e41d09dSXin LI>3 leshort&0x1ff >0 \b, flags: 10613e41d09dSXin LI>>3 leshort &0x01 ArchiveVolume 10623e41d09dSXin LI>>3 leshort &0x02 Commented 10633e41d09dSXin LI>>3 leshort &0x04 Locked 10643e41d09dSXin LI>>3 leshort &0x10 NewVolumeNaming 10653e41d09dSXin LI>>3 leshort &0x08 Solid 10663e41d09dSXin LI>>3 leshort &0x20 Authenticated 10673e41d09dSXin LI>>3 leshort &0x40 RecoveryRecordPresent 10683e41d09dSXin LI>>3 leshort &0x80 EncryptedBlockHeader 10693e41d09dSXin LI>>3 leshort &0x100 FirstVolume 10703e41d09dSXin LI 10713e41d09dSXin LI# RAR (Roshal Archive) archive 10723e41d09dSXin LI0 string Rar!\x1a\7\0 RAR archive data 1073b6cee71dSXin LI!:mime application/x-rar 10743e41d09dSXin LI!:ext rar/cbr 10753e41d09dSXin LI# file header 10763e41d09dSXin LI>(0xc.l+9) byte 0x74 10773e41d09dSXin LI>>(0xc.l+7) use rar-file-header 10783e41d09dSXin LI# subblock seems to share information with file header 10793e41d09dSXin LI>(0xc.l+9) byte 0x7a 10803e41d09dSXin LI>>(0xc.l+7) use rar-file-header 10813e41d09dSXin LI>9 byte 0x73 10823e41d09dSXin LI>>7 use rar-archive-header 10833e41d09dSXin LI 10843e41d09dSXin LI0 string Rar!\x1a\7\1\0 RAR archive data, v5 10853e41d09dSXin LI!:mime application/x-rar 10863e41d09dSXin LI!:ext rar 10873e41d09dSXin LI 10883e41d09dSXin LI# Very old RAR archive 108948c779cdSXin LI# https://jasonblanks.com/wp-includes/images/papers/KnowyourarchiveRAR.pdf 10903e41d09dSXin LI0 string RE\x7e\x5e RAR archive data (<v1.5) 10913e41d09dSXin LI!:mime application/x-rar 10923e41d09dSXin LI!:ext rar/cbr 1093b6cee71dSXin LI 1094b6cee71dSXin LI# SQUISH archiver (Greg Roelofs, newt@uchicago.edu) 1095b6cee71dSXin LI0 string SQSH squished archive data (Acorn RISCOS) 1096b6cee71dSXin LI 1097b6cee71dSXin LI# UC2 archiver (Greg Roelofs, newt@uchicago.edu) 1098b6cee71dSXin LI# [JW] see exe section for self-extracting version 1099b6cee71dSXin LI0 string UC2\x1a UC2 archive data 1100b6cee71dSXin LI 1101b6cee71dSXin LI# PKZIP multi-volume archive 1102b6cee71dSXin LI0 string PK\x07\x08PK\x03\x04 Zip multi-volume archive data, at least PKZIP v2.50 to extract 1103b6cee71dSXin LI!:mime application/zip 11043e41d09dSXin LI!:ext zip/cbz 1105b6cee71dSXin LI 1106b6cee71dSXin LI# Zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) 1107b6cee71dSXin LI0 string PK\005\006 Zip archive data (empty) 11083e41d09dSXin LI!:mime application/zip 11093e41d09dSXin LI!:ext zip/cbz 111048c779cdSXin LI!:strength +1 1111b6cee71dSXin LI0 string PK\003\004 111248c779cdSXin LI!:strength +1 1113b6cee71dSXin LI 1114b6cee71dSXin LI# Specialised zip formats which start with a member named 'mimetype' 1115b6cee71dSXin LI# (stored uncompressed, with no 'extra field') containing the file's MIME type. 1116b6cee71dSXin LI# Check for have 8-byte name, 0-byte extra field, name "mimetype", and 1117b6cee71dSXin LI# contents starting with "application/": 1118b6cee71dSXin LI>26 string \x8\0\0\0mimetypeapplication/ 1119b6cee71dSXin LI 1120b6cee71dSXin LI# KOffice / OpenOffice & StarOffice / OpenDocument formats 1121b6cee71dSXin LI# From: Abel Cheung <abel@oaka.org> 1122b6cee71dSXin LI 1123b6cee71dSXin LI# KOffice (1.2 or above) formats 1124b6cee71dSXin LI# (mimetype contains "application/vnd.kde.<SUBTYPE>") 1125b6cee71dSXin LI>>50 string vnd.kde. KOffice (>=1.2) 1126b6cee71dSXin LI>>>58 string karbon Karbon document 1127b6cee71dSXin LI>>>58 string kchart KChart document 1128b6cee71dSXin LI>>>58 string kformula KFormula document 1129b6cee71dSXin LI>>>58 string kivio Kivio document 1130b6cee71dSXin LI>>>58 string kontour Kontour document 1131b6cee71dSXin LI>>>58 string kpresenter KPresenter document 1132b6cee71dSXin LI>>>58 string kspread KSpread document 1133b6cee71dSXin LI>>>58 string kword KWord document 1134b6cee71dSXin LI 1135b6cee71dSXin LI# OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7) 1136b6cee71dSXin LI# (mimetype contains "application/vnd.sun.xml.<SUBTYPE>") 1137*2726a701SXin LI# URL: https://en.wikipedia.org/wiki/OpenOffice.org_XML 1138*2726a701SXin LI# reference: http://fileformats.archiveteam.org/wiki/OpenOffice.org_XML 1139b6cee71dSXin LI>>50 string vnd.sun.xml. OpenOffice.org 1.x 1140b6cee71dSXin LI>>>62 string writer Writer 1141b6cee71dSXin LI>>>>68 byte !0x2e document 1142*2726a701SXin LI!:mime application/vnd.sun.xml.writer 1143*2726a701SXin LI!:ext sxw 1144b6cee71dSXin LI>>>>68 string .template template 1145*2726a701SXin LI!:mime application/vnd.sun.xml.writer.template 1146*2726a701SXin LI!:ext stw 1147*2726a701SXin LI>>>>68 string .web Web template 1148*2726a701SXin LI!:mime application/vnd.sun.xml.writer.web 1149*2726a701SXin LI!:ext stw 1150b6cee71dSXin LI>>>>68 string .global global document 1151*2726a701SXin LI!:mime application/vnd.sun.xml.writer.global 1152*2726a701SXin LI!:ext sxg 1153b6cee71dSXin LI>>>62 string calc Calc 1154b6cee71dSXin LI>>>>66 byte !0x2e spreadsheet 1155*2726a701SXin LI!:mime application/vnd.sun.xml.calc 1156*2726a701SXin LI!:ext sxc 1157b6cee71dSXin LI>>>>66 string .template template 1158*2726a701SXin LI!:mime application/vnd.sun.xml.calc.template 1159*2726a701SXin LI!:ext stc 1160b6cee71dSXin LI>>>62 string draw Draw 1161b6cee71dSXin LI>>>>66 byte !0x2e document 1162*2726a701SXin LI!:mime application/vnd.sun.xml.draw 1163*2726a701SXin LI!:ext sxd 1164b6cee71dSXin LI>>>>66 string .template template 1165*2726a701SXin LI!:mime application/vnd.sun.xml.draw.template 1166*2726a701SXin LI!:ext std 1167b6cee71dSXin LI>>>62 string impress Impress 1168b6cee71dSXin LI>>>>69 byte !0x2e presentation 1169*2726a701SXin LI!:mime application/vnd.sun.xml.impress 1170*2726a701SXin LI!:ext sxi 1171b6cee71dSXin LI>>>>69 string .template template 1172*2726a701SXin LI!:mime application/vnd.sun.xml.impress.template 1173*2726a701SXin LI!:ext sti 1174b6cee71dSXin LI>>>62 string math Math document 1175*2726a701SXin LI!:mime application/vnd.sun.xml.math 1176*2726a701SXin LI!:ext sxm 1177b6cee71dSXin LI>>>62 string base Database file 1178*2726a701SXin LI!:mime application/vnd.sun.xml.base 1179*2726a701SXin LI!:ext sdb 1180b6cee71dSXin LI 1181b6cee71dSXin LI# OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8) 1182*2726a701SXin LI# URL: http://fileformats.archiveteam.org/wiki/OpenDocument 118348c779cdSXin LI# https://lists.oasis-open.org/archives/office/200505/msg00006.html 1184b6cee71dSXin LI# (mimetype contains "application/vnd.oasis.opendocument.<SUBTYPE>") 1185b6cee71dSXin LI>>50 string vnd.oasis.opendocument. OpenDocument 1186b6cee71dSXin LI>>>73 string text 1187b6cee71dSXin LI>>>>77 byte !0x2d Text 1188b6cee71dSXin LI!:mime application/vnd.oasis.opendocument.text 1189*2726a701SXin LI!:ext odt 1190b6cee71dSXin LI>>>>77 string -template Text Template 1191b6cee71dSXin LI!:mime application/vnd.oasis.opendocument.text-template 1192*2726a701SXin LI!:ext ott 1193b6cee71dSXin LI>>>>77 string -web HTML Document Template 1194b6cee71dSXin LI!:mime application/vnd.oasis.opendocument.text-web 1195*2726a701SXin LI!:ext oth 1196b6cee71dSXin LI>>>>77 string -master Master Document 1197b6cee71dSXin LI!:mime application/vnd.oasis.opendocument.text-master 1198*2726a701SXin LI!:ext odm 1199b6cee71dSXin LI>>>73 string graphics 1200b6cee71dSXin LI>>>>81 byte !0x2d Drawing 1201b6cee71dSXin LI!:mime application/vnd.oasis.opendocument.graphics 1202*2726a701SXin LI!:ext odg 1203*2726a701SXin LI>>>>81 string -template Drawing Template 1204b6cee71dSXin LI!:mime application/vnd.oasis.opendocument.graphics-template 1205*2726a701SXin LI!:ext otg 1206b6cee71dSXin LI>>>73 string presentation 1207b6cee71dSXin LI>>>>85 byte !0x2d Presentation 1208b6cee71dSXin LI!:mime application/vnd.oasis.opendocument.presentation 1209*2726a701SXin LI!:ext odp 1210*2726a701SXin LI>>>>85 string -template Presentation Template 1211b6cee71dSXin LI!:mime application/vnd.oasis.opendocument.presentation-template 1212*2726a701SXin LI!:ext otp 1213b6cee71dSXin LI>>>73 string spreadsheet 1214b6cee71dSXin LI>>>>84 byte !0x2d Spreadsheet 1215b6cee71dSXin LI!:mime application/vnd.oasis.opendocument.spreadsheet 1216*2726a701SXin LI!:ext ods 1217*2726a701SXin LI>>>>84 string -template Spreadsheet Template 1218b6cee71dSXin LI!:mime application/vnd.oasis.opendocument.spreadsheet-template 1219*2726a701SXin LI!:ext ots 1220b6cee71dSXin LI>>>73 string chart 1221b6cee71dSXin LI>>>>78 byte !0x2d Chart 1222b6cee71dSXin LI!:mime application/vnd.oasis.opendocument.chart 1223*2726a701SXin LI!:ext odc 1224*2726a701SXin LI>>>>78 string -template Chart Template 1225b6cee71dSXin LI!:mime application/vnd.oasis.opendocument.chart-template 1226*2726a701SXin LI!:ext otc 1227b6cee71dSXin LI>>>73 string formula 1228b6cee71dSXin LI>>>>80 byte !0x2d Formula 1229b6cee71dSXin LI!:mime application/vnd.oasis.opendocument.formula 1230*2726a701SXin LI!:ext odf 1231*2726a701SXin LI>>>>80 string -template Formula Template 1232b6cee71dSXin LI!:mime application/vnd.oasis.opendocument.formula-template 1233*2726a701SXin LI!:ext otf 1234*2726a701SXin LI# https://www.loc.gov/preservation/digital/formats/fdd/fdd000441.shtml 1235b6cee71dSXin LI>>>73 string database Database 1236b6cee71dSXin LI!:mime application/vnd.oasis.opendocument.database 1237*2726a701SXin LI!:ext odb 123858a0f0d0SEitan Adler# Valid for LibreOffice Base 6.0.1.1 at least 123958a0f0d0SEitan Adler>>>73 string base Database 1240*2726a701SXin LI# https://bugs.documentfoundation.org/show_bug.cgi?id=45854 1241*2726a701SXin LI!:mime application/vnd.oasis.opendocument.database 1242*2726a701SXin LI#!:mime application/vnd.oasis.opendocument.base 1243*2726a701SXin LI!:ext odb 1244b6cee71dSXin LI>>>73 string image 1245b6cee71dSXin LI>>>>78 byte !0x2d Image 1246b6cee71dSXin LI!:mime application/vnd.oasis.opendocument.image 1247*2726a701SXin LI!:ext odi 1248*2726a701SXin LI>>>>78 string -template Image Template 1249b6cee71dSXin LI!:mime application/vnd.oasis.opendocument.image-template 1250*2726a701SXin LI!:ext oti 1251b6cee71dSXin LI 1252b6cee71dSXin LI# EPUB (OEBPS) books using OCF (OEBPS Container Format) 125348c779cdSXin LI# https://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4. 1254b6cee71dSXin LI# From: Ralf Brown <ralf.brown@gmail.com> 1255b6cee71dSXin LI>>50 string epub+zip EPUB document 1256b6cee71dSXin LI!:mime application/epub+zip 1257b6cee71dSXin LI 1258d38c30c0SXin LI# From: Joerg Jenderek 1259d38c30c0SXin LI# URL: http://en.wikipedia.org/wiki/CorelDRAW 1260d38c30c0SXin LI# NOTE: version; til 2 WL-based; from 3 til 13 by ./riff; from 14 zip based 1261d38c30c0SXin LI>>50 string x-vnd.corel. Corel 1262d38c30c0SXin LI>>>62 string draw.document+zip Draw drawing, version 14-16 1263d38c30c0SXin LI!:mime application/x-vnd.corel.draw.document+zip 1264d38c30c0SXin LI!:ext cdr 1265d38c30c0SXin LI>>>62 string draw.template+zip Draw template, version 14-16 1266d38c30c0SXin LI!:mime application/x-vnd.corel.draw.template+zip 1267d38c30c0SXin LI!:ext cdrt 1268*2726a701SXin LI>>>62 string zcf.draw.document+zip Draw drawing, version 17-22 1269d38c30c0SXin LI!:mime application/x-vnd.corel.zcf.draw.document+zip 1270d38c30c0SXin LI!:ext cdr 1271*2726a701SXin LI>>>62 string zcf.draw.template+zip Draw template, version 17-22 1272d38c30c0SXin LI!:mime application/x-vnd.corel.zcf.draw.template+zip 1273d38c30c0SXin LI!:ext cdt/cdrt 1274*2726a701SXin LI# URL: http://product.corel.com/help/CorelDRAW/540240626/Main/EN/Doc/CorelDRAW-Other-file-formats.html 1275*2726a701SXin LI>>>62 string zcf.pattern+zip Draw pattern, version 22 1276*2726a701SXin LI!:mime application/x-vnd.corel.zcf.pattern+zip 1277*2726a701SXin LI!:ext pat 1278*2726a701SXin LI# URL: https://en.wikipedia.org/wiki/Corel_Designer 1279*2726a701SXin LI# Reference: http://fileformats.archiveteam.org/wiki/Corel_Designer 1280*2726a701SXin LI# Note: called by TrID "Corel DESIGN graphics" 1281*2726a701SXin LI>>>62 string designer.document+zip DESIGNER graphics, version 14-16 1282*2726a701SXin LI!:mime application/x-vnd.corel.designer.document+zip 1283*2726a701SXin LI!:ext des 1284*2726a701SXin LI>>>62 string zcf.designer.document+zip DESIGNER graphics, version 17-21 1285*2726a701SXin LI!:mime application/x-vnd.corel.zcf.designer.document+zip 1286*2726a701SXin LI!:ext des 1287*2726a701SXin LI# URL: http://product.corel.com/help/CorelDRAW/540223850/Main/EN/Documentation/ 1288*2726a701SXin LI# CorelDRAW-Corel-Symbol-Library-CSL.html 1289*2726a701SXin LI>>>62 string symbol.library+zip Symbol Library, version 6-16.3 1290*2726a701SXin LI!:mime application/x-vnd.corel.symbol.library+zip 1291*2726a701SXin LI!:ext csl 1292*2726a701SXin LI>>>62 string zcf.symbol.library+zip Symbol Library, version 17-22 1293*2726a701SXin LI!:mime application/x-vnd.corel.zcf.symbol.library+zip 1294*2726a701SXin LI!:ext csl 1295d38c30c0SXin LI 1296b6cee71dSXin LI# Catch other ZIP-with-mimetype formats 1297b6cee71dSXin LI# In a ZIP file, the bytes immediately after a member's contents are 1298b6cee71dSXin LI# always "PK". The 2 regex rules here print the "mimetype" member's 1299b6cee71dSXin LI# contents up to the first 'P'. Luckily, most MIME types don't contain 1300b6cee71dSXin LI# any capital 'P's. This is a kludge. 1301b6cee71dSXin LI# (mimetype contains "application/<OTHER>") 1302d38c30c0SXin LI>>50 default x Zip data 1303d38c30c0SXin LI>>>38 regex [!-OQ-~]+ (MIME type "%s"?) 1304b6cee71dSXin LI!:mime application/zip 1305b6cee71dSXin LI# (mimetype contents other than "application/*") 1306b6cee71dSXin LI>26 string \x8\0\0\0mimetype 1307b6cee71dSXin LI>>38 string !application/ 1308b6cee71dSXin LI>>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?) 1309b6cee71dSXin LI!:mime application/zip 1310b6cee71dSXin LI 1311b6cee71dSXin LI# Java Jar files 1312b6cee71dSXin LI>(26.s+30) leshort 0xcafe Java archive data (JAR) 1313b6cee71dSXin LI!:mime application/java-archive 1314b6cee71dSXin LI 131520f8619dSXin LI# iOS App 131620f8619dSXin LI>(26.s+30) leshort !0xcafe 131720f8619dSXin LI>>26 string !\x8\0\0\0mimetype 131820f8619dSXin LI>>>30 string Payload/ 131920f8619dSXin LI>>>>38 search/64 .app/ iOS App 132020f8619dSXin LI!:mime application/x-ios-app 132120f8619dSXin LI 1322*2726a701SXin LI>30 search/100/b application/epub+zip EPUB document 1323*2726a701SXin LI!:mime application/epub+zip 132420f8619dSXin LI 1325b6cee71dSXin LI# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) 1326b6cee71dSXin LI# Next line excludes specialized formats: 1327b6cee71dSXin LI>(26.s+30) leshort !0xcafe 1328*2726a701SXin LI>>30 search/100/b !application/epub+zip 1329*2726a701SXin LI>>>26 string !\x8\0\0\0mimetype Zip archive data 1330b6cee71dSXin LI!:mime application/zip 1331*2726a701SXin LI>>>>4 beshort x \b, at least 1332*2726a701SXin LI>>>>4 use zipversion 1333*2726a701SXin LI>>>>4 beshort x to extract 1334*2726a701SXin LI>>>>0x161 string WINZIP \b, WinZIP self-extracting 1335b6cee71dSXin LI 1336b6cee71dSXin LI# StarView Metafile 1337b6cee71dSXin LI# From Pierre Ducroquet <pinaraf@pinaraf.info> 1338b6cee71dSXin LI0 string VCLMTF StarView MetaFile 1339b6cee71dSXin LI>6 beshort x \b, version %d 1340b6cee71dSXin LI>8 belong x \b, size %d 1341b6cee71dSXin LI 1342b6cee71dSXin LI# Zoo archiver 1343b6cee71dSXin LI20 lelong 0xfdc4a7dc Zoo archive data 1344b6cee71dSXin LI!:mime application/x-zoo 1345b6cee71dSXin LI>4 byte >48 \b, v%c. 1346b6cee71dSXin LI>>6 byte >47 \b%c 1347b6cee71dSXin LI>>>7 byte >47 \b%c 1348b6cee71dSXin LI>32 byte >0 \b, modify: v%d 1349b6cee71dSXin LI>>33 byte x \b.%d+ 1350b6cee71dSXin LI>42 lelong 0xfdc4a7dc \b, 1351b6cee71dSXin LI>>70 byte >0 extract: v%d 1352b6cee71dSXin LI>>>71 byte x \b.%d+ 1353b6cee71dSXin LI 1354b6cee71dSXin LI# Shell archives 1355b6cee71dSXin LI10 string #\ This\ is\ a\ shell\ archive shell archive text 1356b6cee71dSXin LI!:mime application/octet-stream 1357b6cee71dSXin LI 1358b6cee71dSXin LI# 1359b6cee71dSXin LI# LBR. NB: May conflict with the questionable 1360b6cee71dSXin LI# "binary Computer Graphics Metafile" format. 1361b6cee71dSXin LI# 1362b6cee71dSXin LI0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data 1363b6cee71dSXin LI# 1364b6cee71dSXin LI# PMA (CP/M derivative of LHA) 13653e41d09dSXin LI# Update: Joerg Jenderek 13663e41d09dSXin LI# URL: https://en.wikipedia.org/wiki/LHA_(file_format) 1367b6cee71dSXin LI# 13683e41d09dSXin LI#2 string -pm0- PMarc archive data [pm0] 13693e41d09dSXin LI2 string -pm0- 13703e41d09dSXin LI>0 use lharc-file 13713e41d09dSXin LI#2 string -pm1- PMarc archive data [pm1] 13723e41d09dSXin LI2 string -pm1- 13733e41d09dSXin LI>0 use lharc-file 13743e41d09dSXin LI#2 string -pm2- PMarc archive data [pm2] 13753e41d09dSXin LI2 string -pm2- 13763e41d09dSXin LI>0 use lharc-file 1377b6cee71dSXin LI2 string -pms- PMarc SFX archive (CP/M, DOS) 13783e41d09dSXin LI#!:mime application/x-foobar-exec 13793e41d09dSXin LI!:ext com 1380b6cee71dSXin LI5 string -pc1- PopCom compressed executable (CP/M) 13813e41d09dSXin LI#!:mime application/x- 13823e41d09dSXin LI#!:ext com 1383b6cee71dSXin LI 1384b6cee71dSXin LI# From Rafael Laboissiere <rafael@laboissiere.net> 1385b6cee71dSXin LI# The Project Revision Control System (see 1386b6cee71dSXin LI# http://prcs.sourceforge.net) generates a packaged project 1387b6cee71dSXin LI# file which is recognized by the following entry: 1388b6cee71dSXin LI0 leshort 0xeb81 PRCS packaged project 1389b6cee71dSXin LI 1390b6cee71dSXin LI# Microsoft cabinets 1391b6cee71dSXin LI# by David Necas (Yeti) <yeti@physics.muni.cz> 1392b6cee71dSXin LI#0 string MSCF\0\0\0\0 Microsoft cabinet file data, 1393b6cee71dSXin LI#>25 byte x v%d 1394b6cee71dSXin LI#>24 byte x \b.%d 1395b6cee71dSXin LI# MPi: All CABs have version 1.3, so this is pointless. 1396b6cee71dSXin LI# Better magic in debian-additions. 1397b6cee71dSXin LI 1398b6cee71dSXin LI# GTKtalog catalogs 1399b6cee71dSXin LI# by David Necas (Yeti) <yeti@physics.muni.cz> 1400b6cee71dSXin LI4 string gtktalog\ GTKtalog catalog data, 1401b6cee71dSXin LI>13 string 3 version 3 1402b6cee71dSXin LI>>14 beshort 0x677a (gzipped) 1403b6cee71dSXin LI>>14 beshort !0x677a (not gzipped) 1404b6cee71dSXin LI>13 string >3 version %s 1405b6cee71dSXin LI 1406b6cee71dSXin LI############################################################################ 1407b6cee71dSXin LI# Parity archive reconstruction file, the 'par' file format now used on Usenet. 1408b6cee71dSXin LI0 string PAR\0 PARity archive data 1409b6cee71dSXin LI>48 leshort =0 - Index file 1410b6cee71dSXin LI>48 leshort >0 - file number %d 1411b6cee71dSXin LI 1412b6cee71dSXin LI# Felix von Leitner <felix-file@fefe.de> 1413b6cee71dSXin LI0 string d8:announce BitTorrent file 1414b6cee71dSXin LI!:mime application/x-bittorrent 14153e41d09dSXin LI# Durval Menezes, <jmgthbfile at durval dot com> 14163e41d09dSXin LI0 string d13:announce-list BitTorrent file 14173e41d09dSXin LI!:mime application/x-bittorrent 1418d38c30c0SXin LI0 string d7:comment BitTorrent file 1419d38c30c0SXin LI!:mime application/x-bittorrent 1420d38c30c0SXin LI0 string d4:info BitTorrent file 1421d38c30c0SXin LI!:mime application/x-bittorrent 1422b6cee71dSXin LI 1423b6cee71dSXin LI# Atari MSA archive - Teemu Hukkanen <tjhukkan@iki.fi> 1424b6cee71dSXin LI0 beshort 0x0e0f Atari MSA archive data 1425b6cee71dSXin LI>2 beshort x \b, %d sectors per track 1426b6cee71dSXin LI>4 beshort 0 \b, 1 sided 1427b6cee71dSXin LI>4 beshort 1 \b, 2 sided 1428b6cee71dSXin LI>6 beshort x \b, starting track: %d 1429b6cee71dSXin LI>8 beshort x \b, ending track: %d 1430b6cee71dSXin LI 1431b6cee71dSXin LI# Alternate ZIP string (amc@arwen.cs.berkeley.edu) 1432b6cee71dSXin LI0 string PK00PK\003\004 Zip archive data 143358a0f0d0SEitan Adler!:mime application/zip 143458a0f0d0SEitan Adler!:ext zip/cbz 1435b6cee71dSXin LI 1436b6cee71dSXin LI# ACE archive (from http://www.wotsit.org/download.asp?f=ace) 1437b6cee71dSXin LI# by Stefan `Sec` Zehl <sec@42.org> 1438b6cee71dSXin LI7 string **ACE** ACE archive data 1439b6cee71dSXin LI>15 byte >0 version %d 1440b6cee71dSXin LI>16 byte =0x00 \b, from MS-DOS 1441b6cee71dSXin LI>16 byte =0x01 \b, from OS/2 1442b6cee71dSXin LI>16 byte =0x02 \b, from Win/32 1443b6cee71dSXin LI>16 byte =0x03 \b, from Unix 1444b6cee71dSXin LI>16 byte =0x04 \b, from MacOS 1445b6cee71dSXin LI>16 byte =0x05 \b, from WinNT 1446b6cee71dSXin LI>16 byte =0x06 \b, from Primos 1447b6cee71dSXin LI>16 byte =0x07 \b, from AppleGS 1448b6cee71dSXin LI>16 byte =0x08 \b, from Atari 1449b6cee71dSXin LI>16 byte =0x09 \b, from Vax/VMS 1450b6cee71dSXin LI>16 byte =0x0A \b, from Amiga 1451b6cee71dSXin LI>16 byte =0x0B \b, from Next 1452b6cee71dSXin LI>14 byte x \b, version %d to extract 1453b6cee71dSXin LI>5 leshort &0x0080 \b, multiple volumes, 1454b6cee71dSXin LI>>17 byte x \b (part %d), 1455b6cee71dSXin LI>5 leshort &0x0002 \b, contains comment 1456b6cee71dSXin LI>5 leshort &0x0200 \b, sfx 1457b6cee71dSXin LI>5 leshort &0x0400 \b, small dictionary 1458b6cee71dSXin LI>5 leshort &0x0800 \b, multi-volume 1459b6cee71dSXin LI>5 leshort &0x1000 \b, contains AV-String 1460b6cee71dSXin LI>>30 string \x16*UNREGISTERED\x20VERSION* (unregistered) 1461b6cee71dSXin LI>5 leshort &0x2000 \b, with recovery record 1462b6cee71dSXin LI>5 leshort &0x4000 \b, locked 1463b6cee71dSXin LI>5 leshort &0x8000 \b, solid 1464b6cee71dSXin LI# Date in MS-DOS format (whatever that is) 1465b6cee71dSXin LI#>18 lelong x Created on 1466b6cee71dSXin LI 1467b6cee71dSXin LI# sfArk : compression program for Soundfonts (sf2) by Dirk Jagdmann 1468b6cee71dSXin LI# <doj@cubic.org> 1469b6cee71dSXin LI0x1A string sfArk sfArk compressed Soundfont 1470b6cee71dSXin LI>0x15 string 2 1471b6cee71dSXin LI>>0x1 string >\0 Version %s 1472b6cee71dSXin LI>>0x2A string >\0 : %s 1473b6cee71dSXin LI 1474b6cee71dSXin LI# DR-DOS 7.03 Packed File *.??_ 1475b6cee71dSXin LI0 string Packed\ File\ Personal NetWare Packed File 1476b6cee71dSXin LI>12 string x \b, was "%.12s" 1477b6cee71dSXin LI 1478b6cee71dSXin LI# EET archive 1479b6cee71dSXin LI# From: Tilman Sauerbeck <tilman@code-monkey.de> 1480b6cee71dSXin LI0 belong 0x1ee7ff00 EET archive 1481b6cee71dSXin LI!:mime application/x-eet 1482b6cee71dSXin LI 1483b6cee71dSXin LI# rzip archives 1484b6cee71dSXin LI0 string RZIP rzip compressed data 1485b6cee71dSXin LI>4 byte x - version %d 1486b6cee71dSXin LI>5 byte x \b.%d 1487b6cee71dSXin LI>6 belong x (%d bytes) 1488b6cee71dSXin LI 148948c779cdSXin LI# From: Joerg Jenderek 149048c779cdSXin LI# URL: https://help.foxitsoftware.com/kb/install-fzip-file.php 149148c779cdSXin LI# reference: http://mark0.net/download/triddefs_xml.7z/ 149248c779cdSXin LI# defs/f/fzip.trid.xml 149348c779cdSXin LI# Note: unknown compression; No "PK" zip magic; normally in directory like 149448c779cdSXin LI# "%APPDATA%\Foxit Software\Addon\Foxit Reader\Install" 149548c779cdSXin LI0 ubequad 0x2506781901010000 Foxit add-on/update 149648c779cdSXin LI!:mime application/x-fzip 149748c779cdSXin LI!:ext fzip 149848c779cdSXin LI 1499b6cee71dSXin LI# From: "Robert Dale" <robdale@gmail.com> 1500b6cee71dSXin LI0 belong 123 dar archive, 1501b6cee71dSXin LI>4 belong x label "%.8x 1502b6cee71dSXin LI>>8 belong x %.8x 1503b6cee71dSXin LI>>>12 beshort x %.4x" 1504b6cee71dSXin LI>14 byte 0x54 end slice 1505b6cee71dSXin LI>14 beshort 0x4e4e multi-part 1506b6cee71dSXin LI>14 beshort 0x4e53 multi-part, with -S 1507b6cee71dSXin LI 1508b6cee71dSXin LI# Symbian installation files 150948c779cdSXin LI# https://www.thouky.co.uk/software/psifs/sis.html 1510b6cee71dSXin LI# http://developer.symbian.com/main/downloads/papers/SymbianOSv91/softwareinstallsis.pdf 1511b6cee71dSXin LI8 lelong 0x10000419 Symbian installation file 1512b6cee71dSXin LI!:mime application/vnd.symbian.install 1513b6cee71dSXin LI>4 lelong 0x1000006D (EPOC release 3/4/5) 1514b6cee71dSXin LI>4 lelong 0x10003A12 (EPOC release 6) 1515b6cee71dSXin LI0 lelong 0x10201A7A Symbian installation file (Symbian OS 9.x) 1516b6cee71dSXin LI!:mime x-epoc/x-sisx-app 1517b6cee71dSXin LI 1518b6cee71dSXin LI# From "Nelson A. de Oliveira" <naoliv@gmail.com> 1519b6cee71dSXin LI0 string MPQ\032 MoPaQ (MPQ) archive 1520b6cee71dSXin LI 1521b6cee71dSXin LI# From: "Nelson A. de Oliveira" <naoliv@gmail.com> 1522b6cee71dSXin LI# .kgb 1523b6cee71dSXin LI0 string KGB_arch KGB Archiver file 1524b6cee71dSXin LI>10 string x with compression level %.1s 1525b6cee71dSXin LI 1526b6cee71dSXin LI# xar (eXtensible ARchiver) archive 152748c779cdSXin LI# URL: https://en.wikipedia.org/wiki/Xar_(archiver) 152848c779cdSXin LI# xar archive format: https://code.google.com/p/xar/ 1529b6cee71dSXin LI# From: "David Remahl" <dremahl@apple.com> 153048c779cdSXin LI# Update: Joerg Jenderek 153148c779cdSXin LI# TODO: lzma compression; X509Data for pkg and xip 153248c779cdSXin LI# Note: verified by `xar --dump-header -f FullBundleUpdate.xar` or 153348c779cdSXin LI# 7z t -txar Xcode_10.2_beta_4.xip` 1534b6cee71dSXin LI0 string xar! xar archive 15353e41d09dSXin LI!:mime application/x-xar 153648c779cdSXin LI# pkg for Mac OSX installer package like FullBundleUpdate.pkg 153748c779cdSXin LI# xip for signed Apple software like Xcode_10.2_beta_4.xip 153848c779cdSXin LI!:ext xar/pkg/xip 153948c779cdSXin LI# always 28 in older archives 154048c779cdSXin LI>4 ubeshort >28 \b, header size %u 154148c779cdSXin LI# currently there exit only version 1 since about 2014 154248c779cdSXin LI>6 ubeshort >1 version %u, 154348c779cdSXin LI>8 ubequad x compressed TOC: %llu, 154448c779cdSXin LI#>16 ubequad x uncompressed TOC: %llu, 154548c779cdSXin LI# cksum_alg 0-2 in older and also 3-4 in newer 1546b6cee71dSXin LI>24 belong 0 no checksum 1547b6cee71dSXin LI>24 belong 1 SHA-1 checksum 1548b6cee71dSXin LI>24 belong 2 MD5 checksum 154948c779cdSXin LI>24 belong 3 SHA-256 checksum 155048c779cdSXin LI>24 belong 4 SHA-512 checksum 155148c779cdSXin LI>24 belong >4 unknown 0x%x checksum 155248c779cdSXin LI#>24 belong >4 checksum 155348c779cdSXin LI# For no compression jump 0 bytes 155448c779cdSXin LI>24 belong 0 155548c779cdSXin LI>>0 ubyte x 155648c779cdSXin LI# jump more bytes forward by header size 155748c779cdSXin LI>>>&(4.S) ubyte x 155848c779cdSXin LI# jump more bytes forward by compressed table of contents size 155948c779cdSXin LI#>>>>&(8.Q) ubequad x \b, heap data 0x%llx 156048c779cdSXin LI>>>>&(8.Q) ubyte x 156148c779cdSXin LI# look for data by ./compress after message with 1 space at end 156248c779cdSXin LI>>>>>&-3 indirect x \b, contains 156348c779cdSXin LI# For SHA-1 jump 20 minus 2 bytes 156448c779cdSXin LI>24 belong 1 156548c779cdSXin LI>>18 ubyte x 156648c779cdSXin LI# jump more bytes forward by header size 156748c779cdSXin LI>>>&(4.S) ubyte x 156848c779cdSXin LI# jump more bytes forward by compressed table of contents size 156948c779cdSXin LI>>>>&(8.Q) ubyte x 157048c779cdSXin LI# data compressed by gzip, bzip, lzma or none 157148c779cdSXin LI>>>>>&-1 indirect x \b, contains 157248c779cdSXin LI# For SHA-256 jump 32 minus 2 bytes 157348c779cdSXin LI>24 belong 3 157448c779cdSXin LI>>30 ubyte x 157548c779cdSXin LI# jump more bytes forward by header size 157648c779cdSXin LI>>>&(4.S) ubyte x 157748c779cdSXin LI# jump more bytes forward by compressed table of contents size 157848c779cdSXin LI>>>>&(8.Q) ubyte x 157948c779cdSXin LI>>>>>&-1 indirect x \b, contains 158048c779cdSXin LI# For SHA-512 jump 64 minus 2 bytes 158148c779cdSXin LI>24 belong 4 158248c779cdSXin LI>>62 ubyte x 158348c779cdSXin LI# jump more bytes forward by header size 158448c779cdSXin LI>>>&(4.S) ubyte x 158548c779cdSXin LI# jump more bytes forward by compressed table of contents size 158648c779cdSXin LI>>>>&(8.Q) ubyte x 158748c779cdSXin LI>>>>>&-1 indirect x \b, contains 1588b6cee71dSXin LI 1589b6cee71dSXin LI# Type: Parity Archive 1590b6cee71dSXin LI# From: Daniel van Eeden <daniel_e@dds.nl> 1591b6cee71dSXin LI0 string PAR2 Parity Archive Volume Set 1592b6cee71dSXin LI 1593b6cee71dSXin LI# Bacula volume format. (Volumes always start with a block header.) 159448c779cdSXin LI# URL: https://bacula.org/3.0.x-manuals/en/developers/developers/Block_Header.html 1595b6cee71dSXin LI# From: Adam Buchbinder <adam.buchbinder@gmail.com> 1596b6cee71dSXin LI12 string BB02 Bacula volume 1597b6cee71dSXin LI>20 bedate x \b, started %s 1598b6cee71dSXin LI 1599b6cee71dSXin LI# ePub is XHTML + XML inside a ZIP archive. The first member of the 1600b6cee71dSXin LI# archive must be an uncompressed file called 'mimetype' with contents 1601b6cee71dSXin LI# 'application/epub+zip' 1602b6cee71dSXin LI 1603b6cee71dSXin LI 1604b6cee71dSXin LI# From: "Michael Gorny" <mgorny@gentoo.org> 1605b6cee71dSXin LI# ZPAQ: http://mattmahoney.net/dc/zpaq.html 1606b6cee71dSXin LI0 string zPQ ZPAQ stream 1607b6cee71dSXin LI>3 byte x \b, level %d 16085f0216bdSXin LI# From: Barry Carter <carter.barry@gmail.com> 160948c779cdSXin LI# https://encode.ru/threads/456-zpaq-updates/page32 16105f0216bdSXin LI0 string 7kSt ZPAQ file 1611b6cee71dSXin LI 1612b6cee71dSXin LI# BBeB ebook, unencrypted (LRF format) 161348c779cdSXin LI# URL: https://www.sven.de/librie/Librie/LrfFormat 1614b6cee71dSXin LI# From: Adam Buchbinder <adam.buchbinder@gmail.com> 1615b6cee71dSXin LI0 string L\0R\0F\0\0\0 BBeB ebook data, unencrypted 1616b6cee71dSXin LI>8 beshort x \b, version %d 1617b6cee71dSXin LI>36 byte 1 \b, front-to-back 1618b6cee71dSXin LI>36 byte 16 \b, back-to-front 1619b6cee71dSXin LI>42 beshort x \b, (%dx, 1620b6cee71dSXin LI>44 beshort x %d) 1621b6cee71dSXin LI 1622b6cee71dSXin LI# Symantec GHOST image by Joerg Jenderek at May 2014 162348c779cdSXin LI# https://us.norton.com/ghost/ 162448c779cdSXin LI# https://www.garykessler.net/library/file_sigs.html 1625b6cee71dSXin LI0 ubelong&0xFFFFf7f0 0xFEEF0100 Norton GHost image 1626b6cee71dSXin LI# *.GHO 1627b6cee71dSXin LI>2 ubyte&0x08 0x00 \b, first file 1628b6cee71dSXin LI# *.GHS or *.[0-9] with cns program option 1629b6cee71dSXin LI>2 ubyte&0x08 0x08 \b, split file 1630b6cee71dSXin LI# part of split index interesting for *.ghs 1631b6cee71dSXin LI>>4 ubyte x id=0x%x 1632b6cee71dSXin LI# compression tag minus one equals numeric compression command line switch z[1-9] 1633b6cee71dSXin LI>3 ubyte 0 \b, no compression 1634b6cee71dSXin LI>3 ubyte 2 \b, fast compression (Z1) 1635b6cee71dSXin LI>3 ubyte 3 \b, medium compression (Z2) 1636b6cee71dSXin LI>3 ubyte >3 1637b6cee71dSXin LI>>3 ubyte <11 \b, compression (Z%d-1) 1638b6cee71dSXin LI>2 ubyte&0x08 0x00 1639b6cee71dSXin LI# ~ 30 byte password field only for *.gho 1640b6cee71dSXin LI>>12 ubequad !0 \b, password protected 1641b6cee71dSXin LI>>44 ubyte !1 1642b6cee71dSXin LI# 1~Image All, sector-by-sector only for *.gho 1643b6cee71dSXin LI>>>10 ubyte 1 \b, sector copy 1644b6cee71dSXin LI# 1~Image Boot track only for *.gho 1645b6cee71dSXin LI>>>43 ubyte 1 \b, boot track 1646b6cee71dSXin LI# 1~Image Disc only for *.gho implies Image Boot track and sector copy 1647b6cee71dSXin LI>>44 ubyte 1 \b, disc sector copy 1648b6cee71dSXin LI# optional image description only *.gho 1649b6cee71dSXin LI>>0xff string >\0 "%-.254s" 1650b6cee71dSXin LI# look for DOS sector end sequence 1651b6cee71dSXin LI>0xE08 search/7776 \x55\xAA 1652b6cee71dSXin LI>>&-512 indirect x \b; contains 1653b6cee71dSXin LI 16543e41d09dSXin LI# Google Chrome extensions 16553e41d09dSXin LI# https://developer.chrome.com/extensions/crx 16563e41d09dSXin LI# https://developer.chrome.com/extensions/hosting 16573e41d09dSXin LI0 string Cr24 Google Chrome extension 16583e41d09dSXin LI!:mime application/x-chrome-extension 16593e41d09dSXin LI>4 ulong x \b, version %u 166040427ccaSGordon Tetlow 166140427ccaSGordon Tetlow# SeqBox - Sequenced container 166240427ccaSGordon Tetlow# ext: sbx, seqbox 166340427ccaSGordon Tetlow# Marco Pontello marcopon@gmail.com 166440427ccaSGordon Tetlow# reference: https://github.com/MarcoPon/SeqBox 166540427ccaSGordon Tetlow0 string SBx SeqBox, 166640427ccaSGordon Tetlow>3 byte x version %d 166758a0f0d0SEitan Adler 166858a0f0d0SEitan Adler# LyNX archive 166958a0f0d0SEitan Adler56 string USE\040LYNX\040TO\040DISSOLVE\040THIS\040FILE LyNX archive 167048c779cdSXin LI 167148c779cdSXin LI# From: Joerg Jenderek 167248c779cdSXin LI# URL: https://www.acronis.com/ 167348c779cdSXin LI# Reference: https://en.wikipedia.org/wiki/TIB_(file_format) 167448c779cdSXin LI# Note: only tested with True Image 2013 Build 5962 and 2019 Build 14110 167548c779cdSXin LI0 ubequad 0xce24b9a220000000 Acronis True Image backup 167648c779cdSXin LI!:mime application/x-acronis-tib 167748c779cdSXin LI!:ext tib 167848c779cdSXin LI# 01000000 167948c779cdSXin LI#>20 ubelong x \b, at 20 0x%x 168048c779cdSXin LI# 20000000 168148c779cdSXin LI#>28 ubelong x \b, at 28 0x%x 168248c779cdSXin LI# strings like "Generic- SD/MMC 1.00" "Unknown Disk" "Msft Virtual Disk 1.0" 168348c779cdSXin LI# ??? 168448c779cdSXin LI# strings like "\Device\0000011e" "\Device\0000015a" 168548c779cdSXin LI#>0 search/0x6852300/cs \\Device\\ 168648c779cdSXin LI#>>&-1 pstring x \b, %s 168748c779cdSXin LI# "\Device\HarddiskVolume30" "\Device\HarddiskVolume39" 168848c779cdSXin LI#>>>&1 search/180/cs \\Device\\ 168948c779cdSXin LI#>>>>&-1 pstring x \b, %s 169048c779cdSXin LI#>>>>>&0 search/29/cs \0\0\xc8\0 169148c779cdSXin LI# disk label 169248c779cdSXin LI#>>>>>>&10 lestring16 x \b, disk label %11.11s 169348c779cdSXin LI#>>>>>>&9 plestring16 x \b, disk label "%11.11s" 169448c779cdSXin LI#>>>>>>&10 ubequad x %16.16llx 169548c779cdSXin LI 169648c779cdSXin LI 169748c779cdSXin LI# Gentoo XPAK binary package 169848c779cdSXin LI# by Michal Gorny <mgorny@gentoo.org> 169948c779cdSXin LI# https://gitweb.gentoo.org/proj/portage.git/tree/man/xpak.5 170048c779cdSXin LI-4 string STOP 170148c779cdSXin LI>-16 string XPAKSTOP Gentoo binary package (XPAK) 170248c779cdSXin LI 170348c779cdSXin LI# From: Joerg Jenderek 170448c779cdSXin LI# URL: https://kodi.wiki/view/TexturePacker 170548c779cdSXin LI# Reference: https://mirrors.kodi.tv/releases/source/17.3-Krypton.tar.gz 170648c779cdSXin LI# /xbmc-Krypton/xbmc/guilib/XBTF.h 170748c779cdSXin LI# /xbmc-Krypton/xbmc/guilib/XBTF.cpp 170848c779cdSXin LI0 string XBTF 170948c779cdSXin LI# skip ASCII text by looking for terminating \0 of path 171048c779cdSXin LI>264 ubyte 0 XBMC texture package 171148c779cdSXin LI!:mime application/x-xbmc-xbt 171248c779cdSXin LI!:ext xbt 171348c779cdSXin LI# XBTF_VERSION 2 171448c779cdSXin LI>>4 string !2 \b, version %-.1s 171548c779cdSXin LI# nofFiles /xbmc-Krypton/xbmc/guilib/XBTFReader.cpp 171648c779cdSXin LI>>5 ulelong x \b, %u file 171748c779cdSXin LI# plural s 171848c779cdSXin LI>>5 ulelong >1 \bs 171948c779cdSXin LI# path[CXBTFFile[MaximumPathLength=256] 172048c779cdSXin LI>>9 string x \b, 1st %s 172148c779cdSXin LI 1722