archive 51 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592
  1. #------------------------------------------------------------------------------
  2. # $File: archive,v 1.129 2019/05/09 18:58:02 christos Exp $
  3. # archive: file(1) magic for archive formats (see also "msdos" for self-
  4. # extracting compressed archives)
  5. #
  6. # cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc.
  7. # pre-POSIX "tar" archives are also handled in the C code ../../src/is_tar.c.
  8. # POSIX tar archives
  9. # URL: https://en.wikipedia.org/wiki/Tar_(computing)
  10. # Reference: https://www.freebsd.org/cgi/man.cgi?query=tar&sektion=5&manpath=FreeBSD+8-current
  11. # header mainly padded with nul bytes
  12. 500 quad 0
  13. !:strength /2
  14. # filename or extended attribute printable strings in range space null til umlaut ue
  15. >0 ubeshort >0x1F00
  16. >>0 ubeshort <0xFCFD
  17. # last 4 header bytes often null but tar\0 in gtarfail2.tar gtarfail.tar-bad
  18. # at https://sourceforge.net/projects/s-tar/files/testscripts/
  19. >>>508 ubelong&0x8B9E8DFF 0
  20. # nul, space or ascii digit 0-7 at start of mode
  21. >>>>100 ubyte&0xC8 =0
  22. >>>>>101 ubyte&0xC8 =0
  23. # nul, space at end of check sum
  24. >>>>>>155 ubyte&0xDF =0
  25. # space or ascii digit 0 at start of check sum
  26. >>>>>>>148 ubyte&0xEF =0x20
  27. >>>>>>>>0 use tar-file
  28. # minimal check and then display tar archive information which can also be
  29. # embedded inside others like Android Backup, Clam AntiVirus database
  30. 0 name tar-file
  31. >257 string !ustar
  32. # header padded with nuls
  33. >>257 ulong =0
  34. # GNU tar version 1.29 with non pax format option without refusing
  35. # creates misleading V7 header for Long path, Multi-volume, Volume type
  36. >>>156 ubyte 0x4c GNU tar archive
  37. !:mime application/x-gtar
  38. !:ext tar/gtar
  39. >>>156 ubyte 0x4d GNU tar archive
  40. !:mime application/x-gtar
  41. !:ext tar/gtar
  42. >>>156 ubyte 0x56 GNU tar archive
  43. !:mime application/x-gtar
  44. !:ext tar/gtar
  45. >>>156 default x tar archive (V7)
  46. !:mime application/x-tar
  47. !:ext tar
  48. # other stuff in padding
  49. # some implementations add new fields to the blank area at the end of the header record
  50. # created for example by DOS TAR 3.20g 1994 Tim V.Shapore with -j option
  51. >>257 ulong !0 tar archive (old)
  52. !:mime application/x-tar
  53. !:ext tar
  54. # magic in newer, GNU, posix variants
  55. >257 string =ustar
  56. # 2 last char of magic and UStar version because string expression does not work
  57. # 2 space characters followed by a null for GNU variant
  58. >>261 ubelong =0x72202000 POSIX tar archive (GNU)
  59. !:mime application/x-gtar
  60. !:ext tar/gtar
  61. # UStar version with ASCII "00"
  62. >>261 ubelong 0x72003030 POSIX
  63. # gLOBAL and ExTENSION type only found in POSIX.1-2001 format
  64. >>>156 ubyte 0x67 \b.1-2001
  65. >>>156 ubyte 0x78 \b.1-2001
  66. >>>156 ubyte x tar archive
  67. !:mime application/x-ustar
  68. !:ext tar/ustar
  69. # version with 2 binary nuls embedded in Android Backup like com.android.settings.ab
  70. >>261 ubelong 0x72000000 tar archive (ustar)
  71. !:mime application/x-ustar
  72. !:ext tar/ustar
  73. # not seen ustar variant with garbish version
  74. >>261 default x tar archive (unknown ustar)
  75. !:mime application/x-ustar
  76. !:ext tar/ustar
  77. # type flag of 1st tar archive member
  78. #>156 ubyte x \b, %c-type
  79. >156 ubyte x
  80. >>156 ubyte 0 \b, file
  81. >>156 ubyte 0x30 \b, file
  82. >>156 ubyte 0x31 \b, hard link
  83. >>156 ubyte 0x32 \b, symlink
  84. >>156 ubyte 0x33 \b, char device
  85. >>156 ubyte 0x34 \b, block device
  86. >>156 ubyte 0x35 \b, directory
  87. >>156 ubyte 0x36 \b, fifo
  88. >>156 ubyte 0x37 \b, reserved
  89. >>156 ubyte 0x4c \b, long path
  90. >>156 ubyte 0x4d \b, multi volume
  91. >>156 ubyte 0x56 \b, volume
  92. >>156 ubyte 0x67 \b, global
  93. >>156 ubyte 0x78 \b, extension
  94. >>156 default x \b, type
  95. >>>156 ubyte x '%c'
  96. # name[100]
  97. >0 string >\0 %-.60s
  98. # mode mainly stored as an octal number in ASCII null or space terminated
  99. >100 string >\0 \b, mode %-.7s
  100. # user id mainly as octal numbers in ASCII null or space terminated
  101. >108 string >\0 \b, uid %-.7s
  102. # group id mainly as octal numbers in ASCII null or space terminated
  103. >116 string >\0 \b, gid %-.7s
  104. # size mainly as octal number in ASCII
  105. >124 ubyte <0x38
  106. >>124 string >\0 \b, size %-.12s
  107. # coding indicated by setting the high-order bit of the leftmost byte
  108. >124 ubyte >0xEF \b, size 0x
  109. >>124 ubyte !0xff \b%2.2x
  110. >>125 ubyte !0xff \b%2.2x
  111. >>126 ubyte !0xff \b%2.2x
  112. >>127 ubyte !0xff \b%2.2x
  113. >>128 ubyte !0xff \b%2.2x
  114. >>129 ubyte !0xff \b%2.2x
  115. >>130 ubyte !0xff \b%2.2x
  116. >>131 ubyte !0xff \b%2.2x
  117. >>132 ubyte !0xff \b%2.2x
  118. >>133 ubyte !0xff \b%2.2x
  119. >>134 ubyte !0xff \b%2.2x
  120. >>135 ubyte !0xff \b%2.2x
  121. # seconds since 0:0:0 1 jan 1970 UTC as octal number mainly in ASCII null or space terminated
  122. >136 string >\0 \b, seconds %-.11s
  123. # header checksum stored as an octal number in ASCII null or space terminated
  124. #>148 string x \b, cksum %.7s
  125. # linkname[100]
  126. >157 string >\0 \b, linkname %-.40s
  127. # additional fields for ustar
  128. >257 string =ustar
  129. # owner user name null terminated
  130. >>265 string >\0 \b, user %-.32s
  131. # group name null terminated
  132. >>297 string >\0 \b, group %-.32s
  133. # device major minor if not zero
  134. >>329 ubequad&0xCFCFCFCFcFcFcFdf !0
  135. >>>329 string x \b, devmaj %-.7s
  136. >>337 ubequad&0xCFCFCFCFcFcFcFdf !0
  137. >>>337 string x \b, devmin %-.7s
  138. # prefix[155]
  139. >>345 string >\0 \b, prefix %-.155s
  140. # old non ustar/POSIX tar
  141. >257 string !ustar
  142. >>508 string =tar\0
  143. # padding[255] in old star
  144. >>>257 string >\0 \b, padding: %-.40s
  145. >>508 default x
  146. # padding[255] in old tar sometimes comment field
  147. >>>257 string >\0 \b, comment: %-.40s
  148. # Incremental snapshot gnu-tar format from:
  149. # https://www.gnu.org/software/tar/manual/html_node/Snapshot-Files.html
  150. 0 string GNU\ tar- GNU tar incremental snapshot data
  151. >&0 regex [0-9]\.[0-9]+-[0-9]+ version %s
  152. # cpio archives
  153. #
  154. # Yes, the top two "cpio archive" formats *are* supposed to just be "short".
  155. # The idea is to indicate archives produced on machines with the same
  156. # byte order as the machine running "file" with "cpio archive", and
  157. # to indicate archives produced on machines with the opposite byte order
  158. # from the machine running "file" with "byte-swapped cpio archive".
  159. #
  160. # The SVR4 "cpio(4)" hints that there are additional formats, but they
  161. # are defined as "short"s; I think all the new formats are
  162. # character-header formats and thus are strings, not numbers.
  163. 0 short 070707 cpio archive
  164. !:mime application/x-cpio
  165. 0 short 0143561 byte-swapped cpio archive
  166. !:mime application/x-cpio # encoding: swapped
  167. 0 string 070707 ASCII cpio archive (pre-SVR4 or odc)
  168. 0 string 070701 ASCII cpio archive (SVR4 with no CRC)
  169. 0 string 070702 ASCII cpio archive (SVR4 with CRC)
  170. #
  171. # Various archive formats used by various versions of the "ar"
  172. # command.
  173. #
  174. #
  175. # Original UNIX archive formats.
  176. # They were written with binary values in host byte order, and
  177. # the magic number was a host "int", which might have been 16 bits
  178. # or 32 bits. We don't say "PDP-11" or "VAX", as there might have
  179. # been ports to little-endian 16-bit-int or 32-bit-int platforms
  180. # (x86?) using some of those formats; if none existed, feel free
  181. # to use "PDP-11" for little-endian 16-bit and "VAX" for little-endian
  182. # 32-bit. There might have been big-endian ports of that sort as
  183. # well.
  184. #
  185. 0 leshort 0177555 very old 16-bit-int little-endian archive
  186. 0 beshort 0177555 very old 16-bit-int big-endian archive
  187. 0 lelong 0177555 very old 32-bit-int little-endian archive
  188. 0 belong 0177555 very old 32-bit-int big-endian archive
  189. 0 leshort 0177545 old 16-bit-int little-endian archive
  190. >2 string __.SYMDEF random library
  191. 0 beshort 0177545 old 16-bit-int big-endian archive
  192. >2 string __.SYMDEF random library
  193. 0 lelong 0177545 old 32-bit-int little-endian archive
  194. >4 string __.SYMDEF random library
  195. 0 belong 0177545 old 32-bit-int big-endian archive
  196. >4 string __.SYMDEF random library
  197. #
  198. # From "pdp" (but why a 4-byte quantity?)
  199. #
  200. 0 lelong 0x39bed PDP-11 old archive
  201. 0 lelong 0x39bee PDP-11 4.0 archive
  202. #
  203. # XXX - what flavor of APL used this, and was it a variant of
  204. # some ar archive format? It's similar to, but not the same
  205. # as, the APL workspace magic numbers in pdp.
  206. #
  207. 0 long 0100554 apl workspace
  208. #
  209. # System V Release 1 portable(?) archive format.
  210. #
  211. 0 string =<ar> System V Release 1 ar archive
  212. !:mime application/x-archive
  213. #
  214. # Debian package; it's in the portable archive format, and needs to go
  215. # before the entry for regular portable archives, as it's recognized as
  216. # a portable archive whose first member has a name beginning with
  217. # "debian".
  218. #
  219. # Update: Joerg Jenderek
  220. # URL: https://en.wikipedia.org/wiki/Deb_(file_format)
  221. 0 string =!<arch>\ndebian
  222. # https://manpages.debian.org/testing/dpkg/dpkg-split.1.en.html
  223. >14 string -split part of multipart Debian package
  224. !:mime application/vnd.debian.binary-package
  225. # udeb is used for stripped down deb file
  226. !:ext deb/udeb
  227. >14 string -binary Debian binary package
  228. !:mime application/vnd.debian.binary-package
  229. !:ext deb/udeb
  230. # This should not happen
  231. >14 default x Unknown Debian package
  232. # NL terminated version; for most Debian cases this is 2.0 or 2.1 for splitted
  233. >68 string >\0 (format %s)
  234. #>68 string !2.0\n
  235. #>>68 string x (format %.3s)
  236. >68 string =2.0\n
  237. # 2nd archive name=control archive name like control.tar.gz or control.tar.xz
  238. >>72 string >\0 \b, with %.14s
  239. # look for 3rd archive name=data archive name like data.tar.{gz,xz,bz2,lzma}
  240. >>0 search/0x93e4f data.tar. \b, data compression
  241. # the above line only works if FILE_BYTES_MAX in ../../src/file.h is raised
  242. # for example like libreoffice-dev-doc_1%3a5.2.7-1+rpi1+deb9u3_all.deb
  243. >>>&0 string x %.4s
  244. # splitted debian package case
  245. >68 string =2.1\n
  246. # dpkg-1.18.25/dpkg-split/info.c
  247. # NL terminated ASCII package name like ckermit
  248. >>&0 string x \b, %s
  249. # NL terminated package version like 302-5.3
  250. >>>&1 string x %s
  251. # NL terminated MD5 checksum
  252. >>>>&1 string x \b, MD5 %s
  253. # NL terminated original package length
  254. >>>>>&1 string x \b, unsplitted size %s
  255. # NL terminated part length
  256. >>>>>>&1 string x \b, part lenght %s
  257. # NL terminated package part like n/m
  258. >>>>>>>&1 string x \b, part %s
  259. # NL terminated package architecture like armhf since dpkg 1.16.1 or later
  260. >>>>>>>>&1 string x \b, %s
  261. #
  262. # MIPS archive; they're in the portable archive format, and need to go
  263. # before the entry for regular portable archives, as it's recognized as
  264. # a portable archive whose first member has a name beginning with
  265. # "__________E".
  266. #
  267. 0 string =!<arch>\n__________E MIPS archive
  268. !:mime application/x-archive
  269. >20 string U with MIPS Ucode members
  270. >21 string L with MIPSEL members
  271. >21 string B with MIPSEB members
  272. >19 string L and an EL hash table
  273. >19 string B and an EB hash table
  274. >22 string X -- out of date
  275. #
  276. # BSD/SVR2-and-later portable archive formats.
  277. #
  278. # Update: Joerg Jenderek
  279. # URL: http://fileformats.archiveteam.org/wiki/AR
  280. # Reference: https://www.unix.com/man-page/opensolaris/3HEAD/ar.h/
  281. # Note: Mach-O universal binary in ./cafebabe is dependent
  282. # TODO: unify current ar archive, MIPS archive, Debian package
  283. # distinguish BSD, SVR; 32, 64 bit; HP from other 32-bit SVR;
  284. # *.ar packages from *.a libraries. handle empty archive
  285. 0 string =!<arch>\n current ar archive
  286. # print first and possibly second ar_name[16] for debugging purpose
  287. #>8 string x \b, 1st "%.16s"
  288. #>68 string x \b, 2nd "%.16s"
  289. !:mime application/x-archive
  290. # a in most case for libraries; lib for Microsoft libraries; ar else cases
  291. !:ext a/lib/ar
  292. >8 string __.SYMDEF random library
  293. # first member with long marked name __.SYMDEF SORTED implies BSD library
  294. >68 string __.SYMDEF\ SORTED random library
  295. # Reference: https://parisc.wiki.kernel.org/images-parisc/b/b2/Rad_11_0_32.pdf
  296. # "archive file" entry moved from ./hp
  297. # LST header system_id 0210h~PA-RISC 1.1,... identifies the target architecture
  298. # LST header a_magic 0619h~relocatable library
  299. >68 belong 0x020b0619 - PA-RISC1.0 relocatable library
  300. >68 belong 0x02100619 - PA-RISC1.1 relocatable library
  301. >68 belong 0x02110619 - PA-RISC1.2 relocatable library
  302. >68 belong 0x02140619 - PA-RISC2.0 relocatable library
  303. #EOF for common ar archives
  304. #
  305. # "Thin" archive, as can be produced by GNU ar.
  306. #
  307. 0 string =!<thin>\n thin archive with
  308. >68 belong 0 no symbol entries
  309. >68 belong 1 %d symbol entry
  310. >68 belong >1 %d symbol entries
  311. 0 search/1 -h- Software Tools format archive text
  312. # ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com)
  313. #
  314. # The first byte is the magic (0x1a), byte 2 is the compression type for
  315. # the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS
  316. # filename of the first file (null terminated). Since some types collide
  317. # we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%),
  318. # 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%). 0x01 collides with terminfo.
  319. 0 lelong&0x8080ffff 0x0000081a ARC archive data, dynamic LZW
  320. !:mime application/x-arc
  321. 0 lelong&0x8080ffff 0x0000091a ARC archive data, squashed
  322. !:mime application/x-arc
  323. 0 lelong&0x8080ffff 0x0000021a ARC archive data, uncompressed
  324. !:mime application/x-arc
  325. 0 lelong&0x8080ffff 0x0000031a ARC archive data, packed
  326. !:mime application/x-arc
  327. 0 lelong&0x8080ffff 0x0000041a ARC archive data, squeezed
  328. !:mime application/x-arc
  329. 0 lelong&0x8080ffff 0x0000061a ARC archive data, crunched
  330. !:mime application/x-arc
  331. # [JW] stuff taken from idarc, obviously ARC successors:
  332. 0 lelong&0x8080ffff 0x00000a1a PAK archive data
  333. !:mime application/x-arc
  334. 0 lelong&0x8080ffff 0x0000141a ARC+ archive data
  335. !:mime application/x-arc
  336. 0 lelong&0x8080ffff 0x0000481a HYP archive data
  337. !:mime application/x-arc
  338. # Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk)
  339. # I can't create either SPARK or ArcFS archives so I have not tested this stuff
  340. # [GRR: the original entries collide with ARC, above; replaced with combined
  341. # version (not tested)]
  342. #0 byte 0x1a RISC OS archive (spark format)
  343. 0 string \032archive RISC OS archive (ArcFS format)
  344. 0 string Archive\000 RISC OS archive (ArcFS format)
  345. # All these were taken from idarc, many could not be verified. Unfortunately,
  346. # there were many low-quality sigs, i.e. easy to trigger false positives.
  347. # Please notify me of any real-world fishy/ambiguous signatures and I'll try
  348. # to get my hands on the actual archiver and see if I find something better. [JW]
  349. # probably many can be enhanced by finding some 0-byte or control char near the start
  350. # idarc calls this Crush/Uncompressed... *shrug*
  351. 0 string CRUSH Crush archive data
  352. # Squeeze It (.sqz)
  353. 0 string HLSQZ Squeeze It archive data
  354. # SQWEZ
  355. 0 string SQWEZ SQWEZ archive data
  356. # HPack (.hpk)
  357. 0 string HPAK HPack archive data
  358. # HAP
  359. 0 string \x91\x33HF HAP archive data
  360. # MD/MDCD
  361. 0 string MDmd MDCD archive data
  362. # LIM
  363. 0 string LIM\x1a LIM archive data
  364. # SAR
  365. 3 string LH5 SAR archive data
  366. # BSArc/BS2
  367. 0 string \212\3SB\020\0 BSArc/BS2 archive data
  368. # Bethesda Softworks Archive (Oblivion)
  369. 0 string BSA\0 BSArc archive data
  370. >4 lelong x version %d
  371. # MAR
  372. 2 string =-ah MAR archive data
  373. # ACB
  374. #0 belong&0x00f800ff 0x00800000 ACB archive data
  375. # CPZ
  376. # TODO, this is what idarc says: 0 string \0\0\0 CPZ archive data
  377. # JRC
  378. 0 string JRchive JRC archive data
  379. # Quantum
  380. 0 string DS\0 Quantum archive data
  381. # ReSOF
  382. 0 string PK\3\6 ReSOF archive data
  383. # QuArk
  384. 0 string 7\4 QuArk archive data
  385. # YAC
  386. 14 string YC YAC archive data
  387. # X1
  388. 0 string X1 X1 archive data
  389. 0 string XhDr X1 archive data
  390. # CDC Codec (.dqt)
  391. 0 belong&0xffffe000 0x76ff2000 CDC Codec archive data
  392. # AMGC
  393. 0 string \xad6" AMGC archive data
  394. # NuLIB
  395. 0 string N\xc3\xb5F\xc3\xa9lx\xc3\xa5 NuLIB archive data
  396. # PakLeo
  397. 0 string LEOLZW PAKLeo archive data
  398. # ChArc
  399. 0 string SChF ChArc archive data
  400. # PSA
  401. 0 string PSA PSA archive data
  402. # CrossePAC
  403. 0 string DSIGDCC CrossePAC archive data
  404. # Freeze
  405. 0 string \x1f\x9f\x4a\x10\x0a Freeze archive data
  406. # KBoom
  407. 0 string \xc2\xa8MP\xc2\xa8 KBoom archive data
  408. # NSQ, must go after CDC Codec
  409. 0 string \x76\xff NSQ archive data
  410. # DPA
  411. 0 string Dirk\ Paehl DPA archive data
  412. # BA
  413. # TODO: idarc says "bytes 0-2 == bytes 3-5"
  414. # TTComp
  415. # URL: http://fileformats.archiveteam.org/wiki/TTComp_archive
  416. # Update: Joerg Jenderek
  417. # GRR: line below is too general as it matches also Panorama database "TCDB 2003-10 demo.pan", others
  418. 0 string \0\6
  419. # look for first keyword of Panorama database *.pan
  420. >12 search/261 DESIGN
  421. # skip keyword with low entropy
  422. >12 default x TTComp archive, binary, 4K dictionary
  423. # (version 5.25) labeled the above entry as "TTComp archive data"
  424. # ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation?
  425. 0 string ESP ESP archive data
  426. # ZPack
  427. 0 string \1ZPK\1 ZPack archive data
  428. # Sky
  429. 0 string \xbc\x40 Sky archive data
  430. # UFA
  431. 0 string UFA UFA archive data
  432. # Dry
  433. 0 string =-H2O DRY archive data
  434. # FoxSQZ
  435. 0 string FOXSQZ FoxSQZ archive data
  436. # AR7
  437. 0 string ,AR7 AR7 archive data
  438. # PPMZ
  439. 0 string PPMZ PPMZ archive data
  440. # MS Compress
  441. # Update: Joerg Jenderek
  442. # URL: http://fileformats.archiveteam.org/wiki/MS-DOS_installation_compression
  443. # Reference: https://hwiegman.home.xs4all.nl/fileformats/compress/szdd_kwaj_format.html
  444. # Note: use correct version of extracting tool like EXPAND, UNPACK, DECOMP or 7Z
  445. 4 string \x88\xf0\x27
  446. # KWAJ variant
  447. >0 string KWAJ MS Compress archive data, KWAJ variant
  448. !:mime application/x-ms-compress-kwaj
  449. # extension not working in version 5.32
  450. # magic/Magdir/archive, 284: Warning: EXTENSION type ` ??_' has bad char '?'
  451. # file: line 284: Bad magic entry ' ??_'
  452. !:ext ??_
  453. # compression method (0-4)
  454. >>8 uleshort x \b, %u method
  455. # offset of compressed data
  456. >>10 uleshort x \b, 0x%x offset
  457. #>>(10.s) uleshort x
  458. #>>>&-6 string x \b, TEST extension %-.3s
  459. # header flags to mark header extensions
  460. >>12 uleshort >0 \b, 0x%x flags
  461. # 4 bytes: decompressed length of file
  462. >>12 uleshort &0x01
  463. >>>14 ulelong x \b, original size: %u bytes
  464. # 2 bytes: unknown purpose
  465. # 2 bytes: length of unknown data + mentioned bytes
  466. # 1-9 bytes: null-terminated file name
  467. # 1-4 bytes: null-terminated file extension
  468. >>12 uleshort &0x08
  469. >>>12 uleshort ^0x01
  470. >>>>12 uleshort ^0x02
  471. >>>>>12 uleshort ^0x04
  472. >>>>>>12 uleshort ^0x10
  473. >>>>>>>14 string x \b, %-.8s
  474. >>>>>>12 uleshort &0x10
  475. >>>>>>>14 string x \b, %-.8s
  476. >>>>>>>>&1 string x \b.%-.3s
  477. >>>>>12 uleshort &0x04
  478. >>>>>>12 uleshort ^0x10
  479. >>>>>>>(14.s) uleshort x
  480. >>>>>>>>&14 string x \b, %-.8s
  481. >>>>>>12 uleshort &0x10
  482. >>>>>>>(14.s) uleshort x
  483. >>>>>>>>&14 string x \b, %-.8s
  484. >>>>>>>>>&1 string x \b.%-.3s
  485. >>>>12 uleshort &0x02
  486. >>>>>12 uleshort ^0x04
  487. >>>>>>12 uleshort ^0x10
  488. >>>>>>>16 string x \b, %-.8s
  489. >>>>>>12 uleshort &0x10
  490. >>>>>>>16 string x \b, %-.8s
  491. >>>>>>>>&1 string x \b.%-.3s
  492. >>>>>12 uleshort &0x04
  493. >>>>>>12 uleshort ^0x10
  494. >>>>>>>(16.s) uleshort x
  495. >>>>>>>>&16 string x \b, %-.8s
  496. >>>>>>12 uleshort &0x10
  497. >>>>>>>(16.s) uleshort x
  498. >>>>>>>&16 string x %-.8s
  499. >>>>>>>>&1 string x \b.%-.3s
  500. >>>12 uleshort &0x01
  501. >>>>12 uleshort ^0x02
  502. >>>>>12 uleshort ^0x04
  503. >>>>>>12 uleshort ^0x10
  504. >>>>>>>18 string x \b, %-.8s
  505. >>>>>>12 uleshort &0x10
  506. >>>>>>>18 string x \b, %-.8s
  507. >>>>>>>>&1 string x \b.%-.3s
  508. >>>>>12 uleshort &0x04
  509. >>>>>>12 uleshort ^0x10
  510. >>>>>>>(18.s) uleshort x
  511. >>>>>>>>&18 string x \b, %-.8s
  512. >>>>>>12 uleshort &0x10
  513. >>>>>>>(18.s) uleshort x
  514. >>>>>>>>&18 string x \b, %-.8s
  515. >>>>>>>>>&1 string x \b.%-.3s
  516. >>>>12 uleshort &0x02
  517. >>>>>12 uleshort ^0x04
  518. >>>>>>12 uleshort ^0x10
  519. >>>>>>>20 string x \b, %-.8s
  520. >>>>>>12 uleshort &0x10
  521. >>>>>>>20 string x \b, %-.8s
  522. >>>>>>>>&1 string x \b.%-.3s
  523. >>>>>12 uleshort &0x04
  524. >>>>>>12 uleshort ^0x10
  525. >>>>>>>(20.s) uleshort x
  526. >>>>>>>>&20 string x \b, %-.8s
  527. >>>>>>12 uleshort &0x10
  528. >>>>>>>(20.s) uleshort x
  529. >>>>>>>>&20 string x \b, %-.8s
  530. >>>>>>>>>&1 string x \b.%-.3s
  531. # 2 bytes: length of data + mentioned bytes
  532. #
  533. # SZDD variant Haruhiko Okumura's LZSS or 7z type MsLZ
  534. >0 string SZDD MS Compress archive data, SZDD variant
  535. !:mime application/x-ms-compress-szdd
  536. !:ext ??_
  537. # The character missing from the end of the filename (0=unknown)
  538. >>9 string >\0 \b, %-.1s is last character of original name
  539. # https://www.betaarchive.com/forum/viewtopic.php?t=26161
  540. # Compression mode: "A" (0x41) found but sometimes "B" in Windows 3.1 builds 026 and 034e
  541. >>8 string !A \b, %-.1s method
  542. >>10 ulelong >0 \b, original size: %u bytes
  543. # QBasic SZDD variant
  544. 3 string \x88\xf0\x27
  545. >0 string SZ\x20 MS Compress archive data, QBasic variant
  546. !:mime application/x-ms-compress-sz
  547. !:ext ??$
  548. >>8 ulelong >0 \b, original size: %u bytes
  549. # MP3 (archiver, not lossy audio compression)
  550. 0 string MP3\x1a MP3-Archiver archive data
  551. # ZET
  552. 0 string OZ\xc3\x9d ZET archive data
  553. # TSComp
  554. 0 string \x65\x5d\x13\x8c\x08\x01\x03\x00 TSComp archive data
  555. # ARQ
  556. 0 string gW\4\1 ARQ archive data
  557. # Squash
  558. 3 string OctSqu Squash archive data
  559. # Terse
  560. 0 string \5\1\1\0 Terse archive data
  561. # PUCrunch
  562. 0 string \x01\x08\x0b\x08\xef\x00\x9e\x32\x30\x36\x31 PUCrunch archive data
  563. # UHarc
  564. 0 string UHA UHarc archive data
  565. # ABComp
  566. 0 string \2AB ABComp archive data
  567. 0 string \3AB2 ABComp archive data
  568. # CMP
  569. 0 string CO\0 CMP archive data
  570. # Splint
  571. 0 string \x93\xb9\x06 Splint archive data
  572. # InstallShield
  573. 0 string \x13\x5d\x65\x8c InstallShield Z archive Data
  574. # Gather
  575. 1 string GTH Gather archive data
  576. # BOA
  577. 0 string BOA BOA archive data
  578. # RAX
  579. 0 string ULEB\xa RAX archive data
  580. # Xtreme
  581. 0 string ULEB\0 Xtreme archive data
  582. # Pack Magic
  583. 0 string @\xc3\xa2\1\0 Pack Magic archive data
  584. # BTS
  585. 0 belong&0xfeffffff 0x1a034465 BTS archive data
  586. # ELI 5750
  587. 0 string Ora\ ELI 5750 archive data
  588. # QFC
  589. 0 string \x1aFC\x1a QFC archive data
  590. 0 string \x1aQF\x1a QFC archive data
  591. # PRO-PACK
  592. 0 string RNC PRO-PACK archive data
  593. # 777
  594. 0 string 777 777 archive data
  595. # LZS221
  596. 0 string sTaC LZS221 archive data
  597. # HPA
  598. 0 string HPA HPA archive data
  599. # Arhangel
  600. 0 string LG Arhangel archive data
  601. # EXP1, uses bzip2
  602. 0 string 0123456789012345BZh EXP1 archive data
  603. # IMP
  604. 0 string IMP\xa IMP archive data
  605. # NRV
  606. 0 string \x00\x9E\x6E\x72\x76\xFF NRV archive data
  607. # Squish
  608. 0 string \x73\xb2\x90\xf4 Squish archive data
  609. # Par
  610. 0 string PHILIPP Par archive data
  611. 0 string PAR Par archive data
  612. # HIT
  613. 0 string UB HIT archive data
  614. # SBX
  615. 0 belong&0xfffff000 0x53423000 SBX archive data
  616. # NaShrink
  617. 0 string NSK NaShrink archive data
  618. # SAPCAR
  619. 0 string #\ CAR\ archive\ header SAPCAR archive data
  620. 0 string CAR\ 2.00RG SAPCAR archive data
  621. # Disintegrator
  622. 0 string DST Disintegrator archive data
  623. # ASD
  624. 0 string ASD ASD archive data
  625. # InstallShield CAB
  626. 0 string ISc( InstallShield CAB
  627. # TOP4
  628. 0 string T4\x1a TOP4 archive data
  629. # BatComp left out: sig looks like COM executable
  630. # so TODO: get real 4dos batcomp file and find sig
  631. # BlakHole
  632. 0 string BH\5\7 BlakHole archive data
  633. # BIX
  634. 0 string BIX0 BIX archive data
  635. # ChiefLZA
  636. 0 string ChfLZ ChiefLZA archive data
  637. # Blink
  638. 0 string Blink Blink archive data
  639. # Logitech Compress
  640. 0 string \xda\xfa Logitech Compress archive data
  641. # ARS-Sfx (FIXME: really a SFX? then goto COM/EXE)
  642. 1 string (C)\ STEPANYUK ARS-Sfx archive data
  643. # AKT/AKT32
  644. 0 string AKT32 AKT32 archive data
  645. 0 string AKT AKT archive data
  646. # NPack
  647. 0 string MSTSM NPack archive data
  648. # PFT
  649. 0 string \0\x50\0\x14 PFT archive data
  650. # SemOne
  651. 0 string SEM SemOne archive data
  652. # PPMD
  653. 0 string \x8f\xaf\xac\x84 PPMD archive data
  654. # FIZ
  655. 0 string FIZ FIZ archive data
  656. # MSXiE
  657. 0 belong&0xfffff0f0 0x4d530000 MSXiE archive data
  658. # DeepFreezer
  659. 0 belong&0xfffffff0 0x797a3030 DeepFreezer archive data
  660. # DC
  661. 0 string =<DC- DC archive data
  662. # TPac
  663. 0 string \4TPAC\3 TPac archive data
  664. # Ai
  665. 0 string Ai\1\1\0 Ai archive data
  666. 0 string Ai\1\0\0 Ai archive data
  667. # Ai32
  668. 0 string Ai\2\0 Ai32 archive data
  669. 0 string Ai\2\1 Ai32 archive data
  670. # SBC
  671. 0 string SBC SBC archive data
  672. # Ybs
  673. 0 string YBS Ybs archive data
  674. # DitPack
  675. 0 string \x9e\0\0 DitPack archive data
  676. # DMS
  677. 0 string DMS! DMS archive data
  678. # EPC
  679. 0 string \x8f\xaf\xac\x8c EPC archive data
  680. # VSARC
  681. 0 string VS\x1a VSARC archive data
  682. # PDZ
  683. 0 string PDZ PDZ archive data
  684. # ReDuq
  685. 0 string rdqx ReDuq archive data
  686. # GCA
  687. 0 string GCAX GCA archive data
  688. # PPMN
  689. 0 string pN PPMN archive data
  690. # WinImage
  691. 3 string WINIMAGE WinImage archive data
  692. # Compressia
  693. 0 string CMP0CMP Compressia archive data
  694. # UHBC
  695. 0 string UHB UHBC archive data
  696. # WinHKI
  697. 0 string \x61\x5C\x04\x05 WinHKI archive data
  698. # WWPack data file
  699. 0 string WWP WWPack archive data
  700. # BSN (BSA, PTS-DOS)
  701. 0 string \xffBSG BSN archive data
  702. 1 string \xffBSG BSN archive data
  703. 3 string \xffBSG BSN archive data
  704. 1 string \0\xae\2 BSN archive data
  705. 1 string \0\xae\3 BSN archive data
  706. 1 string \0\xae\7 BSN archive data
  707. # AIN
  708. 0 string \x33\x18 AIN archive data
  709. 0 string \x33\x17 AIN archive data
  710. # XPA32 test moved and merged with XPA by Joerg Jenderek at Sep 2015
  711. # SZip (TODO: doesn't catch all versions)
  712. 0 string SZ\x0a\4 SZip archive data
  713. # XPack DiskImage
  714. # *.XDI updated by Joerg Jenderek Sep 2015
  715. # ftp://ftp.sac.sk/pub/sac/pack/0index.txt
  716. # GRR: this test is still too general as it catches also text files starting with jm
  717. 0 string jm
  718. # only found examples with this additional characteristic 2 bytes
  719. >2 string \x2\x4 Xpack DiskImage archive data
  720. #!:ext xdi
  721. # XPack Data
  722. # *.xpa updated by Joerg Jenderek Sep 2015
  723. # ftp://ftp.elf.stuba.sk/pub/pc/pack/
  724. 0 string xpa XPA
  725. !:ext xpa
  726. # XPA32
  727. # ftp://ftp.elf.stuba.sk/pub/pc/pack/xpa32.zip
  728. # created by XPA32.EXE version 1.0.2 for Windows
  729. >0 string xpa\0\1 \b32 archive data
  730. # created by XPACK.COM version 1.67m or 1.67r with short 0x1800
  731. >3 ubeshort !0x0001 \bck archive data
  732. # XPack Single Data
  733. # changed by Joerg Jenderek Sep 2015 back to like in version 5.12
  734. # letter 'I'+ acute accent is equivalent to \xcd
  735. 0 string \xcd\ jm Xpack single archive data
  736. #!:mime application/x-xpa-compressed
  737. !:ext xpa
  738. # TODO: missing due to unknown magic/magic at end of file:
  739. #DWC
  740. #ARG
  741. #ZAR
  742. #PC/3270
  743. #InstallIt
  744. #RKive
  745. #RK
  746. #XPack Diskimage
  747. # These were inspired by idarc, but actually verified
  748. # Dzip archiver (.dz)
  749. # Update: Joerg Jenderek
  750. # URL: http://speeddemosarchive.com/dzip/
  751. # reference: http://speeddemosarchive.com/dzip/dz29src.zip/main.c
  752. # GRR: line below is too general as it matches also ASCII texts like Doszip commander help dz.txt
  753. 0 string DZ
  754. # latest version is 2.9 dated 7 may 2003
  755. >2 byte <4 Dzip archive data
  756. !:mime application/x-dzip
  757. !:ext dz
  758. >>2 byte x \b, version %i
  759. >>3 byte x \b.%i
  760. >>4 ulelong x \b, offset 0x%x
  761. >>8 ulelong x \b, %u files
  762. # ZZip archiver (.zz)
  763. 0 string ZZ\ \0\0 ZZip archive data
  764. 0 string ZZ0 ZZip archive data
  765. # PAQ archiver (.paq)
  766. 0 string \xaa\x40\x5f\x77\x1f\xe5\x82\x0d PAQ archive data
  767. 0 string PAQ PAQ archive data
  768. >3 byte&0xf0 0x30
  769. >>3 byte x (v%c)
  770. # JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP)
  771. 0xe string \x1aJar\x1b JAR (ARJ Software, Inc.) archive data
  772. 0 string JARCS JAR (ARJ Software, Inc.) archive data
  773. # ARJ archiver (jason@jarthur.Claremont.EDU)
  774. 0 leshort 0xea60 ARJ archive data
  775. !:mime application/x-arj
  776. >5 byte x \b, v%d,
  777. >8 byte &0x04 multi-volume,
  778. >8 byte &0x10 slash-switched,
  779. >8 byte &0x20 backup,
  780. >34 string x original name: %s,
  781. >7 byte 0 os: MS-DOS
  782. >7 byte 1 os: PRIMOS
  783. >7 byte 2 os: Unix
  784. >7 byte 3 os: Amiga
  785. >7 byte 4 os: Macintosh
  786. >7 byte 5 os: OS/2
  787. >7 byte 6 os: Apple ][ GS
  788. >7 byte 7 os: Atari ST
  789. >7 byte 8 os: NeXT
  790. >7 byte 9 os: VAX/VMS
  791. >3 byte >0 %d]
  792. # [JW] idarc says this is also possible
  793. 2 leshort 0xea60 ARJ archive data
  794. # HA archiver (Greg Roelofs, newt@uchicago.edu)
  795. # This is a really bad format. A file containing HAWAII will match this...
  796. #0 string HA HA archive data,
  797. #>2 leshort =1 1 file,
  798. #>2 leshort >1 %hu files,
  799. #>4 byte&0x0f =0 first is type CPY
  800. #>4 byte&0x0f =1 first is type ASC
  801. #>4 byte&0x0f =2 first is type HSC
  802. #>4 byte&0x0f =0x0e first is type DIR
  803. #>4 byte&0x0f =0x0f first is type SPECIAL
  804. # suggestion: at least identify small archives (<1024 files)
  805. 0 belong&0xffff00fc 0x48410000 HA archive data
  806. >2 leshort =1 1 file,
  807. >2 leshort >1 %u files,
  808. >4 byte&0x0f =0 first is type CPY
  809. >4 byte&0x0f =1 first is type ASC
  810. >4 byte&0x0f =2 first is type HSC
  811. >4 byte&0x0f =0x0e first is type DIR
  812. >4 byte&0x0f =0x0f first is type SPECIAL
  813. # HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz)
  814. 0 string HPAK HPACK archive data
  815. # JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net
  816. 0 string \351,\001JAM\ JAM archive,
  817. >7 string >\0 version %.4s
  818. >0x26 byte =0x27 -
  819. >>0x2b string >\0 label %.11s,
  820. >>0x27 lelong x serial %08x,
  821. >>0x36 string >\0 fstype %.8s
  822. # LHARC/LHA archiver (Greg Roelofs, newt@uchicago.edu)
  823. # Update: Joerg Jenderek
  824. # URL: https://en.wikipedia.org/wiki/LHA_(file_format)
  825. # Reference: https://web.archive.org/web/20021005080911/http://www.osirusoft.com/joejared/lzhformat.html
  826. #
  827. # check and display information of lharc (LHa,PMarc) file
  828. 0 name lharc-file
  829. # check 1st character of method id like -lz4- -lh5- or -pm2-
  830. >2 string -
  831. # check 5th character of method id
  832. >>6 string -
  833. # check header level 0 1 2 3
  834. >>>20 ubyte <4
  835. # check 2nd, 3th and 4th character of method id
  836. >>>>3 regex \^(lh[0-9a-ex]|lz[s2-8]|pm[012]|pc1) \b
  837. !:mime application/x-lzh-compressed
  838. # creator type "LHA "
  839. !:apple ????LHA
  840. # display archive type name like "LHa/LZS archive data" or "LArc archive"
  841. >>>>>2 string -lz \b
  842. !:ext lzs
  843. # already known -lzs- -lz4- -lz5- with old names
  844. >>>>>>2 string -lzs LHa/LZS archive data
  845. >>>>>>3 regex \^lz[45] LHarc 1.x archive data
  846. # missing -lz?- with wikipedia names
  847. >>>>>>3 regex \^lz[2378] LArc archive
  848. # display archive type name like "LHa (2.x) archive data"
  849. >>>>>2 string -lh \b
  850. # already known -lh0- -lh1- -lh2- -lh3- -lh4- -lh5- -lh6- -lh7- -lhd- variants with old names
  851. >>>>>>3 regex \^lh[01] LHarc 1.x/ARX archive data
  852. # LHice archiver use ".ICE" as name extension instead usual one ".lzh"
  853. # FOOBAR archiver use ".foo" as name extension instead usual one
  854. # "Florain Orjanov's and Olga Bachetska's ARchiver" not found at the moment
  855. >>>>>>>2 string -lh1 \b
  856. !:ext lha/lzh/ice
  857. >>>>>>3 regex \^lh[23d] LHa 2.x? archive data
  858. >>>>>>3 regex \^lh[7] LHa (2.x)/LHark archive data
  859. >>>>>>3 regex \^lh[456] LHa (2.x) archive data
  860. >>>>>>>2 string -lh5 \b
  861. # https://en.wikipedia.org/wiki/BIOS
  862. # Some mainboard BIOS like Award use LHa compression. So archives with unusal extension are found like
  863. # bios.rom , kd7_v14.bin, 1010.004, ...
  864. !:ext lha/lzh/rom/bin
  865. # missing -lh?- variants (Joe Jared)
  866. >>>>>>3 regex \^lh[89a-ce] LHa (Joe Jared) archive
  867. # UNLHA32 2.67a
  868. >>>>>>2 string -lhx LHa (UNLHA32) archive
  869. # lha archives with standard file name extensions ".lha" ".lzh"
  870. >>>>>>3 regex !\^(lh1|lh5) \b
  871. !:ext lha/lzh
  872. # this should not happen if all -lh variants are described
  873. >>>>>>2 default x LHa (unknown) archive
  874. #!:ext lha
  875. # PMarc
  876. >>>>>3 regex \^pm[012] PMarc archive data
  877. !:ext pma
  878. # append method id without leading and trailing minus character
  879. >>>>>3 string x [%3.3s]
  880. >>>>>>0 use lharc-header
  881. #
  882. # check and display information of lharc header
  883. 0 name lharc-header
  884. # header size 0x4 , 0x1b-0x61
  885. >0 ubyte x
  886. # compressed data size != compressed file size
  887. #>7 ulelong x \b, data size %d
  888. # attribute: 0x2~?? 0x10~symlink|target 0x20~normal
  889. #>19 ubyte x \b, 19_0x%x
  890. # level identifier 0 1 2 3
  891. #>20 ubyte x \b, level %d
  892. # time stamp
  893. #>15 ubelong x DATE 0x%8.8x
  894. # OS ID for level 1
  895. >20 ubyte 1
  896. # 0x20 types find for *.rom files
  897. >>(21.b+24) ubyte <0x21 \b, 0x%x OS
  898. # ascii type like M for MSDOS
  899. >>(21.b+24) ubyte >0x20 \b, '%c' OS
  900. # OS ID for level 2
  901. >20 ubyte 2
  902. #>>23 ubyte x \b, OS ID 0x%x
  903. >>23 ubyte <0x21 \b, 0x%x OS
  904. >>23 ubyte >0x20 \b, '%c' OS
  905. # filename only for level 0 and 1
  906. >20 ubyte <2
  907. # length of filename
  908. >>21 ubyte >0 \b, with
  909. # filename
  910. >>>21 pstring x "%s"
  911. #
  912. #2 string -lh0- LHarc 1.x/ARX archive data [lh0]
  913. #!:mime application/x-lharc
  914. 2 string -lh0-
  915. >0 use lharc-file
  916. #2 string -lh1- LHarc 1.x/ARX archive data [lh1]
  917. #!:mime application/x-lharc
  918. 2 string -lh1-
  919. >0 use lharc-file
  920. # NEW -lz2- ... -lz8-
  921. 2 string -lz2-
  922. >0 use lharc-file
  923. 2 string -lz3-
  924. >0 use lharc-file
  925. 2 string -lz4-
  926. >0 use lharc-file
  927. 2 string -lz5-
  928. >0 use lharc-file
  929. 2 string -lz7-
  930. >0 use lharc-file
  931. 2 string -lz8-
  932. >0 use lharc-file
  933. # [never seen any but the last; -lh4- reported in comp.compression:]
  934. #2 string -lzs- LHa/LZS archive data [lzs]
  935. 2 string -lzs-
  936. >0 use lharc-file
  937. # According to wikipedia and others such a version does not exist
  938. #2 string -lh\40- LHa 2.x? archive data [lh ]
  939. #2 string -lhd- LHa 2.x? archive data [lhd]
  940. 2 string -lhd-
  941. >0 use lharc-file
  942. #2 string -lh2- LHa 2.x? archive data [lh2]
  943. 2 string -lh2-
  944. >0 use lharc-file
  945. #2 string -lh3- LHa 2.x? archive data [lh3]
  946. 2 string -lh3-
  947. >0 use lharc-file
  948. #2 string -lh4- LHa (2.x) archive data [lh4]
  949. 2 string -lh4-
  950. >0 use lharc-file
  951. #2 string -lh5- LHa (2.x) archive data [lh5]
  952. 2 string -lh5-
  953. >0 use lharc-file
  954. #2 string -lh6- LHa (2.x) archive data [lh6]
  955. 2 string -lh6-
  956. >0 use lharc-file
  957. #2 string -lh7- LHa (2.x)/LHark archive data [lh7]
  958. 2 string -lh7-
  959. # !:mime application/x-lha
  960. # >20 byte x - header level %d
  961. >0 use lharc-file
  962. # NEW -lh8- ... -lhe- , -lhx-
  963. 2 string -lh8-
  964. >0 use lharc-file
  965. 2 string -lh9-
  966. >0 use lharc-file
  967. 2 string -lha-
  968. >0 use lharc-file
  969. 2 string -lhb-
  970. >0 use lharc-file
  971. 2 string -lhc-
  972. >0 use lharc-file
  973. 2 string -lhe-
  974. >0 use lharc-file
  975. 2 string -lhx-
  976. >0 use lharc-file
  977. # taken from idarc [JW]
  978. 2 string -lZ PUT archive data
  979. # already done by LHarc magics
  980. # this should never happen if all sub types of LZS archive are identified
  981. #2 string -lz LZS archive data
  982. 2 string -sw1- Swag archive data
  983. 0 name rar-file-header
  984. >24 byte 15 \b, v1.5
  985. >24 byte 20 \b, v2.0
  986. >24 byte 29 \b, v4
  987. >15 byte 0 \b, os: MS-DOS
  988. >15 byte 1 \b, os: OS/2
  989. >15 byte 2 \b, os: Win32
  990. >15 byte 3 \b, os: Unix
  991. >15 byte 4 \b, os: Mac OS
  992. >15 byte 5 \b, os: BeOS
  993. 0 name rar-archive-header
  994. >3 leshort&0x1ff >0 \b, flags:
  995. >>3 leshort &0x01 ArchiveVolume
  996. >>3 leshort &0x02 Commented
  997. >>3 leshort &0x04 Locked
  998. >>3 leshort &0x10 NewVolumeNaming
  999. >>3 leshort &0x08 Solid
  1000. >>3 leshort &0x20 Authenticated
  1001. >>3 leshort &0x40 RecoveryRecordPresent
  1002. >>3 leshort &0x80 EncryptedBlockHeader
  1003. >>3 leshort &0x100 FirstVolume
  1004. # RAR (Roshal Archive) archive
  1005. 0 string Rar!\x1a\7\0 RAR archive data
  1006. !:mime application/x-rar
  1007. !:ext rar/cbr
  1008. # file header
  1009. >(0xc.l+9) byte 0x74
  1010. >>(0xc.l+7) use rar-file-header
  1011. # subblock seems to share information with file header
  1012. >(0xc.l+9) byte 0x7a
  1013. >>(0xc.l+7) use rar-file-header
  1014. >9 byte 0x73
  1015. >>7 use rar-archive-header
  1016. 0 string Rar!\x1a\7\1\0 RAR archive data, v5
  1017. !:mime application/x-rar
  1018. !:ext rar
  1019. # Very old RAR archive
  1020. # https://jasonblanks.com/wp-includes/images/papers/KnowyourarchiveRAR.pdf
  1021. 0 string RE\x7e\x5e RAR archive data (<v1.5)
  1022. !:mime application/x-rar
  1023. !:ext rar/cbr
  1024. # SQUISH archiver (Greg Roelofs, newt@uchicago.edu)
  1025. 0 string SQSH squished archive data (Acorn RISCOS)
  1026. # UC2 archiver (Greg Roelofs, newt@uchicago.edu)
  1027. # [JW] see exe section for self-extracting version
  1028. 0 string UC2\x1a UC2 archive data
  1029. # PKZIP multi-volume archive
  1030. 0 string PK\x07\x08PK\x03\x04 Zip multi-volume archive data, at least PKZIP v2.50 to extract
  1031. !:mime application/zip
  1032. !:ext zip/cbz
  1033. # Zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
  1034. 0 string PK\005\006 Zip archive data (empty)
  1035. !:mime application/zip
  1036. !:ext zip/cbz
  1037. !:strength +1
  1038. 0 string PK\003\004
  1039. !:strength +1
  1040. # Specialised zip formats which start with a member named 'mimetype'
  1041. # (stored uncompressed, with no 'extra field') containing the file's MIME type.
  1042. # Check for have 8-byte name, 0-byte extra field, name "mimetype", and
  1043. # contents starting with "application/":
  1044. >26 string \x8\0\0\0mimetypeapplication/
  1045. # KOffice / OpenOffice & StarOffice / OpenDocument formats
  1046. # From: Abel Cheung <abel@oaka.org>
  1047. # KOffice (1.2 or above) formats
  1048. # (mimetype contains "application/vnd.kde.<SUBTYPE>")
  1049. >>50 string vnd.kde. KOffice (>=1.2)
  1050. >>>58 string karbon Karbon document
  1051. >>>58 string kchart KChart document
  1052. >>>58 string kformula KFormula document
  1053. >>>58 string kivio Kivio document
  1054. >>>58 string kontour Kontour document
  1055. >>>58 string kpresenter KPresenter document
  1056. >>>58 string kspread KSpread document
  1057. >>>58 string kword KWord document
  1058. # OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7)
  1059. # (mimetype contains "application/vnd.sun.xml.<SUBTYPE>")
  1060. >>50 string vnd.sun.xml. OpenOffice.org 1.x
  1061. >>>62 string writer Writer
  1062. >>>>68 byte !0x2e document
  1063. >>>>68 string .template template
  1064. >>>>68 string .global global document
  1065. >>>62 string calc Calc
  1066. >>>>66 byte !0x2e spreadsheet
  1067. >>>>66 string .template template
  1068. >>>62 string draw Draw
  1069. >>>>66 byte !0x2e document
  1070. >>>>66 string .template template
  1071. >>>62 string impress Impress
  1072. >>>>69 byte !0x2e presentation
  1073. >>>>69 string .template template
  1074. >>>62 string math Math document
  1075. >>>62 string base Database file
  1076. # OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8)
  1077. # https://lists.oasis-open.org/archives/office/200505/msg00006.html
  1078. # (mimetype contains "application/vnd.oasis.opendocument.<SUBTYPE>")
  1079. >>50 string vnd.oasis.opendocument. OpenDocument
  1080. >>>73 string text
  1081. >>>>77 byte !0x2d Text
  1082. !:mime application/vnd.oasis.opendocument.text
  1083. >>>>77 string -template Text Template
  1084. !:mime application/vnd.oasis.opendocument.text-template
  1085. >>>>77 string -web HTML Document Template
  1086. !:mime application/vnd.oasis.opendocument.text-web
  1087. >>>>77 string -master Master Document
  1088. !:mime application/vnd.oasis.opendocument.text-master
  1089. >>>73 string graphics
  1090. >>>>81 byte !0x2d Drawing
  1091. !:mime application/vnd.oasis.opendocument.graphics
  1092. >>>>81 string -template Template
  1093. !:mime application/vnd.oasis.opendocument.graphics-template
  1094. >>>73 string presentation
  1095. >>>>85 byte !0x2d Presentation
  1096. !:mime application/vnd.oasis.opendocument.presentation
  1097. >>>>85 string -template Template
  1098. !:mime application/vnd.oasis.opendocument.presentation-template
  1099. >>>73 string spreadsheet
  1100. >>>>84 byte !0x2d Spreadsheet
  1101. !:mime application/vnd.oasis.opendocument.spreadsheet
  1102. >>>>84 string -template Template
  1103. !:mime application/vnd.oasis.opendocument.spreadsheet-template
  1104. >>>73 string chart
  1105. >>>>78 byte !0x2d Chart
  1106. !:mime application/vnd.oasis.opendocument.chart
  1107. >>>>78 string -template Template
  1108. !:mime application/vnd.oasis.opendocument.chart-template
  1109. >>>73 string formula
  1110. >>>>80 byte !0x2d Formula
  1111. !:mime application/vnd.oasis.opendocument.formula
  1112. >>>>80 string -template Template
  1113. !:mime application/vnd.oasis.opendocument.formula-template
  1114. >>>73 string database Database
  1115. !:mime application/vnd.oasis.opendocument.database
  1116. # Valid for LibreOffice Base 6.0.1.1 at least
  1117. >>>73 string base Database
  1118. !:mime application/vnd.oasis.opendocument.base
  1119. >>>73 string image
  1120. >>>>78 byte !0x2d Image
  1121. !:mime application/vnd.oasis.opendocument.image
  1122. >>>>78 string -template Template
  1123. !:mime application/vnd.oasis.opendocument.image-template
  1124. # EPUB (OEBPS) books using OCF (OEBPS Container Format)
  1125. # https://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4.
  1126. # From: Ralf Brown <ralf.brown@gmail.com>
  1127. >>50 string epub+zip EPUB document
  1128. !:mime application/epub+zip
  1129. # Catch other ZIP-with-mimetype formats
  1130. # In a ZIP file, the bytes immediately after a member's contents are
  1131. # always "PK". The 2 regex rules here print the "mimetype" member's
  1132. # contents up to the first 'P'. Luckily, most MIME types don't contain
  1133. # any capital 'P's. This is a kludge.
  1134. # (mimetype contains "application/<OTHER>")
  1135. >>50 string !epub+zip
  1136. >>>50 string !vnd.oasis.opendocument.
  1137. >>>>50 string !vnd.sun.xml.
  1138. >>>>>50 string !vnd.kde.
  1139. >>>>>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?)
  1140. !:mime application/zip
  1141. # (mimetype contents other than "application/*")
  1142. >26 string \x8\0\0\0mimetype
  1143. >>38 string !application/
  1144. >>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?)
  1145. !:mime application/zip
  1146. # Java Jar files
  1147. >(26.s+30) leshort 0xcafe Java archive data (JAR)
  1148. !:mime application/java-archive
  1149. # iOS App
  1150. >(26.s+30) leshort !0xcafe
  1151. >>26 string !\x8\0\0\0mimetype
  1152. >>>30 string Payload/
  1153. >>>>38 search/64 .app/ iOS App
  1154. !:mime application/x-ios-app
  1155. # Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
  1156. # Next line excludes specialized formats:
  1157. >(26.s+30) leshort !0xcafe
  1158. >>26 string !\x8\0\0\0mimetype Zip archive data
  1159. !:mime application/zip
  1160. >>>4 beshort x \b, at least
  1161. >>>4 use zipversion
  1162. >>>4 beshort x to extract
  1163. >>>0x161 string WINZIP \b, WinZIP self-extracting
  1164. # StarView Metafile
  1165. # From Pierre Ducroquet <pinaraf@pinaraf.info>
  1166. 0 string VCLMTF StarView MetaFile
  1167. >6 beshort x \b, version %d
  1168. >8 belong x \b, size %d
  1169. # Zoo archiver
  1170. 20 lelong 0xfdc4a7dc Zoo archive data
  1171. !:mime application/x-zoo
  1172. >4 byte >48 \b, v%c.
  1173. >>6 byte >47 \b%c
  1174. >>>7 byte >47 \b%c
  1175. >32 byte >0 \b, modify: v%d
  1176. >>33 byte x \b.%d+
  1177. >42 lelong 0xfdc4a7dc \b,
  1178. >>70 byte >0 extract: v%d
  1179. >>>71 byte x \b.%d+
  1180. # Shell archives
  1181. 10 string #\ This\ is\ a\ shell\ archive shell archive text
  1182. !:mime application/octet-stream
  1183. #
  1184. # LBR. NB: May conflict with the questionable
  1185. # "binary Computer Graphics Metafile" format.
  1186. #
  1187. 0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data
  1188. #
  1189. # PMA (CP/M derivative of LHA)
  1190. # Update: Joerg Jenderek
  1191. # URL: https://en.wikipedia.org/wiki/LHA_(file_format)
  1192. #
  1193. #2 string -pm0- PMarc archive data [pm0]
  1194. 2 string -pm0-
  1195. >0 use lharc-file
  1196. #2 string -pm1- PMarc archive data [pm1]
  1197. 2 string -pm1-
  1198. >0 use lharc-file
  1199. #2 string -pm2- PMarc archive data [pm2]
  1200. 2 string -pm2-
  1201. >0 use lharc-file
  1202. 2 string -pms- PMarc SFX archive (CP/M, DOS)
  1203. #!:mime application/x-foobar-exec
  1204. !:ext com
  1205. 5 string -pc1- PopCom compressed executable (CP/M)
  1206. #!:mime application/x-
  1207. #!:ext com
  1208. # From Rafael Laboissiere <rafael@laboissiere.net>
  1209. # The Project Revision Control System (see
  1210. # http://prcs.sourceforge.net) generates a packaged project
  1211. # file which is recognized by the following entry:
  1212. 0 leshort 0xeb81 PRCS packaged project
  1213. # Microsoft cabinets
  1214. # by David Necas (Yeti) <yeti@physics.muni.cz>
  1215. #0 string MSCF\0\0\0\0 Microsoft cabinet file data,
  1216. #>25 byte x v%d
  1217. #>24 byte x \b.%d
  1218. # MPi: All CABs have version 1.3, so this is pointless.
  1219. # Better magic in debian-additions.
  1220. # GTKtalog catalogs
  1221. # by David Necas (Yeti) <yeti@physics.muni.cz>
  1222. 4 string gtktalog\ GTKtalog catalog data,
  1223. >13 string 3 version 3
  1224. >>14 beshort 0x677a (gzipped)
  1225. >>14 beshort !0x677a (not gzipped)
  1226. >13 string >3 version %s
  1227. ############################################################################
  1228. # Parity archive reconstruction file, the 'par' file format now used on Usenet.
  1229. 0 string PAR\0 PARity archive data
  1230. >48 leshort =0 - Index file
  1231. >48 leshort >0 - file number %d
  1232. # Felix von Leitner <felix-file@fefe.de>
  1233. 0 string d8:announce BitTorrent file
  1234. !:mime application/x-bittorrent
  1235. # Durval Menezes, <jmgthbfile at durval dot com>
  1236. 0 string d13:announce-list BitTorrent file
  1237. !:mime application/x-bittorrent
  1238. # Atari MSA archive - Teemu Hukkanen <tjhukkan@iki.fi>
  1239. 0 beshort 0x0e0f Atari MSA archive data
  1240. >2 beshort x \b, %d sectors per track
  1241. >4 beshort 0 \b, 1 sided
  1242. >4 beshort 1 \b, 2 sided
  1243. >6 beshort x \b, starting track: %d
  1244. >8 beshort x \b, ending track: %d
  1245. # Alternate ZIP string (amc@arwen.cs.berkeley.edu)
  1246. 0 string PK00PK\003\004 Zip archive data
  1247. !:mime application/zip
  1248. !:ext zip/cbz
  1249. # ACE archive (from http://www.wotsit.org/download.asp?f=ace)
  1250. # by Stefan `Sec` Zehl <sec@42.org>
  1251. 7 string **ACE** ACE archive data
  1252. >15 byte >0 version %d
  1253. >16 byte =0x00 \b, from MS-DOS
  1254. >16 byte =0x01 \b, from OS/2
  1255. >16 byte =0x02 \b, from Win/32
  1256. >16 byte =0x03 \b, from Unix
  1257. >16 byte =0x04 \b, from MacOS
  1258. >16 byte =0x05 \b, from WinNT
  1259. >16 byte =0x06 \b, from Primos
  1260. >16 byte =0x07 \b, from AppleGS
  1261. >16 byte =0x08 \b, from Atari
  1262. >16 byte =0x09 \b, from Vax/VMS
  1263. >16 byte =0x0A \b, from Amiga
  1264. >16 byte =0x0B \b, from Next
  1265. >14 byte x \b, version %d to extract
  1266. >5 leshort &0x0080 \b, multiple volumes,
  1267. >>17 byte x \b (part %d),
  1268. >5 leshort &0x0002 \b, contains comment
  1269. >5 leshort &0x0200 \b, sfx
  1270. >5 leshort &0x0400 \b, small dictionary
  1271. >5 leshort &0x0800 \b, multi-volume
  1272. >5 leshort &0x1000 \b, contains AV-String
  1273. >>30 string \x16*UNREGISTERED\x20VERSION* (unregistered)
  1274. >5 leshort &0x2000 \b, with recovery record
  1275. >5 leshort &0x4000 \b, locked
  1276. >5 leshort &0x8000 \b, solid
  1277. # Date in MS-DOS format (whatever that is)
  1278. #>18 lelong x Created on
  1279. # sfArk : compression program for Soundfonts (sf2) by Dirk Jagdmann
  1280. # <doj@cubic.org>
  1281. 0x1A string sfArk sfArk compressed Soundfont
  1282. >0x15 string 2
  1283. >>0x1 string >\0 Version %s
  1284. >>0x2A string >\0 : %s
  1285. # DR-DOS 7.03 Packed File *.??_
  1286. 0 string Packed\ File\ Personal NetWare Packed File
  1287. >12 string x \b, was "%.12s"
  1288. # EET archive
  1289. # From: Tilman Sauerbeck <tilman@code-monkey.de>
  1290. 0 belong 0x1ee7ff00 EET archive
  1291. !:mime application/x-eet
  1292. # rzip archives
  1293. 0 string RZIP rzip compressed data
  1294. >4 byte x - version %d
  1295. >5 byte x \b.%d
  1296. >6 belong x (%d bytes)
  1297. # From: Joerg Jenderek
  1298. # URL: https://help.foxitsoftware.com/kb/install-fzip-file.php
  1299. # reference: http://mark0.net/download/triddefs_xml.7z/
  1300. # defs/f/fzip.trid.xml
  1301. # Note: unknown compression; No "PK" zip magic; normally in directory like
  1302. # "%APPDATA%\Foxit Software\Addon\Foxit Reader\Install"
  1303. 0 ubequad 0x2506781901010000 Foxit add-on/update
  1304. !:mime application/x-fzip
  1305. !:ext fzip
  1306. # From: "Robert Dale" <robdale@gmail.com>
  1307. 0 belong 123 dar archive,
  1308. >4 belong x label "%.8x
  1309. >>8 belong x %.8x
  1310. >>>12 beshort x %.4x"
  1311. >14 byte 0x54 end slice
  1312. >14 beshort 0x4e4e multi-part
  1313. >14 beshort 0x4e53 multi-part, with -S
  1314. # Symbian installation files
  1315. # https://www.thouky.co.uk/software/psifs/sis.html
  1316. # http://developer.symbian.com/main/downloads/papers/SymbianOSv91/softwareinstallsis.pdf
  1317. 8 lelong 0x10000419 Symbian installation file
  1318. !:mime application/vnd.symbian.install
  1319. >4 lelong 0x1000006D (EPOC release 3/4/5)
  1320. >4 lelong 0x10003A12 (EPOC release 6)
  1321. 0 lelong 0x10201A7A Symbian installation file (Symbian OS 9.x)
  1322. !:mime x-epoc/x-sisx-app
  1323. # From "Nelson A. de Oliveira" <naoliv@gmail.com>
  1324. 0 string MPQ\032 MoPaQ (MPQ) archive
  1325. # From: "Nelson A. de Oliveira" <naoliv@gmail.com>
  1326. # .kgb
  1327. 0 string KGB_arch KGB Archiver file
  1328. >10 string x with compression level %.1s
  1329. # xar (eXtensible ARchiver) archive
  1330. # URL: https://en.wikipedia.org/wiki/Xar_(archiver)
  1331. # xar archive format: https://code.google.com/p/xar/
  1332. # From: "David Remahl" <dremahl@apple.com>
  1333. # Update: Joerg Jenderek
  1334. # TODO: lzma compression; X509Data for pkg and xip
  1335. # Note: verified by `xar --dump-header -f FullBundleUpdate.xar` or
  1336. # 7z t -txar Xcode_10.2_beta_4.xip`
  1337. 0 string xar! xar archive
  1338. !:mime application/x-xar
  1339. # pkg for Mac OSX installer package like FullBundleUpdate.pkg
  1340. # xip for signed Apple software like Xcode_10.2_beta_4.xip
  1341. !:ext xar/pkg/xip
  1342. # always 28 in older archives
  1343. >4 ubeshort >28 \b, header size %u
  1344. # currently there exit only version 1 since about 2014
  1345. >6 ubeshort >1 version %u,
  1346. >8 ubequad x compressed TOC: %llu,
  1347. #>16 ubequad x uncompressed TOC: %llu,
  1348. # cksum_alg 0-2 in older and also 3-4 in newer
  1349. >24 belong 0 no checksum
  1350. >24 belong 1 SHA-1 checksum
  1351. >24 belong 2 MD5 checksum
  1352. >24 belong 3 SHA-256 checksum
  1353. >24 belong 4 SHA-512 checksum
  1354. >24 belong >4 unknown 0x%x checksum
  1355. #>24 belong >4 checksum
  1356. # For no compression jump 0 bytes
  1357. >24 belong 0
  1358. >>0 ubyte x
  1359. # jump more bytes forward by header size
  1360. >>>&(4.S) ubyte x
  1361. # jump more bytes forward by compressed table of contents size
  1362. #>>>>&(8.Q) ubequad x \b, heap data 0x%llx
  1363. >>>>&(8.Q) ubyte x
  1364. # look for data by ./compress after message with 1 space at end
  1365. >>>>>&-3 indirect x \b, contains
  1366. # For SHA-1 jump 20 minus 2 bytes
  1367. >24 belong 1
  1368. >>18 ubyte x
  1369. # jump more bytes forward by header size
  1370. >>>&(4.S) ubyte x
  1371. # jump more bytes forward by compressed table of contents size
  1372. >>>>&(8.Q) ubyte x
  1373. # data compressed by gzip, bzip, lzma or none
  1374. >>>>>&-1 indirect x \b, contains
  1375. # For SHA-256 jump 32 minus 2 bytes
  1376. >24 belong 3
  1377. >>30 ubyte x
  1378. # jump more bytes forward by header size
  1379. >>>&(4.S) ubyte x
  1380. # jump more bytes forward by compressed table of contents size
  1381. >>>>&(8.Q) ubyte x
  1382. >>>>>&-1 indirect x \b, contains
  1383. # For SHA-512 jump 64 minus 2 bytes
  1384. >24 belong 4
  1385. >>62 ubyte x
  1386. # jump more bytes forward by header size
  1387. >>>&(4.S) ubyte x
  1388. # jump more bytes forward by compressed table of contents size
  1389. >>>>&(8.Q) ubyte x
  1390. >>>>>&-1 indirect x \b, contains
  1391. # Type: Parity Archive
  1392. # From: Daniel van Eeden <daniel_e@dds.nl>
  1393. 0 string PAR2 Parity Archive Volume Set
  1394. # Bacula volume format. (Volumes always start with a block header.)
  1395. # URL: https://bacula.org/3.0.x-manuals/en/developers/developers/Block_Header.html
  1396. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  1397. 12 string BB02 Bacula volume
  1398. >20 bedate x \b, started %s
  1399. # ePub is XHTML + XML inside a ZIP archive. The first member of the
  1400. # archive must be an uncompressed file called 'mimetype' with contents
  1401. # 'application/epub+zip'
  1402. # From: "Michael Gorny" <mgorny@gentoo.org>
  1403. # ZPAQ: http://mattmahoney.net/dc/zpaq.html
  1404. 0 string zPQ ZPAQ stream
  1405. >3 byte x \b, level %d
  1406. # From: Barry Carter <carter.barry@gmail.com>
  1407. # https://encode.ru/threads/456-zpaq-updates/page32
  1408. 0 string 7kSt ZPAQ file
  1409. # BBeB ebook, unencrypted (LRF format)
  1410. # URL: https://www.sven.de/librie/Librie/LrfFormat
  1411. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  1412. 0 string L\0R\0F\0\0\0 BBeB ebook data, unencrypted
  1413. >8 beshort x \b, version %d
  1414. >36 byte 1 \b, front-to-back
  1415. >36 byte 16 \b, back-to-front
  1416. >42 beshort x \b, (%dx,
  1417. >44 beshort x %d)
  1418. # Symantec GHOST image by Joerg Jenderek at May 2014
  1419. # https://us.norton.com/ghost/
  1420. # https://www.garykessler.net/library/file_sigs.html
  1421. 0 ubelong&0xFFFFf7f0 0xFEEF0100 Norton GHost image
  1422. # *.GHO
  1423. >2 ubyte&0x08 0x00 \b, first file
  1424. # *.GHS or *.[0-9] with cns program option
  1425. >2 ubyte&0x08 0x08 \b, split file
  1426. # part of split index interesting for *.ghs
  1427. >>4 ubyte x id=0x%x
  1428. # compression tag minus one equals numeric compression command line switch z[1-9]
  1429. >3 ubyte 0 \b, no compression
  1430. >3 ubyte 2 \b, fast compression (Z1)
  1431. >3 ubyte 3 \b, medium compression (Z2)
  1432. >3 ubyte >3
  1433. >>3 ubyte <11 \b, compression (Z%d-1)
  1434. >2 ubyte&0x08 0x00
  1435. # ~ 30 byte password field only for *.gho
  1436. >>12 ubequad !0 \b, password protected
  1437. >>44 ubyte !1
  1438. # 1~Image All, sector-by-sector only for *.gho
  1439. >>>10 ubyte 1 \b, sector copy
  1440. # 1~Image Boot track only for *.gho
  1441. >>>43 ubyte 1 \b, boot track
  1442. # 1~Image Disc only for *.gho implies Image Boot track and sector copy
  1443. >>44 ubyte 1 \b, disc sector copy
  1444. # optional image description only *.gho
  1445. >>0xff string >\0 "%-.254s"
  1446. # look for DOS sector end sequence
  1447. >0xE08 search/7776 \x55\xAA
  1448. >>&-512 indirect x \b; contains
  1449. # Google Chrome extensions
  1450. # https://developer.chrome.com/extensions/crx
  1451. # https://developer.chrome.com/extensions/hosting
  1452. 0 string Cr24 Google Chrome extension
  1453. !:mime application/x-chrome-extension
  1454. >4 ulong x \b, version %u
  1455. # SeqBox - Sequenced container
  1456. # ext: sbx, seqbox
  1457. # Marco Pontello marcopon@gmail.com
  1458. # reference: https://github.com/MarcoPon/SeqBox
  1459. 0 string SBx SeqBox,
  1460. >3 byte x version %d
  1461. # LyNX archive
  1462. 56 string USE\040LYNX\040TO\040DISSOLVE\040THIS\040FILE LyNX archive
  1463. # From: Joerg Jenderek
  1464. # URL: https://www.acronis.com/
  1465. # Reference: https://en.wikipedia.org/wiki/TIB_(file_format)
  1466. # Note: only tested with True Image 2013 Build 5962 and 2019 Build 14110
  1467. 0 ubequad 0xce24b9a220000000 Acronis True Image backup
  1468. !:mime application/x-acronis-tib
  1469. !:ext tib
  1470. # 01000000
  1471. #>20 ubelong x \b, at 20 0x%x
  1472. # 20000000
  1473. #>28 ubelong x \b, at 28 0x%x
  1474. # strings like "Generic- SD/MMC 1.00" "Unknown Disk" "Msft Virtual Disk 1.0"
  1475. # ???
  1476. # strings like "\Device\0000011e" "\Device\0000015a"
  1477. #>0 search/0x6852300/cs \\Device\\
  1478. #>>&-1 pstring x \b, %s
  1479. # "\Device\HarddiskVolume30" "\Device\HarddiskVolume39"
  1480. #>>>&1 search/180/cs \\Device\\
  1481. #>>>>&-1 pstring x \b, %s
  1482. #>>>>>&0 search/29/cs \0\0\xc8\0
  1483. # disk label
  1484. #>>>>>>&10 lestring16 x \b, disk label %11.11s
  1485. #>>>>>>&9 plestring16 x \b, disk label "%11.11s"
  1486. #>>>>>>&10 ubequad x %16.16llx
  1487. # Gentoo XPAK binary package
  1488. # by Michal Gorny <mgorny@gentoo.org>
  1489. # https://gitweb.gentoo.org/proj/portage.git/tree/man/xpak.5
  1490. -4 string STOP
  1491. >-16 string XPAKSTOP Gentoo binary package (XPAK)
  1492. # From: Joerg Jenderek
  1493. # URL: https://kodi.wiki/view/TexturePacker
  1494. # Reference: https://mirrors.kodi.tv/releases/source/17.3-Krypton.tar.gz
  1495. # /xbmc-Krypton/xbmc/guilib/XBTF.h
  1496. # /xbmc-Krypton/xbmc/guilib/XBTF.cpp
  1497. 0 string XBTF
  1498. # skip ASCII text by looking for terminating \0 of path
  1499. >264 ubyte 0 XBMC texture package
  1500. !:mime application/x-xbmc-xbt
  1501. !:ext xbt
  1502. # XBTF_VERSION 2
  1503. >>4 string !2 \b, version %-.1s
  1504. # nofFiles /xbmc-Krypton/xbmc/guilib/XBTFReader.cpp
  1505. >>5 ulelong x \b, %u file
  1506. # plural s
  1507. >>5 ulelong >1 \bs
  1508. # path[CXBTFFile[MaximumPathLength=256]
  1509. >>9 string x \b, 1st %s