archive 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805
  1. #------------------------------------------------------------------------------
  2. # archive: file(1) magic for archive formats (see also "msdos" for self-
  3. # extracting compressed archives)
  4. #
  5. # cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc.
  6. # pre-POSIX "tar" archives are handled in the C code.
  7. # POSIX tar archives
  8. 257 string ustar\0 POSIX tar archive
  9. !:mime application/x-tar # encoding: posix
  10. 257 string ustar\040\040\0 GNU tar archive
  11. !:mime application/x-tar # encoding: gnu
  12. # cpio archives
  13. #
  14. # Yes, the top two "cpio archive" formats *are* supposed to just be "short".
  15. # The idea is to indicate archives produced on machines with the same
  16. # byte order as the machine running "file" with "cpio archive", and
  17. # to indicate archives produced on machines with the opposite byte order
  18. # from the machine running "file" with "byte-swapped cpio archive".
  19. #
  20. # The SVR4 "cpio(4)" hints that there are additional formats, but they
  21. # are defined as "short"s; I think all the new formats are
  22. # character-header formats and thus are strings, not numbers.
  23. 0 short 070707 cpio archive
  24. !:mime application/x-cpio
  25. 0 short 0143561 byte-swapped cpio archive
  26. !:mime application/x-cpio # encoding: swapped
  27. 0 string 070707 ASCII cpio archive (pre-SVR4 or odc)
  28. 0 string 070701 ASCII cpio archive (SVR4 with no CRC)
  29. 0 string 070702 ASCII cpio archive (SVR4 with CRC)
  30. # Debian package (needs to go before regular portable archives)
  31. #
  32. 0 string =!<arch>\ndebian
  33. !:mime application/x-debian-package
  34. >8 string debian-split part of multipart Debian package
  35. >8 string debian-binary Debian binary package
  36. >8 string !debian
  37. >68 string >\0 (format %s)
  38. # These next two lines do not work, because a bzip2 Debian archive
  39. # still uses gzip for the control.tar (first in the archive). Only
  40. # data.tar varies, and the location of its filename varies too.
  41. # file/libmagic does not current have support for ascii-string based
  42. # (offsets) as of 2005-09-15.
  43. #>81 string bz2 \b, uses bzip2 compression
  44. #>84 string gz \b, uses gzip compression
  45. #>136 ledate x created: %s
  46. # other archives
  47. 0 long 0177555 very old archive
  48. 0 short 0177555 very old PDP-11 archive
  49. 0 long 0177545 old archive
  50. 0 short 0177545 old PDP-11 archive
  51. 0 long 0100554 apl workspace
  52. 0 string =<ar> archive
  53. !:mime application/x-archive
  54. # MIPS archive (needs to go before regular portable archives)
  55. #
  56. 0 string =!<arch>\n__________E MIPS archive
  57. >20 string U with MIPS Ucode members
  58. >21 string L with MIPSEL members
  59. >21 string B with MIPSEB members
  60. >19 string L and an EL hash table
  61. >19 string B and an EB hash table
  62. >22 string X -- out of date
  63. 0 search/1 -h- Software Tools format archive text
  64. #
  65. # XXX - why are there multiple <ar> thingies? Note that 0x213c6172 is
  66. # "!<ar", so, for new-style (4.xBSD/SVR2andup) archives, we have:
  67. #
  68. # 0 string =!<arch> current ar archive
  69. # 0 long 0x213c6172 archive file
  70. #
  71. # and for SVR1 archives, we have:
  72. #
  73. # 0 string \<ar> System V Release 1 ar archive
  74. # 0 string =<ar> archive
  75. #
  76. # XXX - did Aegis really store shared libraries, breakpointed modules,
  77. # and absolute code program modules in the same format as new-style
  78. # "ar" archives?
  79. #
  80. 0 string =!<arch> current ar archive
  81. !:mime application/x-archive
  82. >8 string __.SYMDEF random library
  83. >0 belong =65538 - pre SR9.5
  84. >0 belong =65539 - post SR9.5
  85. >0 beshort 2 - object archive
  86. >0 beshort 3 - shared library module
  87. >0 beshort 4 - debug break-pointed module
  88. >0 beshort 5 - absolute code program module
  89. 0 string \<ar> System V Release 1 ar archive
  90. 0 string =<ar> archive
  91. #
  92. # XXX - from "vax", which appears to collect a bunch of byte-swapped
  93. # thingies, to help you recognize VAX files on big-endian machines;
  94. # with "leshort", "lelong", and "string", that's no longer necessary....
  95. #
  96. 0 belong 0x65ff0000 VAX 3.0 archive
  97. 0 belong 0x3c61723e VAX 5.0 archive
  98. #
  99. 0 long 0x213c6172 archive file
  100. 0 lelong 0177555 very old VAX archive
  101. 0 leshort 0177555 very old PDP-11 archive
  102. #
  103. # XXX - "pdp" claims that 0177545 can have an __.SYMDEF member and thus
  104. # be a random library (it said 0xff65 rather than 0177545).
  105. #
  106. 0 lelong 0177545 old VAX archive
  107. >8 string __.SYMDEF random library
  108. 0 leshort 0177545 old PDP-11 archive
  109. >8 string __.SYMDEF random library
  110. #
  111. # From "pdp" (but why a 4-byte quantity?)
  112. #
  113. 0 lelong 0x39bed PDP-11 old archive
  114. 0 lelong 0x39bee PDP-11 4.0 archive
  115. # ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com)
  116. #
  117. # The first byte is the magic (0x1a), byte 2 is the compression type for
  118. # the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS
  119. # filename of the first file (null terminated). Since some types collide
  120. # we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%),
  121. # 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%). 0x01 collides with terminfo.
  122. 0 lelong&0x8080ffff 0x0000081a ARC archive data, dynamic LZW
  123. !:mime application/x-arc
  124. 0 lelong&0x8080ffff 0x0000091a ARC archive data, squashed
  125. !:mime application/x-arc
  126. 0 lelong&0x8080ffff 0x0000021a ARC archive data, uncompressed
  127. !:mime application/x-arc
  128. 0 lelong&0x8080ffff 0x0000031a ARC archive data, packed
  129. !:mime application/x-arc
  130. 0 lelong&0x8080ffff 0x0000041a ARC archive data, squeezed
  131. !:mime application/x-arc
  132. 0 lelong&0x8080ffff 0x0000061a ARC archive data, crunched
  133. !:mime application/x-arc
  134. # [JW] stuff taken from idarc, obviously ARC successors:
  135. 0 lelong&0x8080ffff 0x00000a1a PAK archive data
  136. !:mime application/x-arc
  137. 0 lelong&0x8080ffff 0x0000141a ARC+ archive data
  138. !:mime application/x-arc
  139. 0 lelong&0x8080ffff 0x0000481a HYP archive data
  140. !:mime application/x-arc
  141. # Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk)
  142. # I can't create either SPARK or ArcFS archives so I have not tested this stuff
  143. # [GRR: the original entries collide with ARC, above; replaced with combined
  144. # version (not tested)]
  145. #0 byte 0x1a RISC OS archive (spark format)
  146. 0 string \032archive RISC OS archive (ArcFS format)
  147. 0 string Archive\000 RISC OS archive (ArcFS format)
  148. # All these were taken from idarc, many could not be verified. Unfortunately,
  149. # there were many low-quality sigs, i.e. easy to trigger false positives.
  150. # Please notify me of any real-world fishy/ambiguous signatures and I'll try
  151. # to get my hands on the actual archiver and see if I find something better. [JW]
  152. # probably many can be enhanced by finding some 0-byte or control char near the start
  153. # idarc calls this Crush/Uncompressed... *shrug*
  154. 0 string CRUSH Crush archive data
  155. # Squeeze It (.sqz)
  156. 0 string HLSQZ Squeeze It archive data
  157. # SQWEZ
  158. 0 string SQWEZ SQWEZ archive data
  159. # HPack (.hpk)
  160. 0 string HPAK HPack archive data
  161. # HAP
  162. 0 string \x91\x33HF HAP archive data
  163. # MD/MDCD
  164. 0 string MDmd MDCD archive data
  165. # LIM
  166. 0 string LIM\x1a LIM archive data
  167. # SAR
  168. 3 string LH5 SAR archive data
  169. # BSArc/BS2
  170. 0 string \212\3SB \0 BSArc/BS2 archive data
  171. # MAR
  172. 2 string =-ah MAR archive data
  173. # ACB
  174. 0 belong&0x00f800ff 0x00800000 ACB archive data
  175. # CPZ
  176. # TODO, this is what idarc says: 0 string \0\0\0 CPZ archive data
  177. # JRC
  178. 0 string JRchive JRC archive data
  179. # Quantum
  180. 0 string DS\0 Quantum archive data
  181. # ReSOF
  182. 0 string PK\3\6 ReSOF archive data
  183. # QuArk
  184. 0 string 7\4 QuArk archive data
  185. # YAC
  186. 14 string YC YAC archive data
  187. # X1
  188. 0 string X1 X1 archive data
  189. 0 string XhDr X1 archive data
  190. # CDC Codec (.dqt)
  191. 0 belong&0xffffe000 0x76ff2000 CDC Codec archive data
  192. # AMGC
  193. 0 string \xad6" AMGC archive data
  194. # NuLIB
  195. 0 string NõFélå NuLIB archive data
  196. # PakLeo
  197. 0 string LEOLZW PAKLeo archive data
  198. # ChArc
  199. 0 string SChF ChArc archive data
  200. # PSA
  201. 0 string PSA PSA archive data
  202. # CrossePAC
  203. 0 string DSIGDCC CrossePAC archive data
  204. # Freeze
  205. 0 string \x1f\x9f\x4a\x10\x0a Freeze archive data
  206. # KBoom
  207. 0 string ¨MP¨ KBoom archive data
  208. # NSQ, must go after CDC Codec
  209. 0 string \x76\xff NSQ archive data
  210. # DPA
  211. 0 string Dirk\ Paehl DPA archive data
  212. # BA
  213. # TODO: idarc says "bytes 0-2 == bytes 3-5"
  214. # TTComp
  215. 0 string \0\6 TTComp archive data
  216. # ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation?
  217. 0 string ESP ESP archive data
  218. # ZPack
  219. 0 string \1ZPK\1 ZPack archive data
  220. # Sky
  221. 0 string \xbc\x40 Sky archive data
  222. # UFA
  223. 0 string UFA UFA archive data
  224. # Dry
  225. 0 string =-H2O DRY archive data
  226. # FoxSQZ
  227. 0 string FOXSQZ FoxSQZ archive data
  228. # AR7
  229. 0 string ,AR7 AR7 archive data
  230. # PPMZ
  231. 0 string PPMZ PPMZ archive data
  232. # MS Compress
  233. 4 string \x88\xf0\x27 MS Compress archive data
  234. # updated by Joerg Jenderek
  235. >9 string \0
  236. >>0 string KWAJ
  237. >>>7 string \321\003 MS Compress archive data
  238. >>>>14 ulong >0 \b, original size: %ld bytes
  239. >>>>18 ubyte >0x65
  240. >>>>>18 string x \b, was %.8s
  241. >>>>>(10.b-4) string x \b.%.3s
  242. # MP3 (archiver, not lossy audio compression)
  243. 0 string MP3\x1a MP3-Archiver archive data
  244. # ZET
  245. 0 string OZÝ ZET archive data
  246. # TSComp
  247. 0 string \x65\x5d\x13\x8c\x08\x01\x03\x00 TSComp archive data
  248. # ARQ
  249. 0 string gW\4\1 ARQ archive data
  250. # Squash
  251. 3 string OctSqu Squash archive data
  252. # Terse
  253. 0 string \5\1\1\0 Terse archive data
  254. # PUCrunch
  255. 0 string \x01\x08\x0b\x08\xef\x00\x9e\x32\x30\x36\x31 PUCrunch archive data
  256. # UHarc
  257. 0 string UHA UHarc archive data
  258. # ABComp
  259. 0 string \2AB ABComp archive data
  260. 0 string \3AB2 ABComp archive data
  261. # CMP
  262. 0 string CO\0 CMP archive data
  263. # Splint
  264. 0 string \x93\xb9\x06 Splint archive data
  265. # InstallShield
  266. 0 string \x13\x5d\x65\x8c InstallShield Z archive Data
  267. # Gather
  268. 1 string GTH Gather archive data
  269. # BOA
  270. 0 string BOA BOA archive data
  271. # RAX
  272. 0 string ULEB\xa RAX archive data
  273. # Xtreme
  274. 0 string ULEB\0 Xtreme archive data
  275. # Pack Magic
  276. 0 string @â\1\0 Pack Magic archive data
  277. # BTS
  278. 0 belong&0xfeffffff 0x1a034465 BTS archive data
  279. # ELI 5750
  280. 0 string Ora\ ELI 5750 archive data
  281. # QFC
  282. 0 string \x1aFC\x1a QFC archive data
  283. 0 string \x1aQF\x1a QFC archive data
  284. # PRO-PACK
  285. 0 string RNC PRO-PACK archive data
  286. # 777
  287. 0 string 777 777 archive data
  288. # LZS221
  289. 0 string sTaC LZS221 archive data
  290. # HPA
  291. 0 string HPA HPA archive data
  292. # Arhangel
  293. 0 string LG Arhangel archive data
  294. # EXP1, uses bzip2
  295. 0 string 0123456789012345BZh EXP1 archive data
  296. # IMP
  297. 0 string IMP\xa IMP archive data
  298. # NRV
  299. 0 string \x00\x9E\x6E\x72\x76\xFF NRV archive data
  300. # Squish
  301. 0 string \x73\xb2\x90\xf4 Squish archive data
  302. # Par
  303. 0 string PHILIPP Par archive data
  304. 0 string PAR Par archive data
  305. # HIT
  306. 0 string UB HIT archive data
  307. # SBX
  308. 0 belong&0xfffff000 0x53423000 SBX archive data
  309. # NaShrink
  310. 0 string NSK NaShrink archive data
  311. # SAPCAR
  312. 0 string #\ CAR\ archive\ header SAPCAR archive data
  313. 0 string CAR\ 2.00RG SAPCAR archive data
  314. # Disintegrator
  315. 0 string DST Disintegrator archive data
  316. # ASD
  317. 0 string ASD ASD archive data
  318. # InstallShield CAB
  319. 0 string ISc( InstallShield CAB
  320. # TOP4
  321. 0 string T4\x1a TOP4 archive data
  322. # BatComp left out: sig looks like COM executable
  323. # so TODO: get real 4dos batcomp file and find sig
  324. # BlakHole
  325. 0 string BH\5\7 BlakHole archive data
  326. # BIX
  327. 0 string BIX0 BIX archive data
  328. # ChiefLZA
  329. 0 string ChfLZ ChiefLZA archive data
  330. # Blink
  331. 0 string Blink Blink archive data
  332. # Logitech Compress
  333. 0 string \xda\xfa Logitech Compress archive data
  334. # ARS-Sfx (FIXME: really a SFX? then goto COM/EXE)
  335. 1 string (C)\ STEPANYUK ARS-Sfx archive data
  336. # AKT/AKT32
  337. 0 string AKT32 AKT32 archive data
  338. 0 string AKT AKT archive data
  339. # NPack
  340. 0 string MSTSM NPack archive data
  341. # PFT
  342. 0 string \0\x50\0\x14 PFT archive data
  343. # SemOne
  344. 0 string SEM SemOne archive data
  345. # PPMD
  346. 0 string \x8f\xaf\xac\x84 PPMD archive data
  347. # FIZ
  348. 0 string FIZ FIZ archive data
  349. # MSXiE
  350. 0 belong&0xfffff0f0 0x4d530000 MSXiE archive data
  351. # DeepFreezer
  352. 0 belong&0xfffffff0 0x797a3030 DeepFreezer archive data
  353. # DC
  354. 0 string =<DC- DC archive data
  355. # TPac
  356. 0 string \4TPAC\3 TPac archive data
  357. # Ai
  358. 0 string Ai\1\1\0 Ai archive data
  359. 0 string Ai\1\0\0 Ai archive data
  360. # Ai32
  361. 0 string Ai\2\0 Ai32 archive data
  362. 0 string Ai\2\1 Ai32 archive data
  363. # SBC
  364. 0 string SBC SBC archive data
  365. # Ybs
  366. 0 string YBS Ybs archive data
  367. # DitPack
  368. 0 string \x9e\0\0 DitPack archive data
  369. # DMS
  370. 0 string DMS! DMS archive data
  371. # EPC
  372. 0 string \x8f\xaf\xac\x8c EPC archive data
  373. # VSARC
  374. 0 string VS\x1a VSARC archive data
  375. # PDZ
  376. 0 string PDZ PDZ archive data
  377. # ReDuq
  378. 0 string rdqx ReDuq archive data
  379. # GCA
  380. 0 string GCAX GCA archive data
  381. # PPMN
  382. 0 string pN PPMN archive data
  383. # WinImage
  384. 3 string WINIMAGE WinImage archive data
  385. # Compressia
  386. 0 string CMP0CMP Compressia archive data
  387. # UHBC
  388. 0 string UHB UHBC archive data
  389. # WinHKI
  390. 0 string \x61\x5C\x04\x05 WinHKI archive data
  391. # WWPack data file
  392. 0 string WWP WWPack archive data
  393. # BSN (BSA, PTS-DOS)
  394. 0 string \xffBSG BSN archive data
  395. 1 string \xffBSG BSN archive data
  396. 3 string \xffBSG BSN archive data
  397. 1 string \0\xae\2 BSN archive data
  398. 1 string \0\xae\3 BSN archive data
  399. 1 string \0\xae\7 BSN archive data
  400. # AIN
  401. 0 string \x33\x18 AIN archive data
  402. 0 string \x33\x17 AIN archive data
  403. # XPA32
  404. 0 string xpa\0\1 XPA32 archive data
  405. # SZip (TODO: doesn't catch all versions)
  406. 0 string SZ\x0a\4 SZip archive data
  407. # XPack DiskImage
  408. 0 string jm XPack DiskImage archive data
  409. # XPack Data
  410. 0 string xpa XPack archive data
  411. # XPack Single Data
  412. 0 string Í\ jm XPack single archive data
  413. # TODO: missing due to unknown magic/magic at end of file:
  414. #DWC
  415. #ARG
  416. #ZAR
  417. #PC/3270
  418. #InstallIt
  419. #RKive
  420. #RK
  421. #XPack Diskimage
  422. # These were inspired by idarc, but actually verified
  423. # Dzip archiver (.dz)
  424. 0 string DZ Dzip archive data
  425. >2 byte x \b, version %i
  426. >3 byte x \b.%i
  427. # ZZip archiver (.zz)
  428. 0 string ZZ\ \0\0 ZZip archive data
  429. 0 string ZZ0 ZZip archive data
  430. # PAQ archiver (.paq)
  431. 0 string \xaa\x40\x5f\x77\x1f\xe5\x82\x0d PAQ archive data
  432. 0 string PAQ PAQ archive data
  433. >3 byte&0xf0 0x30
  434. >>3 byte x (v%c)
  435. # JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP)
  436. 0xe string \x1aJar\x1b JAR (ARJ Software, Inc.) archive data
  437. 0 string JARCS JAR (ARJ Software, Inc.) archive data
  438. # ARJ archiver (jason@jarthur.Claremont.EDU)
  439. 0 leshort 0xea60 ARJ archive data
  440. !:mime application/x-arj
  441. >5 byte x \b, v%d,
  442. >8 byte &0x04 multi-volume,
  443. >8 byte &0x10 slash-switched,
  444. >8 byte &0x20 backup,
  445. >34 string x original name: %s,
  446. >7 byte 0 os: MS-DOS
  447. >7 byte 1 os: PRIMOS
  448. >7 byte 2 os: Unix
  449. >7 byte 3 os: Amiga
  450. >7 byte 4 os: Macintosh
  451. >7 byte 5 os: OS/2
  452. >7 byte 6 os: Apple ][ GS
  453. >7 byte 7 os: Atari ST
  454. >7 byte 8 os: NeXT
  455. >7 byte 9 os: VAX/VMS
  456. >3 byte >0 %d]
  457. # [JW] idarc says this is also possible
  458. 2 leshort 0xea60 ARJ archive data
  459. # HA archiver (Greg Roelofs, newt@uchicago.edu)
  460. # This is a really bad format. A file containing HAWAII will match this...
  461. #0 string HA HA archive data,
  462. #>2 leshort =1 1 file,
  463. #>2 leshort >1 %u files,
  464. #>4 byte&0x0f =0 first is type CPY
  465. #>4 byte&0x0f =1 first is type ASC
  466. #>4 byte&0x0f =2 first is type HSC
  467. #>4 byte&0x0f =0x0e first is type DIR
  468. #>4 byte&0x0f =0x0f first is type SPECIAL
  469. # suggestion: at least identify small archives (<1024 files)
  470. 0 belong&0xffff00fc 0x48410000 HA archive data
  471. >2 leshort =1 1 file,
  472. >2 leshort >1 %u files,
  473. >4 byte&0x0f =0 first is type CPY
  474. >4 byte&0x0f =1 first is type ASC
  475. >4 byte&0x0f =2 first is type HSC
  476. >4 byte&0x0f =0x0e first is type DIR
  477. >4 byte&0x0f =0x0f first is type SPECIAL
  478. # HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz)
  479. 0 string HPAK HPACK archive data
  480. # JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net
  481. 0 string \351,\001JAM\ JAM archive,
  482. >7 string >\0 version %.4s
  483. >0x26 byte =0x27 -
  484. >>0x2b string >\0 label %.11s,
  485. >>0x27 lelong x serial %08x,
  486. >>0x36 string >\0 fstype %.8s
  487. # LHARC/LHA archiver (Greg Roelofs, newt@uchicago.edu)
  488. 2 string -lh0- LHarc 1.x/ARX archive data [lh0]
  489. !:mime application/x-lharc
  490. 2 string -lh1- LHarc 1.x/ARX archive data [lh1]
  491. !:mime application/x-lharc
  492. 2 string -lz4- LHarc 1.x archive data [lz4]
  493. !:mime application/x-lharc
  494. 2 string -lz5- LHarc 1.x archive data [lz5]
  495. !:mime application/x-lharc
  496. # [never seen any but the last; -lh4- reported in comp.compression:]
  497. 2 string -lzs- LHa/LZS archive data [lzs]
  498. !:mime application/x-lha
  499. 2 string -lh\40- LHa 2.x? archive data [lh ]
  500. !:mime application/x-lha
  501. 2 string -lhd- LHa 2.x? archive data [lhd]
  502. !:mime application/x-lha
  503. 2 string -lh2- LHa 2.x? archive data [lh2]
  504. !:mime application/x-lha
  505. 2 string -lh3- LHa 2.x? archive data [lh3]
  506. !:mime application/x-lha
  507. 2 string -lh4- LHa (2.x) archive data [lh4]
  508. !:mime application/x-lha
  509. 2 string -lh5- LHa (2.x) archive data [lh5]
  510. !:mime application/x-lha
  511. 2 string -lh6- LHa (2.x) archive data [lh6]
  512. !:mime application/x-lha
  513. 2 string -lh7- LHa (2.x)/LHark archive data [lh7]
  514. !:mime application/x-lha
  515. >20 byte x - header level %d
  516. # taken from idarc [JW]
  517. 2 string -lZ PUT archive data
  518. 2 string -lz LZS archive data
  519. 2 string -sw1- Swag archive data
  520. # RAR archiver (Greg Roelofs, newt@uchicago.edu)
  521. 0 string Rar! RAR archive data,
  522. !:mime application/x-rar
  523. >44 byte x v%0x,
  524. >10 byte >0 flags:
  525. >>10 byte &0x01 Archive volume,
  526. >>10 byte &0x02 Commented,
  527. >>10 byte &0x04 Locked,
  528. >>10 byte &0x08 Solid,
  529. >>10 byte &0x20 Authenticated,
  530. >35 byte 0 os: MS-DOS
  531. >35 byte 1 os: OS/2
  532. >35 byte 2 os: Win32
  533. >35 byte 3 os: Unix
  534. # some old version? idarc says:
  535. 0 string RE\x7e\x5e RAR archive data
  536. # SQUISH archiver (Greg Roelofs, newt@uchicago.edu)
  537. 0 string SQSH squished archive data (Acorn RISCOS)
  538. # UC2 archiver (Greg Roelofs, newt@uchicago.edu)
  539. # [JW] see exe section for self-extracting version
  540. 0 string UC2\x1a UC2 archive data
  541. # ZIP archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
  542. 0 string PK\003\004
  543. >4 byte 0x00 Zip archive data
  544. !:mime application/zip
  545. >4 byte 0x09 Zip archive data, at least v0.9 to extract
  546. !:mime application/zip
  547. >4 byte 0x0a Zip archive data, at least v1.0 to extract
  548. !:mime application/zip
  549. >4 byte 0x0b Zip archive data, at least v1.1 to extract
  550. !:mime application/zip
  551. >0x161 string WINZIP Zip archive data, WinZIP self-extracting
  552. !:mime application/zip
  553. >4 byte 0x14
  554. >>30 ubelong !0x6d696d65 Zip archive data, at least v2.0 to extract
  555. !:mime application/zip
  556. # OpenOffice.org / KOffice / StarOffice documents
  557. # Listed here because they ARE zip files
  558. #
  559. # From: Abel Cheung <abel@oaka.org>
  560. >4 byte 0x14
  561. >>30 string mimetype
  562. # KOffice (1.2 or above) formats
  563. >>>50 string vnd.kde. KOffice (>=1.2)
  564. >>>>58 string karbon Karbon document
  565. >>>>58 string kchart KChart document
  566. >>>>58 string kformula KFormula document
  567. >>>>58 string kivio Kivio document
  568. >>>>58 string kontour Kontour document
  569. >>>>58 string kpresenter KPresenter document
  570. >>>>58 string kspread KSpread document
  571. >>>>58 string kword KWord document
  572. # OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7)
  573. >>>50 string vnd.sun.xml. OpenOffice.org 1.x
  574. >>>>62 string writer Writer
  575. >>>>>68 byte !0x2e document
  576. >>>>>68 string .template template
  577. >>>>>68 string .global global document
  578. >>>>62 string calc Calc
  579. >>>>>66 byte !0x2e spreadsheet
  580. >>>>>66 string .template template
  581. >>>>62 string draw Draw
  582. >>>>>66 byte !0x2e document
  583. >>>>>66 string .template template
  584. >>>>62 string impress Impress
  585. >>>>>69 byte !0x2e presentation
  586. >>>>>69 string .template template
  587. >>>>62 string math Math document
  588. >>>>62 string base Database file
  589. # OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8)
  590. # http://lists.oasis-open.org/archives/office/200505/msg00006.html
  591. >>>50 string vnd.oasis.opendocument. OpenDocument
  592. >>>>73 string text
  593. >>>>>77 byte !0x2d Text
  594. !:mime application/vnd.oasis.opendocument.text
  595. >>>>>77 string -template Text Template
  596. >>>>>77 string -web HTML Document Template
  597. >>>>>77 string -master Master Document
  598. >>>>73 string graphics Drawing
  599. >>>>>81 string -template Template
  600. >>>>73 string presentation Presentation
  601. >>>>>85 string -template Template
  602. >>>>73 string spreadsheet Spreadsheet
  603. >>>>>84 string -template Template
  604. >>>>73 string chart Chart
  605. >>>>>78 string -template Template
  606. >>>>73 string formula Formula
  607. >>>>>80 string -template Template
  608. >>>>73 string database Database
  609. >>>>73 string image Image
  610. # Zoo archiver
  611. 20 lelong 0xfdc4a7dc Zoo archive data
  612. !:mime application/x-zoo
  613. >4 byte >48 \b, v%c.
  614. >>6 byte >47 \b%c
  615. >>>7 byte >47 \b%c
  616. >32 byte >0 \b, modify: v%d
  617. >>33 byte x \b.%d+
  618. >42 lelong 0xfdc4a7dc \b,
  619. >>70 byte >0 extract: v%d
  620. >>>71 byte x \b.%d+
  621. # Shell archives
  622. 10 string #\ This\ is\ a\ shell\ archive shell archive text
  623. !:mime application/octet-stream
  624. #
  625. # LBR. NB: May conflict with the questionable
  626. # "binary Computer Graphics Metafile" format.
  627. #
  628. 0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data
  629. #
  630. # PMA (CP/M derivative of LHA)
  631. #
  632. 2 string -pm0- PMarc archive data [pm0]
  633. 2 string -pm1- PMarc archive data [pm1]
  634. 2 string -pm2- PMarc archive data [pm2]
  635. 2 string -pms- PMarc SFX archive (CP/M, DOS)
  636. 5 string -pc1- PopCom compressed executable (CP/M)
  637. # From Rafael Laboissiere <rafael@laboissiere.net>
  638. # The Project Revision Control System (see
  639. # http://prcs.sourceforge.net) generates a packaged project
  640. # file which is recognized by the following entry:
  641. 0 leshort 0xeb81 PRCS packaged project
  642. # Microsoft cabinets
  643. # by David Necas (Yeti) <yeti@physics.muni.cz>
  644. #0 string MSCF\0\0\0\0 Microsoft cabinet file data,
  645. #>25 byte x v%d
  646. #>24 byte x \b.%d
  647. # MPi: All CABs have version 1.3, so this is pointless.
  648. # Better magic in debian-additions.
  649. # GTKtalog catalogs
  650. # by David Necas (Yeti) <yeti@physics.muni.cz>
  651. 4 string gtktalog\ GTKtalog catalog data,
  652. >13 string 3 version 3
  653. >>14 beshort 0x677a (gzipped)
  654. >>14 beshort !0x677a (not gzipped)
  655. >13 string >3 version %s
  656. ############################################################################
  657. # Parity archive reconstruction file, the 'par' file format now used on Usenet.
  658. 0 string PAR\0 PARity archive data
  659. >48 leshort =0 - Index file
  660. >48 leshort >0 - file number %d
  661. # Felix von Leitner <felix-file@fefe.de>
  662. 0 string d8:announce BitTorrent file
  663. !:mime application/x-bittorrent
  664. # Atari MSA archive - Teemu Hukkanen <tjhukkan@iki.fi>
  665. 0 beshort 0x0e0f Atari MSA archive data
  666. >2 beshort x \b, %d sectors per track
  667. >4 beshort 0 \b, 1 sided
  668. >4 beshort 1 \b, 2 sided
  669. >6 beshort x \b, starting track: %d
  670. >8 beshort x \b, ending track: %d
  671. # Alternate ZIP string (amc@arwen.cs.berkeley.edu)
  672. 0 string PK00PK\003\004 Zip archive data
  673. # ACE archive (from http://www.wotsit.org/download.asp?f=ace)
  674. # by Stefan `Sec` Zehl <sec@42.org>
  675. 7 string **ACE** ACE archive data
  676. >15 byte >0 version %d
  677. >16 byte =0x00 \b, from MS-DOS
  678. >16 byte =0x01 \b, from OS/2
  679. >16 byte =0x02 \b, from Win/32
  680. >16 byte =0x03 \b, from Unix
  681. >16 byte =0x04 \b, from MacOS
  682. >16 byte =0x05 \b, from WinNT
  683. >16 byte =0x06 \b, from Primos
  684. >16 byte =0x07 \b, from AppleGS
  685. >16 byte =0x08 \b, from Atari
  686. >16 byte =0x09 \b, from Vax/VMS
  687. >16 byte =0x0A \b, from Amiga
  688. >16 byte =0x0B \b, from Next
  689. >14 byte x \b, version %d to extract
  690. >5 leshort &0x0080 \b, multiple volumes,
  691. >>17 byte x \b (part %d),
  692. >5 leshort &0x0002 \b, contains comment
  693. >5 leshort &0x0200 \b, sfx
  694. >5 leshort &0x0400 \b, small dictionary
  695. >5 leshort &0x0800 \b, multi-volume
  696. >5 leshort &0x1000 \b, contains AV-String
  697. >>30 string \x16*UNREGISTERED\x20VERSION* (unregistered)
  698. >5 leshort &0x2000 \b, with recovery record
  699. >5 leshort &0x4000 \b, locked
  700. >5 leshort &0x8000 \b, solid
  701. # Date in MS-DOS format (whatever that is)
  702. #>18 lelong x Created on
  703. # sfArk : compression program for Soundfonts (sf2) by Dirk Jagdmann
  704. # <doj@cubic.org>
  705. 0x1A string sfArk sfArk compressed Soundfont
  706. >0x15 string 2
  707. >>0x1 string >\0 Version %s
  708. >>0x2A string >\0 : %s
  709. # DR-DOS 7.03 Packed File *.??_
  710. 0 string Packed\ File\ Personal NetWare Packed File
  711. >12 string x \b, was "%.12s"
  712. # EET archive
  713. # From: Tilman Sauerbeck <tilman@code-monkey.de>
  714. 0 belong 0x1ee7ff00 EET archive
  715. !:mime application/x-eet
  716. # rzip archives
  717. 0 string RZIP rzip compressed data
  718. >4 byte x - version %d
  719. >5 byte x \b.%d
  720. >6 belong x (%d bytes)
  721. # From: "Robert Dale" <robdale@gmail.com>
  722. 0 belong 123 dar archive,
  723. >4 belong x label "%.8x
  724. >>8 belong x %.8x
  725. >>>12 beshort x %.4x"
  726. >14 byte 0x54 end slice
  727. >14 beshort 0x4e4e multi-part
  728. >14 beshort 0x4e53 multi-part, with -S
  729. # Symbian installation files
  730. # http://www.thouky.co.uk/software/psifs/sis.html
  731. # http://developer.symbian.com/main/downloads/papers/SymbianOSv91/softwareinstallsis.pdf
  732. 8 lelong 0x10000419 Symbian installation file
  733. !:mime application/vnd.symbian.install
  734. >4 lelong 0x1000006D (EPOC release 3/4/5)
  735. >4 lelong 0x10003A12 (EPOC release 6)
  736. 0 lelong 0x10201A7A Symbian installation file (Symbian OS 9.x)
  737. !:mime x-epoc/x-sisx-app
  738. # From "Nelson A. de Oliveira" <naoliv@gmail.com>
  739. 0 string MPQ\032 MoPaQ (MPQ) archive
  740. # From: Dirk Jagdmann <doj@cubic.org>
  741. # xar archive format: http://code.google.com/p/xar/
  742. 0 string xar! xar archive
  743. >6 beshort x - version %ld
  744. # From: "Nelson A. de Oliveira" <naoliv@gmail.com>
  745. # .kgb
  746. 0 string KGB_arch KGB Archiver file
  747. >10 string x with compression level %.1s
  748. # xar (eXtensible ARchiver) archive
  749. # From: "David Remahl" <dremahl@apple.com>
  750. 0 string xar! xar archive
  751. #>4 beshort x header size %d
  752. >6 beshort x version %d,
  753. #>8 quad x compressed TOC: %d,
  754. #>16 quad x uncompressed TOC: %d,
  755. >24 belong 0 no checksum
  756. >24 belong 1 SHA-1 checksum
  757. >24 belong 2 MD5 checksum