archive 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188
  1. #------------------------------------------------------------------------------
  2. # $File: archive,v 1.108 2017/08/30 13:45:10 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 handled in the C code.
  8. # POSIX tar archives
  9. 257 string ustar\0 POSIX tar archive
  10. !:mime application/x-tar # encoding: posix
  11. 257 string ustar\040\040\0 GNU tar archive
  12. !:mime application/x-tar # encoding: gnu
  13. # Incremental snapshot gnu-tar format from:
  14. # http://www.gnu.org/software/tar/manual/html_node/Snapshot-Files.html
  15. 0 string GNU\ tar- GNU tar incremental snapshot data
  16. >&0 regex [0-9]\.[0-9]+-[0-9]+ version %s
  17. # cpio archives
  18. #
  19. # Yes, the top two "cpio archive" formats *are* supposed to just be "short".
  20. # The idea is to indicate archives produced on machines with the same
  21. # byte order as the machine running "file" with "cpio archive", and
  22. # to indicate archives produced on machines with the opposite byte order
  23. # from the machine running "file" with "byte-swapped cpio archive".
  24. #
  25. # The SVR4 "cpio(4)" hints that there are additional formats, but they
  26. # are defined as "short"s; I think all the new formats are
  27. # character-header formats and thus are strings, not numbers.
  28. 0 short 070707 cpio archive
  29. !:mime application/x-cpio
  30. 0 short 0143561 byte-swapped cpio archive
  31. !:mime application/x-cpio # encoding: swapped
  32. 0 string 070707 ASCII cpio archive (pre-SVR4 or odc)
  33. 0 string 070701 ASCII cpio archive (SVR4 with no CRC)
  34. 0 string 070702 ASCII cpio archive (SVR4 with CRC)
  35. #
  36. # Various archive formats used by various versions of the "ar"
  37. # command.
  38. #
  39. #
  40. # Original UNIX archive formats.
  41. # They were written with binary values in host byte order, and
  42. # the magic number was a host "int", which might have been 16 bits
  43. # or 32 bits. We don't say "PDP-11" or "VAX", as there might have
  44. # been ports to little-endian 16-bit-int or 32-bit-int platforms
  45. # (x86?) using some of those formats; if none existed, feel free
  46. # to use "PDP-11" for little-endian 16-bit and "VAX" for little-endian
  47. # 32-bit. There might have been big-endian ports of that sort as
  48. # well.
  49. #
  50. 0 leshort 0177555 very old 16-bit-int little-endian archive
  51. 0 beshort 0177555 very old 16-bit-int big-endian archive
  52. 0 lelong 0177555 very old 32-bit-int little-endian archive
  53. 0 belong 0177555 very old 32-bit-int big-endian archive
  54. 0 leshort 0177545 old 16-bit-int little-endian archive
  55. >2 string __.SYMDEF random library
  56. 0 beshort 0177545 old 16-bit-int big-endian archive
  57. >2 string __.SYMDEF random library
  58. 0 lelong 0177545 old 32-bit-int little-endian archive
  59. >4 string __.SYMDEF random library
  60. 0 belong 0177545 old 32-bit-int big-endian archive
  61. >4 string __.SYMDEF random library
  62. #
  63. # From "pdp" (but why a 4-byte quantity?)
  64. #
  65. 0 lelong 0x39bed PDP-11 old archive
  66. 0 lelong 0x39bee PDP-11 4.0 archive
  67. #
  68. # XXX - what flavor of APL used this, and was it a variant of
  69. # some ar archive format? It's similar to, but not the same
  70. # as, the APL workspace magic numbers in pdp.
  71. #
  72. 0 long 0100554 apl workspace
  73. #
  74. # System V Release 1 portable(?) archive format.
  75. #
  76. 0 string =<ar> System V Release 1 ar archive
  77. !:mime application/x-archive
  78. #
  79. # Debian package; it's in the portable archive format, and needs to go
  80. # before the entry for regular portable archives, as it's recognized as
  81. # a portable archive whose first member has a name beginning with
  82. # "debian".
  83. #
  84. 0 string =!<arch>\ndebian
  85. >8 string debian-split part of multipart Debian package
  86. !:mime application/vnd.debian.binary-package
  87. >8 string debian-binary Debian binary package
  88. !:mime application/vnd.debian.binary-package
  89. >8 string !debian
  90. >68 string >\0 (format %s)
  91. # These next two lines do not work, because a bzip2 Debian archive
  92. # still uses gzip for the control.tar (first in the archive). Only
  93. # data.tar varies, and the location of its filename varies too.
  94. # file/libmagic does not current have support for ascii-string based
  95. # (offsets) as of 2005-09-15.
  96. #>81 string bz2 \b, uses bzip2 compression
  97. #>84 string gz \b, uses gzip compression
  98. #>136 ledate x created: %s
  99. #
  100. # MIPS archive; they're in the portable archive format, and need to go
  101. # before the entry for regular portable archives, as it's recognized as
  102. # a portable archive whose first member has a name beginning with
  103. # "__________E".
  104. #
  105. 0 string =!<arch>\n__________E MIPS archive
  106. !:mime application/x-archive
  107. >20 string U with MIPS Ucode members
  108. >21 string L with MIPSEL members
  109. >21 string B with MIPSEB members
  110. >19 string L and an EL hash table
  111. >19 string B and an EB hash table
  112. >22 string X -- out of date
  113. 0 search/1 -h- Software Tools format archive text
  114. #
  115. # BSD/SVR2-and-later portable archive formats.
  116. #
  117. 0 string =!<arch> current ar archive
  118. !:mime application/x-archive
  119. >8 string __.SYMDEF random library
  120. >68 string __.SYMDEF\ SORTED random library
  121. #
  122. # "Thin" archive, as can be produced by GNU ar.
  123. #
  124. 0 string =!<thin>\n thin archive with
  125. >68 belong 0 no symbol entries
  126. >68 belong 1 %d symbol entry
  127. >68 belong >1 %d symbol entries
  128. # ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com)
  129. #
  130. # The first byte is the magic (0x1a), byte 2 is the compression type for
  131. # the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS
  132. # filename of the first file (null terminated). Since some types collide
  133. # we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%),
  134. # 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%). 0x01 collides with terminfo.
  135. 0 lelong&0x8080ffff 0x0000081a ARC archive data, dynamic LZW
  136. !:mime application/x-arc
  137. 0 lelong&0x8080ffff 0x0000091a ARC archive data, squashed
  138. !:mime application/x-arc
  139. 0 lelong&0x8080ffff 0x0000021a ARC archive data, uncompressed
  140. !:mime application/x-arc
  141. 0 lelong&0x8080ffff 0x0000031a ARC archive data, packed
  142. !:mime application/x-arc
  143. 0 lelong&0x8080ffff 0x0000041a ARC archive data, squeezed
  144. !:mime application/x-arc
  145. 0 lelong&0x8080ffff 0x0000061a ARC archive data, crunched
  146. !:mime application/x-arc
  147. # [JW] stuff taken from idarc, obviously ARC successors:
  148. 0 lelong&0x8080ffff 0x00000a1a PAK archive data
  149. !:mime application/x-arc
  150. 0 lelong&0x8080ffff 0x0000141a ARC+ archive data
  151. !:mime application/x-arc
  152. 0 lelong&0x8080ffff 0x0000481a HYP archive data
  153. !:mime application/x-arc
  154. # Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk)
  155. # I can't create either SPARK or ArcFS archives so I have not tested this stuff
  156. # [GRR: the original entries collide with ARC, above; replaced with combined
  157. # version (not tested)]
  158. #0 byte 0x1a RISC OS archive (spark format)
  159. 0 string \032archive RISC OS archive (ArcFS format)
  160. 0 string Archive\000 RISC OS archive (ArcFS format)
  161. # All these were taken from idarc, many could not be verified. Unfortunately,
  162. # there were many low-quality sigs, i.e. easy to trigger false positives.
  163. # Please notify me of any real-world fishy/ambiguous signatures and I'll try
  164. # to get my hands on the actual archiver and see if I find something better. [JW]
  165. # probably many can be enhanced by finding some 0-byte or control char near the start
  166. # idarc calls this Crush/Uncompressed... *shrug*
  167. 0 string CRUSH Crush archive data
  168. # Squeeze It (.sqz)
  169. 0 string HLSQZ Squeeze It archive data
  170. # SQWEZ
  171. 0 string SQWEZ SQWEZ archive data
  172. # HPack (.hpk)
  173. 0 string HPAK HPack archive data
  174. # HAP
  175. 0 string \x91\x33HF HAP archive data
  176. # MD/MDCD
  177. 0 string MDmd MDCD archive data
  178. # LIM
  179. 0 string LIM\x1a LIM archive data
  180. # SAR
  181. 3 string LH5 SAR archive data
  182. # BSArc/BS2
  183. 0 string \212\3SB\020\0 BSArc/BS2 archive data
  184. # Bethesda Softworks Archive (Oblivion)
  185. 0 string BSA\0 BSArc archive data
  186. >4 lelong x version %d
  187. # MAR
  188. 2 string =-ah MAR archive data
  189. # ACB
  190. #0 belong&0x00f800ff 0x00800000 ACB archive data
  191. # CPZ
  192. # TODO, this is what idarc says: 0 string \0\0\0 CPZ archive data
  193. # JRC
  194. 0 string JRchive JRC archive data
  195. # Quantum
  196. 0 string DS\0 Quantum archive data
  197. # ReSOF
  198. 0 string PK\3\6 ReSOF archive data
  199. # QuArk
  200. 0 string 7\4 QuArk archive data
  201. # YAC
  202. 14 string YC YAC archive data
  203. # X1
  204. 0 string X1 X1 archive data
  205. 0 string XhDr X1 archive data
  206. # CDC Codec (.dqt)
  207. 0 belong&0xffffe000 0x76ff2000 CDC Codec archive data
  208. # AMGC
  209. 0 string \xad6" AMGC archive data
  210. # NuLIB
  211. 0 string N\xc3\xb5F\xc3\xa9lx\xc3\xa5 NuLIB archive data
  212. # PakLeo
  213. 0 string LEOLZW PAKLeo archive data
  214. # ChArc
  215. 0 string SChF ChArc archive data
  216. # PSA
  217. 0 string PSA PSA archive data
  218. # CrossePAC
  219. 0 string DSIGDCC CrossePAC archive data
  220. # Freeze
  221. 0 string \x1f\x9f\x4a\x10\x0a Freeze archive data
  222. # KBoom
  223. 0 string \xc2\xa8MP\xc2\xa8 KBoom archive data
  224. # NSQ, must go after CDC Codec
  225. 0 string \x76\xff NSQ archive data
  226. # DPA
  227. 0 string Dirk\ Paehl DPA archive data
  228. # BA
  229. # TODO: idarc says "bytes 0-2 == bytes 3-5"
  230. # TTComp
  231. # URL: http://fileformats.archiveteam.org/wiki/TTComp_archive
  232. # Update: Joerg Jenderek
  233. # GRR: line below is too general as it matches also Panorama database "TCDB 2003-10 demo.pan", others
  234. 0 string \0\6
  235. # look for first keyword of Panorama database *.pan
  236. >12 search/261 DESIGN
  237. # skip keyword with low entropy
  238. >12 default x TTComp archive, binary, 4K dictionary
  239. # (version 5.25) labeled the above entry as "TTComp archive data"
  240. # ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation?
  241. 0 string ESP ESP archive data
  242. # ZPack
  243. 0 string \1ZPK\1 ZPack archive data
  244. # Sky
  245. 0 string \xbc\x40 Sky archive data
  246. # UFA
  247. 0 string UFA UFA archive data
  248. # Dry
  249. 0 string =-H2O DRY archive data
  250. # FoxSQZ
  251. 0 string FOXSQZ FoxSQZ archive data
  252. # AR7
  253. 0 string ,AR7 AR7 archive data
  254. # PPMZ
  255. 0 string PPMZ PPMZ archive data
  256. # MS Compress
  257. 4 string \x88\xf0\x27 MS Compress archive data
  258. # updated by Joerg Jenderek
  259. >9 string \0
  260. >>0 string KWAJ
  261. >>>7 string \321\003 MS Compress archive data
  262. >>>>14 ulong >0 \b, original size: %d bytes
  263. >>>>18 ubyte >0x65
  264. >>>>>18 string x \b, was %.8s
  265. >>>>>(10.b-4) string x \b.%.3s
  266. # MP3 (archiver, not lossy audio compression)
  267. 0 string MP3\x1a MP3-Archiver archive data
  268. # ZET
  269. 0 string OZ\xc3\x9d ZET archive data
  270. # TSComp
  271. 0 string \x65\x5d\x13\x8c\x08\x01\x03\x00 TSComp archive data
  272. # ARQ
  273. 0 string gW\4\1 ARQ archive data
  274. # Squash
  275. 3 string OctSqu Squash archive data
  276. # Terse
  277. 0 string \5\1\1\0 Terse archive data
  278. # PUCrunch
  279. 0 string \x01\x08\x0b\x08\xef\x00\x9e\x32\x30\x36\x31 PUCrunch archive data
  280. # UHarc
  281. 0 string UHA UHarc archive data
  282. # ABComp
  283. 0 string \2AB ABComp archive data
  284. 0 string \3AB2 ABComp archive data
  285. # CMP
  286. 0 string CO\0 CMP archive data
  287. # Splint
  288. 0 string \x93\xb9\x06 Splint archive data
  289. # InstallShield
  290. 0 string \x13\x5d\x65\x8c InstallShield Z archive Data
  291. # Gather
  292. 1 string GTH Gather archive data
  293. # BOA
  294. 0 string BOA BOA archive data
  295. # RAX
  296. 0 string ULEB\xa RAX archive data
  297. # Xtreme
  298. 0 string ULEB\0 Xtreme archive data
  299. # Pack Magic
  300. 0 string @\xc3\xa2\1\0 Pack Magic archive data
  301. # BTS
  302. 0 belong&0xfeffffff 0x1a034465 BTS archive data
  303. # ELI 5750
  304. 0 string Ora\ ELI 5750 archive data
  305. # QFC
  306. 0 string \x1aFC\x1a QFC archive data
  307. 0 string \x1aQF\x1a QFC archive data
  308. # PRO-PACK
  309. 0 string RNC PRO-PACK archive data
  310. # 777
  311. 0 string 777 777 archive data
  312. # LZS221
  313. 0 string sTaC LZS221 archive data
  314. # HPA
  315. 0 string HPA HPA archive data
  316. # Arhangel
  317. 0 string LG Arhangel archive data
  318. # EXP1, uses bzip2
  319. 0 string 0123456789012345BZh EXP1 archive data
  320. # IMP
  321. 0 string IMP\xa IMP archive data
  322. # NRV
  323. 0 string \x00\x9E\x6E\x72\x76\xFF NRV archive data
  324. # Squish
  325. 0 string \x73\xb2\x90\xf4 Squish archive data
  326. # Par
  327. 0 string PHILIPP Par archive data
  328. 0 string PAR Par archive data
  329. # HIT
  330. 0 string UB HIT archive data
  331. # SBX
  332. 0 belong&0xfffff000 0x53423000 SBX archive data
  333. # NaShrink
  334. 0 string NSK NaShrink archive data
  335. # SAPCAR
  336. 0 string #\ CAR\ archive\ header SAPCAR archive data
  337. 0 string CAR\ 2.00RG SAPCAR archive data
  338. # Disintegrator
  339. 0 string DST Disintegrator archive data
  340. # ASD
  341. 0 string ASD ASD archive data
  342. # InstallShield CAB
  343. 0 string ISc( InstallShield CAB
  344. # TOP4
  345. 0 string T4\x1a TOP4 archive data
  346. # BatComp left out: sig looks like COM executable
  347. # so TODO: get real 4dos batcomp file and find sig
  348. # BlakHole
  349. 0 string BH\5\7 BlakHole archive data
  350. # BIX
  351. 0 string BIX0 BIX archive data
  352. # ChiefLZA
  353. 0 string ChfLZ ChiefLZA archive data
  354. # Blink
  355. 0 string Blink Blink archive data
  356. # Logitech Compress
  357. 0 string \xda\xfa Logitech Compress archive data
  358. # ARS-Sfx (FIXME: really a SFX? then goto COM/EXE)
  359. 1 string (C)\ STEPANYUK ARS-Sfx archive data
  360. # AKT/AKT32
  361. 0 string AKT32 AKT32 archive data
  362. 0 string AKT AKT archive data
  363. # NPack
  364. 0 string MSTSM NPack archive data
  365. # PFT
  366. 0 string \0\x50\0\x14 PFT archive data
  367. # SemOne
  368. 0 string SEM SemOne archive data
  369. # PPMD
  370. 0 string \x8f\xaf\xac\x84 PPMD archive data
  371. # FIZ
  372. 0 string FIZ FIZ archive data
  373. # MSXiE
  374. 0 belong&0xfffff0f0 0x4d530000 MSXiE archive data
  375. # DeepFreezer
  376. 0 belong&0xfffffff0 0x797a3030 DeepFreezer archive data
  377. # DC
  378. 0 string =<DC- DC archive data
  379. # TPac
  380. 0 string \4TPAC\3 TPac archive data
  381. # Ai
  382. 0 string Ai\1\1\0 Ai archive data
  383. 0 string Ai\1\0\0 Ai archive data
  384. # Ai32
  385. 0 string Ai\2\0 Ai32 archive data
  386. 0 string Ai\2\1 Ai32 archive data
  387. # SBC
  388. 0 string SBC SBC archive data
  389. # Ybs
  390. 0 string YBS Ybs archive data
  391. # DitPack
  392. 0 string \x9e\0\0 DitPack archive data
  393. # DMS
  394. 0 string DMS! DMS archive data
  395. # EPC
  396. 0 string \x8f\xaf\xac\x8c EPC archive data
  397. # VSARC
  398. 0 string VS\x1a VSARC archive data
  399. # PDZ
  400. 0 string PDZ PDZ archive data
  401. # ReDuq
  402. 0 string rdqx ReDuq archive data
  403. # GCA
  404. 0 string GCAX GCA archive data
  405. # PPMN
  406. 0 string pN PPMN archive data
  407. # WinImage
  408. 3 string WINIMAGE WinImage archive data
  409. # Compressia
  410. 0 string CMP0CMP Compressia archive data
  411. # UHBC
  412. 0 string UHB UHBC archive data
  413. # WinHKI
  414. 0 string \x61\x5C\x04\x05 WinHKI archive data
  415. # WWPack data file
  416. 0 string WWP WWPack archive data
  417. # BSN (BSA, PTS-DOS)
  418. 0 string \xffBSG BSN archive data
  419. 1 string \xffBSG BSN archive data
  420. 3 string \xffBSG BSN archive data
  421. 1 string \0\xae\2 BSN archive data
  422. 1 string \0\xae\3 BSN archive data
  423. 1 string \0\xae\7 BSN archive data
  424. # AIN
  425. 0 string \x33\x18 AIN archive data
  426. 0 string \x33\x17 AIN archive data
  427. # XPA32 test moved and merged with XPA by Joerg Jenderek at Sep 2015
  428. # SZip (TODO: doesn't catch all versions)
  429. 0 string SZ\x0a\4 SZip archive data
  430. # XPack DiskImage
  431. # *.XDI updated by Joerg Jenderek Sep 2015
  432. # ftp://ftp.sac.sk/pub/sac/pack/0index.txt
  433. # GRR: this test is still too general as it catches also text files starting with jm
  434. 0 string jm
  435. # only found examples with this additional characteristic 2 bytes
  436. >2 string \x2\x4 Xpack DiskImage archive data
  437. #!:ext xdi
  438. # XPack Data
  439. # *.xpa updated by Joerg Jenderek Sep 2015
  440. # ftp://ftp.elf.stuba.sk/pub/pc/pack/
  441. 0 string xpa XPA
  442. !:ext xpa
  443. # XPA32
  444. # ftp://ftp.elf.stuba.sk/pub/pc/pack/xpa32.zip
  445. # created by XPA32.EXE version 1.0.2 for Windows
  446. >0 string xpa\0\1 \b32 archive data
  447. # created by XPACK.COM version 1.67m or 1.67r with short 0x1800
  448. >3 ubeshort !0x0001 \bck archive data
  449. # XPack Single Data
  450. # changed by Joerg Jenderek Sep 2015 back to like in version 5.12
  451. # letter 'I'+ acute accent is equivalent to \xcd
  452. 0 string \xcd\ jm Xpack single archive data
  453. #!:mime application/x-xpa-compressed
  454. !:ext xpa
  455. # TODO: missing due to unknown magic/magic at end of file:
  456. #DWC
  457. #ARG
  458. #ZAR
  459. #PC/3270
  460. #InstallIt
  461. #RKive
  462. #RK
  463. #XPack Diskimage
  464. # These were inspired by idarc, but actually verified
  465. # Dzip archiver (.dz)
  466. 0 string DZ Dzip archive data
  467. >2 byte x \b, version %i
  468. >3 byte x \b.%i
  469. # ZZip archiver (.zz)
  470. 0 string ZZ\ \0\0 ZZip archive data
  471. 0 string ZZ0 ZZip archive data
  472. # PAQ archiver (.paq)
  473. 0 string \xaa\x40\x5f\x77\x1f\xe5\x82\x0d PAQ archive data
  474. 0 string PAQ PAQ archive data
  475. >3 byte&0xf0 0x30
  476. >>3 byte x (v%c)
  477. # JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP)
  478. 0xe string \x1aJar\x1b JAR (ARJ Software, Inc.) archive data
  479. 0 string JARCS JAR (ARJ Software, Inc.) archive data
  480. # ARJ archiver (jason@jarthur.Claremont.EDU)
  481. 0 leshort 0xea60 ARJ archive data
  482. !:mime application/x-arj
  483. >5 byte x \b, v%d,
  484. >8 byte &0x04 multi-volume,
  485. >8 byte &0x10 slash-switched,
  486. >8 byte &0x20 backup,
  487. >34 string x original name: %s,
  488. >7 byte 0 os: MS-DOS
  489. >7 byte 1 os: PRIMOS
  490. >7 byte 2 os: Unix
  491. >7 byte 3 os: Amiga
  492. >7 byte 4 os: Macintosh
  493. >7 byte 5 os: OS/2
  494. >7 byte 6 os: Apple ][ GS
  495. >7 byte 7 os: Atari ST
  496. >7 byte 8 os: NeXT
  497. >7 byte 9 os: VAX/VMS
  498. >3 byte >0 %d]
  499. # [JW] idarc says this is also possible
  500. 2 leshort 0xea60 ARJ archive data
  501. # HA archiver (Greg Roelofs, newt@uchicago.edu)
  502. # This is a really bad format. A file containing HAWAII will match this...
  503. #0 string HA HA archive data,
  504. #>2 leshort =1 1 file,
  505. #>2 leshort >1 %hu files,
  506. #>4 byte&0x0f =0 first is type CPY
  507. #>4 byte&0x0f =1 first is type ASC
  508. #>4 byte&0x0f =2 first is type HSC
  509. #>4 byte&0x0f =0x0e first is type DIR
  510. #>4 byte&0x0f =0x0f first is type SPECIAL
  511. # suggestion: at least identify small archives (<1024 files)
  512. 0 belong&0xffff00fc 0x48410000 HA archive data
  513. >2 leshort =1 1 file,
  514. >2 leshort >1 %u files,
  515. >4 byte&0x0f =0 first is type CPY
  516. >4 byte&0x0f =1 first is type ASC
  517. >4 byte&0x0f =2 first is type HSC
  518. >4 byte&0x0f =0x0e first is type DIR
  519. >4 byte&0x0f =0x0f first is type SPECIAL
  520. # HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz)
  521. 0 string HPAK HPACK archive data
  522. # JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net
  523. 0 string \351,\001JAM\ JAM archive,
  524. >7 string >\0 version %.4s
  525. >0x26 byte =0x27 -
  526. >>0x2b string >\0 label %.11s,
  527. >>0x27 lelong x serial %08x,
  528. >>0x36 string >\0 fstype %.8s
  529. # LHARC/LHA archiver (Greg Roelofs, newt@uchicago.edu)
  530. # Update: Joerg Jenderek
  531. # URL: https://en.wikipedia.org/wiki/LHA_(file_format)
  532. # Reference: http://web.archive.org/web/20021005080911/http://www.osirusoft.com/joejared/lzhformat.html
  533. #
  534. # check and display information of lharc (LHa,PMarc) file
  535. 0 name lharc-file
  536. # check 1st character of method id like -lz4- -lh5- or -pm2-
  537. >2 string -
  538. # check 5th character of method id
  539. >>6 string -
  540. # check header level 0 1 2 3
  541. >>>20 ubyte <4
  542. # check 2nd, 3th and 4th character of method id
  543. >>>>3 regex \^(lh[0-9a-ex]|lz[s2-8]|pm[012]|pc1) \b
  544. !:mime application/x-lzh-compressed
  545. # creator type "LHA "
  546. !:apple ????LHA
  547. # display archive type name like "LHa/LZS archive data" or "LArc archive"
  548. >>>>>2 string -lz \b
  549. !:ext lzs
  550. # already known -lzs- -lz4- -lz5- with old names
  551. >>>>>>2 string -lzs LHa/LZS archive data
  552. >>>>>>3 regex \^lz[45] LHarc 1.x archive data
  553. # missing -lz?- with wikipedia names
  554. >>>>>>3 regex \^lz[2378] LArc archive
  555. # display archive type name like "LHa (2.x) archive data"
  556. >>>>>2 string -lh \b
  557. # already known -lh0- -lh1- -lh2- -lh3- -lh4- -lh5- -lh6- -lh7- -lhd- variants with old names
  558. >>>>>>3 regex \^lh[01] LHarc 1.x/ARX archive data
  559. # LHice archiver use ".ICE" as name extension instead usual one ".lzh"
  560. # FOOBAR archiver use ".foo" as name extension instead usual one
  561. # "Florain Orjanov's and Olga Bachetska's ARchiver" not found at the moment
  562. >>>>>>>2 string -lh1 \b
  563. !:ext lha/lzh/ice
  564. >>>>>>3 regex \^lh[23d] LHa 2.x? archive data
  565. >>>>>>3 regex \^lh[7] LHa (2.x)/LHark archive data
  566. >>>>>>3 regex \^lh[456] LHa (2.x) archive data
  567. >>>>>>>2 string -lh5 \b
  568. # https://en.wikipedia.org/wiki/BIOS
  569. # Some mainboard BIOS like Award use LHa compression. So archives with unusal extension are found like
  570. # bios.rom , kd7_v14.bin, 1010.004, ...
  571. !:ext lha/lzh/rom/bin
  572. # missing -lh?- variants (Joe Jared)
  573. >>>>>>3 regex \^lh[89a-ce] LHa (Joe Jared) archive
  574. # UNLHA32 2.67a
  575. >>>>>>2 string -lhx LHa (UNLHA32) archive
  576. # lha archives with standard file name extensions ".lha" ".lzh"
  577. >>>>>>3 regex !\^(lh1|lh5) \b
  578. !:ext lha/lzh
  579. # this should not happen if all -lh variants are described
  580. >>>>>>2 default x LHa (unknown) archive
  581. #!:ext lha
  582. # PMarc
  583. >>>>>3 regex \^pm[012] PMarc archive data
  584. !:ext pma
  585. # append method id without leading and trailing minus character
  586. >>>>>3 string x [%3.3s]
  587. >>>>>>0 use lharc-header
  588. #
  589. # check and display information of lharc header
  590. 0 name lharc-header
  591. # header size 0x4 , 0x1b-0x61
  592. >0 ubyte x
  593. # compressed data size != compressed file size
  594. #>7 ulelong x \b, data size %d
  595. # attribute: 0x2~?? 0x10~symlink|target 0x20~normal
  596. #>19 ubyte x \b, 19_0x%x
  597. # level identifier 0 1 2 3
  598. #>20 ubyte x \b, level %d
  599. # time stamp
  600. #>15 ubelong x DATE 0x%8.8x
  601. # OS ID for level 1
  602. >20 ubyte 1
  603. # 0x20 types find for *.rom files
  604. >>(21.b+24) ubyte <0x21 \b, 0x%x OS
  605. # ascii type like M for MSDOS
  606. >>(21.b+24) ubyte >0x20 \b, '%c' OS
  607. # OS ID for level 2
  608. >20 ubyte 2
  609. #>>23 ubyte x \b, OS ID 0x%x
  610. >>23 ubyte <0x21 \b, 0x%x OS
  611. >>23 ubyte >0x20 \b, '%c' OS
  612. # filename only for level 0 and 1
  613. >20 ubyte <2
  614. # length of filename
  615. >>21 ubyte >0 \b, with
  616. # filename
  617. >>>21 pstring x "%s"
  618. #
  619. #2 string -lh0- LHarc 1.x/ARX archive data [lh0]
  620. #!:mime application/x-lharc
  621. 2 string -lh0-
  622. >0 use lharc-file
  623. #2 string -lh1- LHarc 1.x/ARX archive data [lh1]
  624. #!:mime application/x-lharc
  625. 2 string -lh1-
  626. >0 use lharc-file
  627. # NEW -lz2- ... -lz8-
  628. 2 string -lz2-
  629. >0 use lharc-file
  630. 2 string -lz3-
  631. >0 use lharc-file
  632. 2 string -lz4-
  633. >0 use lharc-file
  634. 2 string -lz5-
  635. >0 use lharc-file
  636. 2 string -lz7-
  637. >0 use lharc-file
  638. 2 string -lz8-
  639. >0 use lharc-file
  640. # [never seen any but the last; -lh4- reported in comp.compression:]
  641. #2 string -lzs- LHa/LZS archive data [lzs]
  642. 2 string -lzs-
  643. >0 use lharc-file
  644. # According to wikipedia and others such a version does not exist
  645. #2 string -lh\40- LHa 2.x? archive data [lh ]
  646. #2 string -lhd- LHa 2.x? archive data [lhd]
  647. 2 string -lhd-
  648. >0 use lharc-file
  649. #2 string -lh2- LHa 2.x? archive data [lh2]
  650. 2 string -lh2-
  651. >0 use lharc-file
  652. #2 string -lh3- LHa 2.x? archive data [lh3]
  653. 2 string -lh3-
  654. >0 use lharc-file
  655. #2 string -lh4- LHa (2.x) archive data [lh4]
  656. 2 string -lh4-
  657. >0 use lharc-file
  658. #2 string -lh5- LHa (2.x) archive data [lh5]
  659. 2 string -lh5-
  660. >0 use lharc-file
  661. #2 string -lh6- LHa (2.x) archive data [lh6]
  662. 2 string -lh6-
  663. >0 use lharc-file
  664. #2 string -lh7- LHa (2.x)/LHark archive data [lh7]
  665. 2 string -lh7-
  666. # !:mime application/x-lha
  667. # >20 byte x - header level %d
  668. >0 use lharc-file
  669. # NEW -lh8- ... -lhe- , -lhx-
  670. 2 string -lh8-
  671. >0 use lharc-file
  672. 2 string -lh9-
  673. >0 use lharc-file
  674. 2 string -lha-
  675. >0 use lharc-file
  676. 2 string -lhb-
  677. >0 use lharc-file
  678. 2 string -lhc-
  679. >0 use lharc-file
  680. 2 string -lhe-
  681. >0 use lharc-file
  682. 2 string -lhx-
  683. >0 use lharc-file
  684. # taken from idarc [JW]
  685. 2 string -lZ PUT archive data
  686. # already done by LHarc magics
  687. # this should never happen if all sub types of LZS archive are identified
  688. #2 string -lz LZS archive data
  689. 2 string -sw1- Swag archive data
  690. 0 name rar-file-header
  691. >24 byte 15 \b, v1.5
  692. >24 byte 20 \b, v2.0
  693. >24 byte 29 \b, v4
  694. >15 byte 0 \b, os: MS-DOS
  695. >15 byte 1 \b, os: OS/2
  696. >15 byte 2 \b, os: Win32
  697. >15 byte 3 \b, os: Unix
  698. >15 byte 4 \b, os: Mac OS
  699. >15 byte 5 \b, os: BeOS
  700. 0 name rar-archive-header
  701. >3 leshort&0x1ff >0 \b, flags:
  702. >>3 leshort &0x01 ArchiveVolume
  703. >>3 leshort &0x02 Commented
  704. >>3 leshort &0x04 Locked
  705. >>3 leshort &0x10 NewVolumeNaming
  706. >>3 leshort &0x08 Solid
  707. >>3 leshort &0x20 Authenticated
  708. >>3 leshort &0x40 RecoveryRecordPresent
  709. >>3 leshort &0x80 EncryptedBlockHeader
  710. >>3 leshort &0x100 FirstVolume
  711. # RAR (Roshal Archive) archive
  712. 0 string Rar!\x1a\7\0 RAR archive data
  713. !:mime application/x-rar
  714. !:ext rar/cbr
  715. # file header
  716. >(0xc.l+9) byte 0x74
  717. >>(0xc.l+7) use rar-file-header
  718. # subblock seems to share information with file header
  719. >(0xc.l+9) byte 0x7a
  720. >>(0xc.l+7) use rar-file-header
  721. >9 byte 0x73
  722. >>7 use rar-archive-header
  723. 0 string Rar!\x1a\7\1\0 RAR archive data, v5
  724. !:mime application/x-rar
  725. !:ext rar
  726. # Very old RAR archive
  727. # http://jasonblanks.com/wp-includes/images/papers/KnowyourarchiveRAR.pdf
  728. 0 string RE\x7e\x5e RAR archive data (<v1.5)
  729. !:mime application/x-rar
  730. !:ext rar/cbr
  731. # SQUISH archiver (Greg Roelofs, newt@uchicago.edu)
  732. 0 string SQSH squished archive data (Acorn RISCOS)
  733. # UC2 archiver (Greg Roelofs, newt@uchicago.edu)
  734. # [JW] see exe section for self-extracting version
  735. 0 string UC2\x1a UC2 archive data
  736. # PKZIP multi-volume archive
  737. 0 string PK\x07\x08PK\x03\x04 Zip multi-volume archive data, at least PKZIP v2.50 to extract
  738. !:mime application/zip
  739. !:ext zip/cbz
  740. # Zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
  741. 0 string PK\005\006 Zip archive data (empty)
  742. !:mime application/zip
  743. !:ext zip/cbz
  744. 0 string PK\003\004
  745. # Specialised zip formats which start with a member named 'mimetype'
  746. # (stored uncompressed, with no 'extra field') containing the file's MIME type.
  747. # Check for have 8-byte name, 0-byte extra field, name "mimetype", and
  748. # contents starting with "application/":
  749. >26 string \x8\0\0\0mimetypeapplication/
  750. # KOffice / OpenOffice & StarOffice / OpenDocument formats
  751. # From: Abel Cheung <abel@oaka.org>
  752. # KOffice (1.2 or above) formats
  753. # (mimetype contains "application/vnd.kde.<SUBTYPE>")
  754. >>50 string vnd.kde. KOffice (>=1.2)
  755. >>>58 string karbon Karbon document
  756. >>>58 string kchart KChart document
  757. >>>58 string kformula KFormula document
  758. >>>58 string kivio Kivio document
  759. >>>58 string kontour Kontour document
  760. >>>58 string kpresenter KPresenter document
  761. >>>58 string kspread KSpread document
  762. >>>58 string kword KWord document
  763. # OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7)
  764. # (mimetype contains "application/vnd.sun.xml.<SUBTYPE>")
  765. >>50 string vnd.sun.xml. OpenOffice.org 1.x
  766. >>>62 string writer Writer
  767. >>>>68 byte !0x2e document
  768. >>>>68 string .template template
  769. >>>>68 string .global global document
  770. >>>62 string calc Calc
  771. >>>>66 byte !0x2e spreadsheet
  772. >>>>66 string .template template
  773. >>>62 string draw Draw
  774. >>>>66 byte !0x2e document
  775. >>>>66 string .template template
  776. >>>62 string impress Impress
  777. >>>>69 byte !0x2e presentation
  778. >>>>69 string .template template
  779. >>>62 string math Math document
  780. >>>62 string base Database file
  781. # OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8)
  782. # http://lists.oasis-open.org/archives/office/200505/msg00006.html
  783. # (mimetype contains "application/vnd.oasis.opendocument.<SUBTYPE>")
  784. >>50 string vnd.oasis.opendocument. OpenDocument
  785. >>>73 string text
  786. >>>>77 byte !0x2d Text
  787. !:mime application/vnd.oasis.opendocument.text
  788. >>>>77 string -template Text Template
  789. !:mime application/vnd.oasis.opendocument.text-template
  790. >>>>77 string -web HTML Document Template
  791. !:mime application/vnd.oasis.opendocument.text-web
  792. >>>>77 string -master Master Document
  793. !:mime application/vnd.oasis.opendocument.text-master
  794. >>>73 string graphics
  795. >>>>81 byte !0x2d Drawing
  796. !:mime application/vnd.oasis.opendocument.graphics
  797. >>>>81 string -template Template
  798. !:mime application/vnd.oasis.opendocument.graphics-template
  799. >>>73 string presentation
  800. >>>>85 byte !0x2d Presentation
  801. !:mime application/vnd.oasis.opendocument.presentation
  802. >>>>85 string -template Template
  803. !:mime application/vnd.oasis.opendocument.presentation-template
  804. >>>73 string spreadsheet
  805. >>>>84 byte !0x2d Spreadsheet
  806. !:mime application/vnd.oasis.opendocument.spreadsheet
  807. >>>>84 string -template Template
  808. !:mime application/vnd.oasis.opendocument.spreadsheet-template
  809. >>>73 string chart
  810. >>>>78 byte !0x2d Chart
  811. !:mime application/vnd.oasis.opendocument.chart
  812. >>>>78 string -template Template
  813. !:mime application/vnd.oasis.opendocument.chart-template
  814. >>>73 string formula
  815. >>>>80 byte !0x2d Formula
  816. !:mime application/vnd.oasis.opendocument.formula
  817. >>>>80 string -template Template
  818. !:mime application/vnd.oasis.opendocument.formula-template
  819. >>>73 string database Database
  820. !:mime application/vnd.oasis.opendocument.database
  821. >>>73 string image
  822. >>>>78 byte !0x2d Image
  823. !:mime application/vnd.oasis.opendocument.image
  824. >>>>78 string -template Template
  825. !:mime application/vnd.oasis.opendocument.image-template
  826. # EPUB (OEBPS) books using OCF (OEBPS Container Format)
  827. # http://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4.
  828. # From: Ralf Brown <ralf.brown@gmail.com>
  829. >>50 string epub+zip EPUB document
  830. !:mime application/epub+zip
  831. # Catch other ZIP-with-mimetype formats
  832. # In a ZIP file, the bytes immediately after a member's contents are
  833. # always "PK". The 2 regex rules here print the "mimetype" member's
  834. # contents up to the first 'P'. Luckily, most MIME types don't contain
  835. # any capital 'P's. This is a kludge.
  836. # (mimetype contains "application/<OTHER>")
  837. >>50 string !epub+zip
  838. >>>50 string !vnd.oasis.opendocument.
  839. >>>>50 string !vnd.sun.xml.
  840. >>>>>50 string !vnd.kde.
  841. >>>>>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?)
  842. !:mime application/zip
  843. # (mimetype contents other than "application/*")
  844. >26 string \x8\0\0\0mimetype
  845. >>38 string !application/
  846. >>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?)
  847. !:mime application/zip
  848. # Java Jar files
  849. >(26.s+30) leshort 0xcafe Java archive data (JAR)
  850. !:mime application/java-archive
  851. # iOS App
  852. >(26.s+30) leshort !0xcafe
  853. >>26 string !\x8\0\0\0mimetype
  854. >>>30 string Payload/
  855. >>>>38 search/64 .app/ iOS App
  856. !:mime application/x-ios-app
  857. # Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
  858. # Next line excludes specialized formats:
  859. >(26.s+30) leshort !0xcafe
  860. >>26 string !\x8\0\0\0mimetype Zip archive data
  861. !:mime application/zip
  862. >>>4 byte 0x09 \b, at least v0.9 to extract
  863. >>>4 byte 0x0a \b, at least v1.0 to extract
  864. >>>4 byte 0x0b \b, at least v1.1 to extract
  865. >>>4 byte 0x14 \b, at least v2.0 to extract
  866. >>>4 byte 0x15 \b, at least v2.1 to extract
  867. >>>4 byte 0x19 \b, at least v2.5 to extract
  868. >>>4 byte 0x1b \b, at least v2.7 to extract
  869. >>>4 byte 0x2d \b, at least v4.5 to extract
  870. >>>4 byte 0x2e \b, at least v4.6 to extract
  871. >>>4 byte 0x32 \b, at least v5.0 to extract
  872. >>>4 byte 0x33 \b, at least v5.1 to extract
  873. >>>4 byte 0x34 \b, at least v5.2 to extract
  874. >>>4 byte 0x3d \b, at least v6.1 to extract
  875. >>>4 byte 0x3e \b, at least v6.2 to extract
  876. >>>4 byte 0x3f \b, at least v6.3 to extract
  877. >>>0x161 string WINZIP \b, WinZIP self-extracting
  878. # StarView Metafile
  879. # From Pierre Ducroquet <pinaraf@pinaraf.info>
  880. 0 string VCLMTF StarView MetaFile
  881. >6 beshort x \b, version %d
  882. >8 belong x \b, size %d
  883. # Zoo archiver
  884. 20 lelong 0xfdc4a7dc Zoo archive data
  885. !:mime application/x-zoo
  886. >4 byte >48 \b, v%c.
  887. >>6 byte >47 \b%c
  888. >>>7 byte >47 \b%c
  889. >32 byte >0 \b, modify: v%d
  890. >>33 byte x \b.%d+
  891. >42 lelong 0xfdc4a7dc \b,
  892. >>70 byte >0 extract: v%d
  893. >>>71 byte x \b.%d+
  894. # Shell archives
  895. 10 string #\ This\ is\ a\ shell\ archive shell archive text
  896. !:mime application/octet-stream
  897. #
  898. # LBR. NB: May conflict with the questionable
  899. # "binary Computer Graphics Metafile" format.
  900. #
  901. 0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data
  902. #
  903. # PMA (CP/M derivative of LHA)
  904. # Update: Joerg Jenderek
  905. # URL: https://en.wikipedia.org/wiki/LHA_(file_format)
  906. #
  907. #2 string -pm0- PMarc archive data [pm0]
  908. 2 string -pm0-
  909. >0 use lharc-file
  910. #2 string -pm1- PMarc archive data [pm1]
  911. 2 string -pm1-
  912. >0 use lharc-file
  913. #2 string -pm2- PMarc archive data [pm2]
  914. 2 string -pm2-
  915. >0 use lharc-file
  916. 2 string -pms- PMarc SFX archive (CP/M, DOS)
  917. #!:mime application/x-foobar-exec
  918. !:ext com
  919. 5 string -pc1- PopCom compressed executable (CP/M)
  920. #!:mime application/x-
  921. #!:ext com
  922. # From Rafael Laboissiere <rafael@laboissiere.net>
  923. # The Project Revision Control System (see
  924. # http://prcs.sourceforge.net) generates a packaged project
  925. # file which is recognized by the following entry:
  926. 0 leshort 0xeb81 PRCS packaged project
  927. # Microsoft cabinets
  928. # by David Necas (Yeti) <yeti@physics.muni.cz>
  929. #0 string MSCF\0\0\0\0 Microsoft cabinet file data,
  930. #>25 byte x v%d
  931. #>24 byte x \b.%d
  932. # MPi: All CABs have version 1.3, so this is pointless.
  933. # Better magic in debian-additions.
  934. # GTKtalog catalogs
  935. # by David Necas (Yeti) <yeti@physics.muni.cz>
  936. 4 string gtktalog\ GTKtalog catalog data,
  937. >13 string 3 version 3
  938. >>14 beshort 0x677a (gzipped)
  939. >>14 beshort !0x677a (not gzipped)
  940. >13 string >3 version %s
  941. ############################################################################
  942. # Parity archive reconstruction file, the 'par' file format now used on Usenet.
  943. 0 string PAR\0 PARity archive data
  944. >48 leshort =0 - Index file
  945. >48 leshort >0 - file number %d
  946. # Felix von Leitner <felix-file@fefe.de>
  947. 0 string d8:announce BitTorrent file
  948. !:mime application/x-bittorrent
  949. # Durval Menezes, <jmgthbfile at durval dot com>
  950. 0 string d13:announce-list BitTorrent file
  951. !:mime application/x-bittorrent
  952. # Atari MSA archive - Teemu Hukkanen <tjhukkan@iki.fi>
  953. 0 beshort 0x0e0f Atari MSA archive data
  954. >2 beshort x \b, %d sectors per track
  955. >4 beshort 0 \b, 1 sided
  956. >4 beshort 1 \b, 2 sided
  957. >6 beshort x \b, starting track: %d
  958. >8 beshort x \b, ending track: %d
  959. # Alternate ZIP string (amc@arwen.cs.berkeley.edu)
  960. 0 string PK00PK\003\004 Zip archive data
  961. # ACE archive (from http://www.wotsit.org/download.asp?f=ace)
  962. # by Stefan `Sec` Zehl <sec@42.org>
  963. 7 string **ACE** ACE archive data
  964. >15 byte >0 version %d
  965. >16 byte =0x00 \b, from MS-DOS
  966. >16 byte =0x01 \b, from OS/2
  967. >16 byte =0x02 \b, from Win/32
  968. >16 byte =0x03 \b, from Unix
  969. >16 byte =0x04 \b, from MacOS
  970. >16 byte =0x05 \b, from WinNT
  971. >16 byte =0x06 \b, from Primos
  972. >16 byte =0x07 \b, from AppleGS
  973. >16 byte =0x08 \b, from Atari
  974. >16 byte =0x09 \b, from Vax/VMS
  975. >16 byte =0x0A \b, from Amiga
  976. >16 byte =0x0B \b, from Next
  977. >14 byte x \b, version %d to extract
  978. >5 leshort &0x0080 \b, multiple volumes,
  979. >>17 byte x \b (part %d),
  980. >5 leshort &0x0002 \b, contains comment
  981. >5 leshort &0x0200 \b, sfx
  982. >5 leshort &0x0400 \b, small dictionary
  983. >5 leshort &0x0800 \b, multi-volume
  984. >5 leshort &0x1000 \b, contains AV-String
  985. >>30 string \x16*UNREGISTERED\x20VERSION* (unregistered)
  986. >5 leshort &0x2000 \b, with recovery record
  987. >5 leshort &0x4000 \b, locked
  988. >5 leshort &0x8000 \b, solid
  989. # Date in MS-DOS format (whatever that is)
  990. #>18 lelong x Created on
  991. # sfArk : compression program for Soundfonts (sf2) by Dirk Jagdmann
  992. # <doj@cubic.org>
  993. 0x1A string sfArk sfArk compressed Soundfont
  994. >0x15 string 2
  995. >>0x1 string >\0 Version %s
  996. >>0x2A string >\0 : %s
  997. # DR-DOS 7.03 Packed File *.??_
  998. 0 string Packed\ File\ Personal NetWare Packed File
  999. >12 string x \b, was "%.12s"
  1000. # EET archive
  1001. # From: Tilman Sauerbeck <tilman@code-monkey.de>
  1002. 0 belong 0x1ee7ff00 EET archive
  1003. !:mime application/x-eet
  1004. # rzip archives
  1005. 0 string RZIP rzip compressed data
  1006. >4 byte x - version %d
  1007. >5 byte x \b.%d
  1008. >6 belong x (%d bytes)
  1009. # From: "Robert Dale" <robdale@gmail.com>
  1010. 0 belong 123 dar archive,
  1011. >4 belong x label "%.8x
  1012. >>8 belong x %.8x
  1013. >>>12 beshort x %.4x"
  1014. >14 byte 0x54 end slice
  1015. >14 beshort 0x4e4e multi-part
  1016. >14 beshort 0x4e53 multi-part, with -S
  1017. # Symbian installation files
  1018. # http://www.thouky.co.uk/software/psifs/sis.html
  1019. # http://developer.symbian.com/main/downloads/papers/SymbianOSv91/softwareinstallsis.pdf
  1020. 8 lelong 0x10000419 Symbian installation file
  1021. !:mime application/vnd.symbian.install
  1022. >4 lelong 0x1000006D (EPOC release 3/4/5)
  1023. >4 lelong 0x10003A12 (EPOC release 6)
  1024. 0 lelong 0x10201A7A Symbian installation file (Symbian OS 9.x)
  1025. !:mime x-epoc/x-sisx-app
  1026. # From "Nelson A. de Oliveira" <naoliv@gmail.com>
  1027. 0 string MPQ\032 MoPaQ (MPQ) archive
  1028. # From: "Nelson A. de Oliveira" <naoliv@gmail.com>
  1029. # .kgb
  1030. 0 string KGB_arch KGB Archiver file
  1031. >10 string x with compression level %.1s
  1032. # xar (eXtensible ARchiver) archive
  1033. # xar archive format: http://code.google.com/p/xar/
  1034. # From: "David Remahl" <dremahl@apple.com>
  1035. 0 string xar! xar archive
  1036. !:mime application/x-xar
  1037. #>4 beshort x header size %d
  1038. >6 beshort x version %d,
  1039. #>8 quad x compressed TOC: %d,
  1040. #>16 quad x uncompressed TOC: %d,
  1041. >24 belong 0 no checksum
  1042. >24 belong 1 SHA-1 checksum
  1043. >24 belong 2 MD5 checksum
  1044. # Type: Parity Archive
  1045. # From: Daniel van Eeden <daniel_e@dds.nl>
  1046. 0 string PAR2 Parity Archive Volume Set
  1047. # Bacula volume format. (Volumes always start with a block header.)
  1048. # URL: http://bacula.org/3.0.x-manuals/en/developers/developers/Block_Header.html
  1049. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  1050. 12 string BB02 Bacula volume
  1051. >20 bedate x \b, started %s
  1052. # ePub is XHTML + XML inside a ZIP archive. The first member of the
  1053. # archive must be an uncompressed file called 'mimetype' with contents
  1054. # 'application/epub+zip'
  1055. # From: "Michael Gorny" <mgorny@gentoo.org>
  1056. # ZPAQ: http://mattmahoney.net/dc/zpaq.html
  1057. 0 string zPQ ZPAQ stream
  1058. >3 byte x \b, level %d
  1059. # From: Barry Carter <carter.barry@gmail.com>
  1060. # http://encode.ru/threads/456-zpaq-updates/page32
  1061. 0 string 7kSt ZPAQ file
  1062. # BBeB ebook, unencrypted (LRF format)
  1063. # URL: http://www.sven.de/librie/Librie/LrfFormat
  1064. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  1065. 0 string L\0R\0F\0\0\0 BBeB ebook data, unencrypted
  1066. >8 beshort x \b, version %d
  1067. >36 byte 1 \b, front-to-back
  1068. >36 byte 16 \b, back-to-front
  1069. >42 beshort x \b, (%dx,
  1070. >44 beshort x %d)
  1071. # Symantec GHOST image by Joerg Jenderek at May 2014
  1072. # http://us.norton.com/ghost/
  1073. # http://www.garykessler.net/library/file_sigs.html
  1074. 0 ubelong&0xFFFFf7f0 0xFEEF0100 Norton GHost image
  1075. # *.GHO
  1076. >2 ubyte&0x08 0x00 \b, first file
  1077. # *.GHS or *.[0-9] with cns program option
  1078. >2 ubyte&0x08 0x08 \b, split file
  1079. # part of split index interesting for *.ghs
  1080. >>4 ubyte x id=0x%x
  1081. # compression tag minus one equals numeric compression command line switch z[1-9]
  1082. >3 ubyte 0 \b, no compression
  1083. >3 ubyte 2 \b, fast compression (Z1)
  1084. >3 ubyte 3 \b, medium compression (Z2)
  1085. >3 ubyte >3
  1086. >>3 ubyte <11 \b, compression (Z%d-1)
  1087. >2 ubyte&0x08 0x00
  1088. # ~ 30 byte password field only for *.gho
  1089. >>12 ubequad !0 \b, password protected
  1090. >>44 ubyte !1
  1091. # 1~Image All, sector-by-sector only for *.gho
  1092. >>>10 ubyte 1 \b, sector copy
  1093. # 1~Image Boot track only for *.gho
  1094. >>>43 ubyte 1 \b, boot track
  1095. # 1~Image Disc only for *.gho implies Image Boot track and sector copy
  1096. >>44 ubyte 1 \b, disc sector copy
  1097. # optional image description only *.gho
  1098. >>0xff string >\0 "%-.254s"
  1099. # look for DOS sector end sequence
  1100. >0xE08 search/7776 \x55\xAA
  1101. >>&-512 indirect x \b; contains
  1102. # Google Chrome extensions
  1103. # https://developer.chrome.com/extensions/crx
  1104. # https://developer.chrome.com/extensions/hosting
  1105. 0 string Cr24 Google Chrome extension
  1106. !:mime application/x-chrome-extension
  1107. >4 ulong x \b, version %u
  1108. # SeqBox - Sequenced container
  1109. # ext: sbx, seqbox
  1110. # Marco Pontello marcopon@gmail.com
  1111. # reference: https://github.com/MarcoPon/SeqBox
  1112. 0 string SBx SeqBox,
  1113. >3 byte x version %d