magic.mime 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991
  1. # Magic data for KMimeMagic (originally for file(1) command)
  2. #
  3. # Note on adding additional MIME types:
  4. #
  5. # [RFC2045,RFC2046] specifies that Content Types, Content Subtypes, Character
  6. # Sets, Access Types, and conversion values for MIME mail will be assigned and
  7. # listed by the IANA.
  8. # http://www.iana.org/assignments/media-types/
  9. #
  10. # Any unregistered file type should be listed with a preceding x-, as in
  11. # application/x-foo (RFC2045 5.1), or a x., as in application/x.foo (RFC4288
  12. # 4.3). Any non x-prefixed type should be registered with IANA and listed at
  13. # the above address. Any other behavior is a MIME standards violation!
  14. #
  15. # It is preferred that when a registered MIME type exists, that
  16. # the registered Content-Type and Subtype be used to refer to a file of
  17. # that type, so don't use application/x-zip when application/zip is
  18. # registered.
  19. #
  20. # If an active RFC suggests that a MIME registration for a new type is in
  21. # progress, make a note of it pointing to that RFC.
  22. #
  23. # The format is 4-5 columns:
  24. # Column #1: byte number to begin checking from, ">" indicates continuation
  25. # Column #2: type of data to match
  26. # Column #3: contents of data to match
  27. # Column #4: MIME type of result
  28. # Column #5: MIME encoding of result (optional)
  29. #------------------------------------------------------------------------------
  30. # Localstuff: file(1) magic for locally observed files
  31. # Add any locally observed files here.
  32. # Real Audio (Magic .ra\0375)
  33. 0 belong 0x2e7261fd audio/x-pn-realaudio
  34. 0 string .RMF application/vnd.rn-realmedia
  35. #video/x-pn-realvideo
  36. #video/vnd.rn-realvideo
  37. #application/vnd.rn-realmedia
  38. # sigh, there are many mimes for that but the above are the most common.
  39. # Taken from magic, converted to magic.mime
  40. # mime types according to http://www.geocities.com/nevilo/mod.htm:
  41. # audio/it .it
  42. # audio/x-zipped-it .itz
  43. # audio/xm fasttracker modules
  44. # audio/x-s3m screamtracker modules
  45. # audio/s3m screamtracker modules
  46. # audio/x-zipped-mod mdz
  47. # audio/mod mod
  48. # audio/x-mod All modules (mod, s3m, 669, mtm, med, xm, it, mdz, stm, itz, xmz, s3z)
  49. # Taken from loader code from mikmod version 2.14
  50. # by Steve McIntyre (stevem@chiark.greenend.org.uk)
  51. # <doj@cubic.org> added title printing on 2003-06-24
  52. 0 string MAS_UTrack_V00
  53. >14 string >/0 audio/x-mod
  54. #audio/x-tracker-module
  55. #0 string UN05 MikMod UNI format module sound data
  56. 0 string Extended\ Module: audio/x-mod
  57. #audio/x-tracker-module
  58. ##>17 string >\0 Title: "%s"
  59. 21 string/c \!SCREAM! audio/x-mod
  60. #audio/x-screamtracker-module
  61. 21 string BMOD2STM audio/x-mod
  62. #audio/x-screamtracker-module
  63. 1080 string M.K. audio/x-mod
  64. #audio/x-protracker-module
  65. #>0 string >\0 Title: "%s"
  66. 1080 string M!K! audio/x-mod
  67. #audio/x-protracker-module
  68. #>0 string >\0 Title: "%s"
  69. 1080 string FLT4 audio/x-mod
  70. #audio/x-startracker-module
  71. #>0 string >\0 Title: "%s"
  72. 1080 string FLT8 audio/x-mod
  73. #audio/x-startracker-module
  74. #>0 string >\0 Title: "%s"
  75. 1080 string 4CHN audio/x-mod
  76. #audio/x-fasttracker-module
  77. #>0 string >\0 Title: "%s"
  78. 1080 string 6CHN audio/x-mod
  79. #audio/x-fasttracker-module
  80. #>0 string >\0 Title: "%s"
  81. 1080 string 8CHN audio/x-mod
  82. #audio/x-fasttracker-module
  83. #>0 string >\0 Title: "%s"
  84. 1080 string CD81 audio/x-mod
  85. #audio/x-oktalyzer-tracker-module
  86. #>0 string >\0 Title: "%s"
  87. 1080 string OKTA audio/x-mod
  88. #audio/x-oktalyzer-tracker-module
  89. #>0 string >\0 Title: "%s"
  90. # Not good enough.
  91. #1082 string CH
  92. #>1080 string >/0 %.2s-channel Fasttracker "oktalyzer" module sound data
  93. 1080 string 16CN audio/x-mod
  94. #audio/x-taketracker-module
  95. #>0 string >\0 Title: "%s"
  96. 1080 string 32CN audio/x-mod
  97. #audio/x-taketracker-module
  98. #>0 string >\0 Title: "%s"
  99. # Impuse tracker module (it)
  100. 0 string IMPM audio/x-mod
  101. #>4 string >\0 "%s"
  102. #>40 leshort !0 compatible w/ITv%x
  103. #>42 leshort !0 created w/ITv%x
  104. #------------------------------------------------------------------------------
  105. # end local stuff
  106. #------------------------------------------------------------------------------
  107. # xml based formats!
  108. # svg
  109. 38 string \<\!DOCTYPE\040svg image/svg+xml
  110. 0 belong 0xfeedfeed application/x-java-keystore
  111. 0 belong 0xcececece application/x-java-jce-keystore
  112. # xml
  113. 0 string \<?xml text/xml
  114. #------------------------------------------------------------------------------
  115. # Java
  116. 0 beshort 0xcafe
  117. >2 beshort 0xbabe application/x-java-applet
  118. >2 beshort 0xd00d application/x-java-pack200
  119. #------------------------------------------------------------------------------
  120. # audio: file(1) magic for sound formats
  121. #
  122. # from Jan Nicolai Langfeldt <janl@ifi.uio.no>,
  123. #
  124. # Sun/NeXT audio data
  125. 0 string .snd
  126. >12 belong 1 audio/basic
  127. >12 belong 2 audio/basic
  128. >12 belong 3 audio/basic
  129. >12 belong 4 audio/basic
  130. >12 belong 5 audio/basic
  131. >12 belong 6 audio/basic
  132. >12 belong 7 audio/basic
  133. >12 belong 23 audio/x-adpcm
  134. # DEC systems (e.g. DECstation 5000) use a variant of the Sun/NeXT format
  135. # that uses little-endian encoding and has a different magic number
  136. # (0x0064732E in little-endian encoding).
  137. 0 lelong 0x0064732E
  138. >12 lelong 1 audio/x-dec-basic
  139. >12 lelong 2 audio/x-dec-basic
  140. >12 lelong 3 audio/x-dec-basic
  141. >12 lelong 4 audio/x-dec-basic
  142. >12 lelong 5 audio/x-dec-basic
  143. >12 lelong 6 audio/x-dec-basic
  144. >12 lelong 7 audio/x-dec-basic
  145. # compressed (G.721 ADPCM)
  146. >12 lelong 23 audio/x-dec-adpcm
  147. # Bytes 0-3 of AIFF, AIFF-C, & 8SVX audio files are "FORM"
  148. # AIFF audio data
  149. 8 string AIFF audio/x-aiff
  150. # AIFF-C audio data
  151. 8 string AIFC audio/x-aiff
  152. # IFF/8SVX audio data
  153. 8 string 8SVX audio/x-aiff
  154. # Creative Labs AUDIO stuff
  155. # Standard MIDI data
  156. 0 string MThd audio/x-midi
  157. #>9 byte >0 (format %d)
  158. #>11 byte >1 using %d channels
  159. # Creative Music (CMF) data
  160. 0 string CTMF audio/x-unknown
  161. # SoundBlaster instrument data
  162. 0 string SBI audio/x-unknown
  163. # Creative Labs voice data
  164. 0 string Creative\ Voice\ File audio/x-unknown
  165. ## is this next line right? it came this way...
  166. #>19 byte 0x1A
  167. #>23 byte >0 - version %d
  168. #>22 byte >0 \b.%d
  169. # [GRR 950115: is this also Creative Labs? Guessing that first line
  170. # should be string instead of unknown-endian long...]
  171. #0 long 0x4e54524b MultiTrack sound data
  172. #0 string NTRK MultiTrack sound data
  173. #>4 long x - version %ld
  174. # Microsoft WAVE format (*.wav)
  175. # [GRR 950115: probably all of the shorts and longs should be leshort/lelong]
  176. # Microsoft RIFF
  177. 0 string RIFF
  178. # - WAVE format
  179. >8 string WAVE audio/x-wav
  180. >8 string/B AVI video/x-msvideo
  181. #
  182. >8 string CDRA image/x-coreldraw
  183. # AAC (aka MPEG-2 NBC)
  184. 0 beshort&0xfff6 0xfff0 audio/X-HX-AAC-ADTS
  185. 0 string ADIF audio/X-HX-AAC-ADIF
  186. 0 beshort&0xffe0 0x56e0 audio/MP4A-LATM
  187. 0 beshort 0x4De1 audio/MP4A-LATM
  188. # MPEG Layer 3 sound files
  189. # modified by Joerg Jenderek
  190. # GRR the original test are too common for many DOS files
  191. # so test 1 <= kbits nibble <= E
  192. 0 beshort &0xffe0
  193. >2 ubyte&0xF0 >0x0F
  194. >>2 ubyte&0xF0 <0xE1 audio/mpeg
  195. #MP3 with ID3 tag
  196. 0 string ID3 audio/mpeg
  197. # Ogg/Vorbis
  198. 0 string OggS application/ogg
  199. #------------------------------------------------------------------------------
  200. # c-lang: file(1) magic for C programs or various scripts
  201. #
  202. # XPM icons (Greg Roelofs, newt@uchicago.edu)
  203. # ideally should go into "images", but entries below would tag XPM as C source
  204. 0 string /*\ XPM image/x-xpmi
  205. # 3DS (3d Studio files) Conflicts with diff output 0x3d '='
  206. #16 beshort 0x3d3d image/x-3ds
  207. # this first will upset you if you're a PL/1 shop... (are there any left?)
  208. # in which case rm it; ascmagic will catch real C programs
  209. # C or REXX program text
  210. #0 string /* text/x-c
  211. # C++ program text
  212. #0 string // text/x-c++
  213. #------------------------------------------------------------------------------
  214. # commands: file(1) magic for various shells and interpreters
  215. #
  216. #0 string :\ shell archive or commands for antique kernel text
  217. 0 string #!/bin/sh application/x-shellscript
  218. 0 string #!\ /bin/sh application/x-shellscript
  219. 0 string #!/bin/csh application/x-shellscript
  220. 0 string #!\ /bin/csh application/x-shellscript
  221. # korn shell magic, sent by George Wu, gwu@clyde.att.com
  222. 0 string #!/bin/ksh application/x-shellscript
  223. 0 string #!\ /bin/ksh application/x-shellscript
  224. 0 string #!/bin/tcsh application/x-shellscript
  225. 0 string #!\ /bin/tcsh application/x-shellscript
  226. 0 string #!/usr/local/tcsh application/x-shellscript
  227. 0 string #!\ /usr/local/tcsh application/x-shellscript
  228. 0 string #!/usr/local/bin/tcsh application/x-shellscript
  229. 0 string #!\ /usr/local/bin/tcsh application/x-shellscript
  230. # bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de)
  231. 0 string #!/bin/bash application/x-shellscript
  232. 0 string #!\ /bin/bash application/x-shellscript
  233. 0 string #!/usr/local/bin/bash application/x-shellscript
  234. 0 string #!\ /usr/local/bin/bash application/x-shellscript
  235. #
  236. # zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson)
  237. 0 string #!/bin/zsh application/x-shellscript
  238. 0 string #!/usr/bin/zsh application/x-shellscript
  239. 0 string #!/usr/local/bin/zsh application/x-shellscript
  240. 0 string #!\ /usr/local/bin/zsh application/x-shellscript
  241. 0 string #!/usr/local/bin/ash application/x-shellscript
  242. 0 string #!\ /usr/local/bin/ash application/x-shellscript
  243. #0 string #!/usr/local/bin/ae Neil Brown's ae
  244. #0 string #!\ /usr/local/bin/ae Neil Brown's ae
  245. 0 string #!/bin/nawk application/x-nawk
  246. 0 string #!\ /bin/nawk application/x-nawk
  247. 0 string #!/usr/bin/nawk application/x-nawk
  248. 0 string #!\ /usr/bin/nawk application/x-nawk
  249. 0 string #!/usr/local/bin/nawk application/x-nawk
  250. 0 string #!\ /usr/local/bin/nawk application/x-nawk
  251. 0 string #!/bin/gawk application/x-gawk
  252. 0 string #!\ /bin/gawk application/x-gawk
  253. 0 string #!/usr/bin/gawk application/x-gawk
  254. 0 string #!\ /usr/bin/gawk application/x-gawk
  255. 0 string #!/usr/local/bin/gawk application/x-gawk
  256. 0 string #!\ /usr/local/bin/gawk application/x-gawk
  257. #
  258. 0 string #!/bin/awk application/x-awk
  259. 0 string #!\ /bin/awk application/x-awk
  260. 0 string #!/usr/bin/awk application/x-awk
  261. 0 string #!\ /usr/bin/awk application/x-awk
  262. # update to distinguish from *.vcf files by Joerg Jenderek: joerg dot jenderek at web dot de
  263. # Too general, \EBEGIN matches in postscript
  264. #0 regex BEGIN[[:space:]]*[{] application/x-awk
  265. # For Larry Wall's perl language. The ``eval'' line recognizes an
  266. # outrageously clever hack for USG systems.
  267. # Keith Waclena <keith@cerberus.uchicago.edu>
  268. 0 string #!/bin/perl application/x-perl
  269. 0 string #!\ /bin/perl application/x-perl
  270. 0 string eval\ "exec\ /bin/perl application/x-perl
  271. 0 string #!/usr/bin/perl application/x-perl
  272. 0 string #!\ /usr/bin/perl application/x-perl
  273. 0 string eval\ "exec\ /usr/bin/perl application/x-perl
  274. 0 string #!/usr/local/bin/perl application/x-perl
  275. 0 string #!\ /usr/local/bin/perl application/x-perl
  276. 0 string eval\ "exec\ /usr/local/bin/perl application/x-perl
  277. #------------------------------------------------------------------------------
  278. # compress: file(1) magic for pure-compression formats (no archives)
  279. #
  280. # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, whap, etc.
  281. #
  282. # Formats for various forms of compressed data
  283. # Formats for "compress" proper have been moved into "compress.c",
  284. # because it tries to uncompress it to figure out what's inside.
  285. # standard unix compress
  286. 0 string \037\235 application/x-compress
  287. # gzip (GNU zip, not to be confused with [Info-ZIP/PKWARE] zip archiver)
  288. 0 string \037\213 application/x-gzip
  289. 0 string PK\003\004 application/zip
  290. # RAR archiver (Greg Roelofs, newt@uchicago.edu)
  291. 0 string Rar! application/x-rar
  292. # According to gzip.h, this is the correct byte order for packed data.
  293. 0 string \037\036 application/octet-stream
  294. #
  295. # This magic number is byte-order-independent.
  296. #
  297. 0 short 017437 application/octet-stream
  298. # XXX - why *two* entries for "compacted data", one of which is
  299. # byte-order independent, and one of which is byte-order dependent?
  300. #
  301. # compacted data
  302. 0 short 0x1fff application/octet-stream
  303. 0 string \377\037 application/octet-stream
  304. # huf output
  305. 0 short 0145405 application/octet-stream
  306. # Squeeze and Crunch...
  307. # These numbers were gleaned from the Unix versions of the programs to
  308. # handle these formats. Note that I can only uncrunch, not crunch, and
  309. # I didn't have a crunched file handy, so the crunch number is untested.
  310. # Keith Waclena <keith@cerberus.uchicago.edu>
  311. #0 leshort 0x76FF squeezed data (CP/M, DOS)
  312. #0 leshort 0x76FE crunched data (CP/M, DOS)
  313. # Freeze
  314. #0 string \037\237 Frozen file 2.1
  315. #0 string \037\236 Frozen file 1.0 (or gzip 0.5)
  316. # lzh?
  317. #0 string \037\240 LZH compressed data
  318. 257 string ustar\0 application/x-tar posix
  319. 257 string ustar\040\040\0 application/x-tar gnu
  320. 0 short 070707 application/x-cpio
  321. 0 short 0143561 application/x-cpio swapped
  322. 0 string =<ar> application/x-archive
  323. 0 string \!<arch> application/x-archive
  324. >8 string debian application/x-debian-package
  325. #------------------------------------------------------------------------------
  326. #
  327. # RPM: file(1) magic for Red Hat Packages Erik Troan (ewt@redhat.com)
  328. #
  329. 0 beshort 0xedab
  330. >2 beshort 0xeedb application/x-rpm
  331. 0 lelong&0x8080ffff 0x0000081a application/x-arc lzw
  332. 0 lelong&0x8080ffff 0x0000091a application/x-arc squashed
  333. 0 lelong&0x8080ffff 0x0000021a application/x-arc uncompressed
  334. 0 lelong&0x8080ffff 0x0000031a application/x-arc packed
  335. 0 lelong&0x8080ffff 0x0000041a application/x-arc squeezed
  336. 0 lelong&0x8080ffff 0x0000061a application/x-arc crunched
  337. 0 leshort 0xea60 application/x-arj
  338. # LHARC/LHA archiver (Greg Roelofs, newt@uchicago.edu)
  339. 2 string -lh0- application/x-lharc lh0
  340. 2 string -lh1- application/x-lharc lh1
  341. 2 string -lz4- application/x-lharc lz4
  342. 2 string -lz5- application/x-lharc lz5
  343. # [never seen any but the last; -lh4- reported in comp.compression:]
  344. 2 string -lzs- application/x-lha lzs
  345. 2 string -lh\ - application/x-lha lh
  346. 2 string -lhd- application/x-lha lhd
  347. 2 string -lh2- application/x-lha lh2
  348. 2 string -lh3- application/x-lha lh3
  349. 2 string -lh4- application/x-lha lh4
  350. 2 string -lh5- application/x-lha lh5
  351. 2 string -lh6- application/x-lha lh6
  352. 2 string -lh7- application/x-lha lh7
  353. # Shell archives
  354. 10 string #\ This\ is\ a\ shell\ archive application/octet-stream x-shell
  355. #------------------------------------------------------------------------------
  356. # frame: file(1) magic for FrameMaker files
  357. #
  358. # This stuff came on a FrameMaker demo tape, most of which is
  359. # copyright, but this file is "published" as witness the following:
  360. #
  361. # Note that this is the Framemaker Maker Interchange Format, not the
  362. # Normal format which would be application/vnd.framemaker.
  363. #
  364. 0 string \<MakerFile application/x-mif
  365. 0 string \<MIFFile application/x-mif
  366. 0 string \<MakerDictionary application/x-mif
  367. 0 string \<MakerScreenFon application/x-mif
  368. 0 string \<MML application/x-mif
  369. 0 string \<Book application/x-mif
  370. 0 string \<Maker application/x-mif
  371. #------------------------------------------------------------------------------
  372. # html: file(1) magic for HTML (HyperText Markup Language) docs
  373. #
  374. # from Daniel Quinlan <quinlan@yggdrasil.com>
  375. #
  376. 0 string \<HEAD text/html
  377. 0 string \<head text/html
  378. 0 string \<TITLE text/html
  379. 0 string \<title text/html
  380. 0 string \<html text/html
  381. 0 string \<HTML text/html
  382. 0 string \<!-- text/html
  383. 0 string \<h1 text/html
  384. 0 string \<H1 text/html
  385. 0 string/c \<!doctype\ html text/html
  386. #------------------------------------------------------------------------------
  387. # images: file(1) magic for image formats (see also "c-lang" for XPM bitmaps)
  388. #
  389. # originally from jef@helios.ee.lbl.gov (Jef Poskanzer),
  390. # additions by janl@ifi.uio.no as well as others. Jan also suggested
  391. # merging several one- and two-line files into here.
  392. #
  393. # XXX - byte order for GIF and TIFF fields?
  394. # [GRR: TIFF allows both byte orders; GIF is probably little-endian]
  395. #
  396. # [GRR: what the hell is this doing in here?]
  397. #0 string xbtoa btoa'd file
  398. # PBMPLUS
  399. # PBM file
  400. 0 string P1 image/x-portable-bitmap
  401. # PGM file
  402. 0 string P2 image/x-portable-greymap
  403. # PPM file
  404. 0 string P3 image/x-portable-pixmap
  405. # PBM "rawbits" file
  406. 0 string P4 image/x-portable-bitmap
  407. # PGM "rawbits" file
  408. 0 string P5 image/x-portable-greymap
  409. # PPM "rawbits" file
  410. 0 string P6 image/x-portable-pixmap
  411. # NIFF (Navy Interchange File Format, a modification of TIFF)
  412. # [GRR: this *must* go before TIFF]
  413. 0 string IIN1 image/x-niff
  414. # TIFF and friends
  415. # TIFF file, big-endian
  416. 0 string MM image/tiff
  417. # TIFF file, little-endian
  418. 0 string II image/tiff
  419. # possible GIF replacements; none yet released!
  420. # (Greg Roelofs, newt@uchicago.edu)
  421. #
  422. # GRR 950115: this was mine ("Zip GIF"):
  423. # ZIF image (GIF+deflate alpha)
  424. 0 string GIF94z image/x-unknown
  425. #
  426. # GRR 950115: this is Jeremy Wohl's Free Graphics Format (better):
  427. # FGF image (GIF+deflate beta)
  428. 0 string FGF95a image/x-unknown
  429. #
  430. # GRR 950115: this is Thomas Boutell's Portable Bitmap Format proposal
  431. # (best; not yet implemented):
  432. # PBF image (deflate compression)
  433. 0 string PBF image/x-unknown
  434. # GIF
  435. 0 string GIF image/gif
  436. # JPEG images
  437. 0 beshort 0xffd8 image/jpeg
  438. # PC bitmaps (OS/2, Windoze BMP files) (Greg Roelofs, newt@uchicago.edu)
  439. 0 string BM image/bmp
  440. #>14 byte 12 (OS/2 1.x format)
  441. #>14 byte 64 (OS/2 2.x format)
  442. #>14 byte 40 (Windows 3.x format)
  443. #0 string IC icon
  444. #0 string PI pointer
  445. #0 string CI color icon
  446. #0 string CP color pointer
  447. #0 string BA bitmap array
  448. # CDROM Filesystems
  449. 32769 string CD001 application/x-iso9660-image
  450. # Newer StuffIt archives (grant@netbsd.org)
  451. 0 string StuffIt application/x-stuffit
  452. #>162 string >0 : %s
  453. # BinHex is the Macintosh ASCII-encoded file format (see also "apple")
  454. # Daniel Quinlan, quinlan@yggdrasil.com
  455. 11 string must\ be\ converted\ with\ BinHex\ 4 application/mac-binhex40
  456. ##>41 string x \b, version %.3s
  457. #------------------------------------------------------------------------------
  458. # lisp: file(1) magic for lisp programs
  459. #
  460. # various lisp types, from Daniel Quinlan (quinlan@yggdrasil.com)
  461. 0 string ;; text/plain
  462. # Emacs 18 - this is always correct, but not very magical.
  463. 0 string \012( application/x-elc
  464. # Emacs 19
  465. 0 string ;ELC\023\000\000\000 application/x-elc
  466. #------------------------------------------------------------------------------
  467. # mail.news: file(1) magic for mail and news
  468. #
  469. # There are tests to ascmagic.c to cope with mail and news.
  470. 0 string Relay-Version: message/rfc822
  471. 0 string #!\ rnews message/rfc822
  472. 0 string N#!\ rnews message/rfc822
  473. 0 string Forward\ to message/rfc822
  474. 0 string Pipe\ to message/rfc822
  475. 0 string Return-Path: message/rfc822
  476. 0 string Received: message/rfc822
  477. 0 string Path: message/news
  478. 0 string Xref: message/news
  479. 0 string From: message/rfc822
  480. 0 string Article message/news
  481. #------------------------------------------------------------------------------
  482. # msword: file(1) magic for MS Word files
  483. #
  484. # Contributor claims:
  485. # Reversed-engineered MS Word magic numbers
  486. #
  487. 0 string \376\067\0\043 application/msword
  488. # disable this one because it applies also to other
  489. # Office/OLE documents for which msword is not correct. See PR#2608.
  490. # from magic file of the apache
  491. #0 string \320\317\021\340\241\261 application/msword
  492. 512 string \354\245\301 application/msword
  493. 0 string \333\245-\0\0\0 application/msword
  494. #------------------------------------------------------------------------------
  495. # printer: file(1) magic for printer-formatted files
  496. #
  497. # PostScript
  498. 0 string %! application/postscript
  499. 0 string \004%! application/postscript
  500. # Acrobat
  501. # (due to clamen@cs.cmu.edu)
  502. 0 string %PDF- application/pdf
  503. #------------------------------------------------------------------------------
  504. # sc: file(1) magic for "sc" spreadsheet
  505. #
  506. 38 string Spreadsheet application/x-sc
  507. #------------------------------------------------------------------------------
  508. # tex: file(1) magic for TeX files
  509. #
  510. # XXX - needs byte-endian stuff (big-endian and little-endian DVI?)
  511. #
  512. # From <conklin@talisman.kaleida.com>
  513. # Although we may know the offset of certain text fields in TeX DVI
  514. # and font files, we can't use them reliably because they are not
  515. # zero terminated. [but we do anyway, christos]
  516. 0 string \367\002 application/x-dvi
  517. #0 string \367\203 TeX generic font data
  518. #0 string \367\131 TeX packed font data
  519. #0 string \367\312 TeX virtual font data
  520. #0 string This\ is\ TeX, TeX transcript text
  521. #0 string This\ is\ METAFONT, METAFONT transcript text
  522. # There is no way to detect TeX Font Metric (*.tfm) files without
  523. # breaking them apart and reading the data. The following patterns
  524. # match most *.tfm files generated by METAFONT or afm2tfm.
  525. 2 string \000\021 application/x-tex-tfm
  526. 2 string \000\022 application/x-tex-tfm
  527. #>34 string >\0 (%s)
  528. # Texinfo and GNU Info, from Daniel Quinlan (quinlan@yggdrasil.com)
  529. 0 string \\input\ texinfo text/x-texinfo
  530. 0 string This\ is\ Info\ file text/x-info
  531. # correct TeX magic for Linux (and maybe more)
  532. # from Peter Tobias (tobias@server.et-inf.fho-emden.de)
  533. #
  534. 0 leshort 0x02f7 application/x-dvi
  535. # RTF - Rich Text Format
  536. 0 string {\\rtf text/rtf
  537. # TeX documents, from Daniel Quinlan (quinlan@yggdrasil.com)
  538. 0 search/400 \\input text/x-tex
  539. 0 search/400 \\section text/x-tex
  540. 0 search/400 \\setlength text/x-tex
  541. 0 search/400 \\documentstyle text/x-tex
  542. 0 search/400 \\chapter text/x-tex
  543. 0 search/400 \\documentclass text/x-tex
  544. #------------------------------------------------------------------------------
  545. # animation: file(1) magic for animation/movie formats
  546. #
  547. # animation formats, originally from vax@ccwf.cc.utexas.edu (VaX#n8)
  548. # MPEG file
  549. # MPEG sequences
  550. 0 belong 0x000001BA
  551. >4 byte &0x40 video/mp2p
  552. >4 byte ^0x40 video/mpeg
  553. 0 belong 0x000001BB video/mpeg
  554. 0 belong 0x000001B0 video/mp4v-es
  555. 0 belong 0x000001B5 video/mp4v-es
  556. 0 belong 0x000001B3 video/mpv
  557. 0 belong&0xFF5FFF1F 0x47400010 video/mp2t
  558. 0 belong 0x00000001
  559. >4 byte&0x1F 0x07 video/h264
  560. # FLI animation format
  561. 0 leshort 0xAF11 video/x-fli
  562. # FLC animation format
  563. 0 leshort 0xAF12 video/x-flc
  564. #
  565. # SGI and Apple formats
  566. # Added ISO mimes
  567. 0 string MOVI video/x-sgi-movie
  568. 4 string moov video/quicktime
  569. 4 string mdat video/quicktime
  570. 4 string wide video/quicktime
  571. 4 string skip video/quicktime
  572. 4 string free video/quicktime
  573. 4 string idsc image/x-quicktime
  574. 4 string idat image/x-quicktime
  575. 4 string pckg application/x-quicktime-player
  576. 4 string/B jP image/jp2
  577. 4 string ftyp
  578. >8 string isom video/mp4
  579. >8 string mp41 video/mp4
  580. >8 string mp42 video/mp4
  581. >8 string/B jp2 image/jp2
  582. >8 string 3gp video/3gpp
  583. >8 string avc1 video/3gpp
  584. >8 string mmp4 video/mp4
  585. >8 string/B M4A audio/mp4
  586. >8 string/B qt video/quicktime
  587. # The contributor claims:
  588. # I couldn't find a real magic number for these, however, this
  589. # -appears- to work. Note that it might catch other files, too,
  590. # so BE CAREFUL!
  591. #
  592. # Note that title and author appear in the two 20-byte chunks
  593. # at decimal offsets 2 and 22, respectively, but they are XOR'ed with
  594. # 255 (hex FF)! DL format SUCKS BIG ROCKS.
  595. #
  596. # DL file version 1 , medium format (160x100, 4 images/screen)
  597. 0 byte 1 video/x-unknown
  598. 0 byte 2 video/x-unknown
  599. #
  600. # Databases
  601. #
  602. # GDBM magic numbers
  603. # Will be maintained as part of the GDBM distribution in the future.
  604. # <downsj@teeny.org>
  605. 0 belong 0x13579ace application/x-gdbm
  606. 0 lelong 0x13579ace application/x-gdbm
  607. 0 string GDBM application/x-gdbm
  608. #
  609. 0 belong 0x061561 application/x-dbm
  610. #
  611. # Executables
  612. #
  613. 0 string \177ELF
  614. >16 leshort 0 application/octet-stream
  615. >16 leshort 1 application/x-object
  616. >16 leshort 2 application/x-executable
  617. >16 leshort 3 application/x-sharedlib
  618. >16 leshort 4 application/x-coredump
  619. >16 beshort 0 application/octet-stream
  620. >16 beshort 1 application/x-object
  621. >16 beshort 2 application/x-executable
  622. >16 beshort 3 application/x-sharedlib
  623. >16 beshort 4 application/x-coredump
  624. #
  625. # DOS
  626. 0 string MZ application/x-dosexec
  627. #
  628. # KDE
  629. 0 string [KDE\ Desktop\ Entry] application/x-kdelnk
  630. 0 string #\ KDE\ Config\ File application/x-kdelnk
  631. # xmcd database file for kscd
  632. 0 string #\ xmcd text/x-xmcd
  633. #------------------------------------------------------------------------------
  634. # pkgadd: file(1) magic for SysV R4 PKG Datastreams
  635. #
  636. 0 string #\ PaCkAgE\ DaTaStReAm application/x-svr4-package
  637. #PNG Image Format
  638. 0 string \x89PNG image/png
  639. # MNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
  640. 0 string \x8aMNG video/x-mng
  641. 0 string \x8aJNG video/x-jng
  642. #------------------------------------------------------------------------------
  643. # Hierarchical Data Format, used to facilitate scientific data exchange
  644. # specifications at http://hdf.ncsa.uiuc.edu/
  645. 0 belong 0x0e031301 Hierarchical Data Format (version 4) data
  646. 0 string \211HDF\r\n\032 Hierarchical Data Format (version 5) data
  647. # Adobe Photoshop
  648. 0 string 8BPS image/vnd.adobe.photoshop
  649. # Felix von Leitner <felix-file@fefe.de>
  650. 0 string d8:announce application/x-bittorrent
  651. # lotus 1-2-3 document
  652. 0 belong 0x00001a00 application/x-123
  653. 0 belong 0x00000200 application/x-123
  654. # MS Access database
  655. 4 string Standard\ Jet\ DB application/x-msaccess
  656. ## magic for XBase files
  657. #0 byte 0x02
  658. #>8 leshort >0
  659. #>>12 leshort 0 application/x-dbf
  660. #
  661. #0 byte 0x03
  662. #>8 leshort >0
  663. #>>12 leshort 0 application/x-dbf
  664. #
  665. #0 byte 0x04
  666. #>8 leshort >0
  667. #>>12 leshort 0 application/x-dbf
  668. #
  669. #0 byte 0x05
  670. #>8 leshort >0
  671. #>>12 leshort 0 application/x-dbf
  672. #
  673. #0 byte 0x30
  674. #>8 leshort >0
  675. #>>12 leshort 0 application/x-dbf
  676. #
  677. #0 byte 0x43
  678. #>8 leshort >0
  679. #>>12 leshort 0 application/x-dbf
  680. #
  681. #0 byte 0x7b
  682. #>8 leshort >0
  683. #>>12 leshort 0 application/x-dbf
  684. #
  685. #0 byte 0x83
  686. #>8 leshort >0
  687. #>>12 leshort 0 application/x-dbf
  688. #
  689. #0 byte 0x8b
  690. #>8 leshort >0
  691. #>>12 leshort 0 application/x-dbf
  692. #
  693. #0 byte 0x8e
  694. #>8 leshort >0
  695. #>>12 leshort 0 application/x-dbf
  696. #
  697. #0 byte 0xb3
  698. #>8 leshort >0
  699. #>>12 leshort 0 application/x-dbf
  700. #
  701. #0 byte 0xf5
  702. #>8 leshort >0
  703. #>>12 leshort 0 application/x-dbf
  704. #
  705. #0 leshort 0x0006 application/x-dbt
  706. # Debian has entries for the old PGP formats:
  707. # pgp: file(1) magic for Pretty Good Privacy
  708. # see http://lists.gnupg.org/pipermail/gnupg-devel/1999-September/016052.html
  709. 0 beshort 0x9900 application/x-pgp-keyring
  710. 0 beshort 0x9501 application/x-pgp-keyring
  711. 0 beshort 0x9500 application/x-pgp-keyring
  712. 0 beshort 0xa600 application/pgp-encrypted
  713. 0 string -----BEGIN\040PGP text/PGP armored data
  714. >15 string PUBLIC\040KEY\040BLOCK- public key block
  715. >15 string MESSAGE- message
  716. >15 string SIGNED\040MESSAGE- signed message
  717. >15 string PGP\040SIGNATURE- signature
  718. 0 beshort 0x8501 data
  719. #
  720. # GnuPG Magic:
  721. #
  722. 0 beshort 0x9901 application/x-gnupg-keyring
  723. 0 beshort 0x8501 text/OpenPGP data
  724. # flash: file(1) magic for Macromedia Flash file format
  725. #
  726. # See
  727. #
  728. # http://www.macromedia.com/software/flash/open/
  729. #
  730. 0 string FWS
  731. >3 byte x application/x-shockwave-flash
  732. # Flash Video
  733. 0 string FLV video/x-flv
  734. # The following paramaters are created for Namazu.
  735. # <http://www.namazu.org/>
  736. #
  737. # 1999/08/13
  738. #0 string \<!--\ MHonArc text/html; x-type=mhonarc
  739. 0 string BZh application/x-bzip2
  740. # 1999/09/09
  741. # VRML (suggested by Masao Takaku)
  742. 0 string #VRML\ V1.0\ ascii model/vrml
  743. 0 string #VRML\ V2.0\ utf8 model/vrml
  744. #------------------------------------------------------------------------------
  745. # ichitaro456: file(1) magic for Just System Word Processor Ichitaro
  746. #
  747. # Contributor kenzo-:
  748. # Reversed-engineered JS Ichitaro magic numbers
  749. #
  750. 0 string DOC
  751. >43 byte 0x14 application/x-ichitaro4
  752. >144 string JDASH application/x-ichitaro4
  753. 0 string DOC
  754. >43 byte 0x15 application/x-ichitaro5
  755. 0 string DOC
  756. >43 byte 0x16 application/x-ichitaro6
  757. #------------------------------------------------------------------------------
  758. # office97: file(1) magic for MicroSoft Office files
  759. #
  760. # Contributor kenzo-:
  761. # Reversed-engineered MS Office magic numbers
  762. #
  763. #0 string \320\317\021\340\241\261\032\341
  764. #>48 byte 0x1B application/excel
  765. 2080 string Microsoft\ Excel\ 5.0\ Worksheet application/vnd.ms-excel
  766. 2114 string Biff5 application/vnd.ms-excel
  767. 0 string \224\246\056 application/msword
  768. 0 belong 0x31be0000 application/msword
  769. 0 string PO^Q` application/msword
  770. 0 string \320\317\021\340\241\261\032\341
  771. >546 string bjbj application/msword
  772. >546 string jbjb application/msword
  773. 512 string R\0o\0o\0t\0\ \0E\0n\0t\0r\0y application/msword
  774. 2080 string Microsoft\ Word\ 6.0\ Document application/msword
  775. 2080 string Documento\ Microsoft\ Word\ 6 application/msword
  776. 2112 string MSWordDoc application/msword
  777. #0 string \320\317\021\340\241\261\032\341 application/powerpoint
  778. 0 string \320\317\021\340\241\261\032\341 application/msword
  779. 0 string #\ PaCkAgE\ DaTaStReAm application/x-svr4-package
  780. # WinNT/WinCE PE files (Warner Losh, imp@village.org)
  781. #
  782. 128 string PE\000\000 application/octet-stream
  783. 0 string PE\000\000 application/octet-stream
  784. # miscellaneous formats
  785. 0 string LZ application/octet-stream
  786. # DOS device drivers by Joerg Jenderek
  787. 0 belong 0xffffffff application/octet-stream
  788. # .EXE formats (Greg Roelofs, newt@uchicago.edu)
  789. #
  790. 0 string MZ
  791. >24 string @ application/octet-stream
  792. 0 string MZ
  793. >30 string Copyright\ 1989-1990\ PKWARE\ Inc. application/zip
  794. 0 string MZ
  795. >30 string PKLITE\ Copr. application/zip
  796. 0 string MZ
  797. >36 string LHa's\ SFX application/x-lha
  798. 0 string MZ application/octet-stream
  799. # LHA archiver
  800. 2 string -lh
  801. >6 string - application/x-lha
  802. # Zoo archiver
  803. 20 lelong 0xfdc4a7dc application/x-zoo
  804. # ARC archiver
  805. 0 lelong&0x8080ffff 0x0000081a application/x-arc
  806. 0 lelong&0x8080ffff 0x0000091a application/x-arc
  807. 0 lelong&0x8080ffff 0x0000021a application/x-arc
  808. 0 lelong&0x8080ffff 0x0000031a application/x-arc
  809. 0 lelong&0x8080ffff 0x0000041a application/x-arc
  810. 0 lelong&0x8080ffff 0x0000061a application/x-arc
  811. # Microsoft Outlook's Transport Neutral Encapsulation Format (TNEF)
  812. 0 lelong 0x223e9f78 application/vnd.ms-tnef
  813. # From: stephane.loeuillet@tiscali.f
  814. # http://www.djvuzone.org/
  815. 0 string AT&TFORM image/vnd.djvu
  816. # Danny Milosavljevic <danny.milo@gmx.net>
  817. # this are adrift (adventure game standard) game files, extension .taf
  818. # depending on version magic continues with 0x93453E6139FA (V 4.0)
  819. # 0x9445376139FA (V 3.90)
  820. # 0x9445366139FA (V 3.80)
  821. # this is from source (http://www.adrift.org.uk/) and I have some taf
  822. # files, and checked them.
  823. #0 belong 0x3C423FC9
  824. #>4 belong 0x6A87C2CF application/x-adrift
  825. #0 string \000\000\001\000 image/x-ico
  826. # Quark Xpress 3 Files:
  827. # (made the mimetype up)
  828. 0 string \0\0MMXPR3\0 application/x-quark-xpress-3
  829. # EET archive
  830. # From: Tilman Sauerbeck <tilman@code-monkey.de>
  831. 0 belong 0x1ee7ff00 application/x-eet
  832. # From: Denis Knauf, via gentoo.
  833. 0 string fLaC audio/x-flac
  834. 0 string CWS application/x-shockwave-flash
  835. # Hangul Document Files:
  836. # Reversed-engineered HWP magic numbers
  837. # From: Won-Kyu Park <wkpark@kldp.org>
  838. 512 string R\0o\0o\0t\0 application/x-hwp
  839. 0 string/c BEGIN:VCARD text/x-vcard
  840. 0 string WordPro\0 application/vnd.lotus-wordpro
  841. 0 string WordPro\r\373 application/vnd.lotus-wordpro
  842. 0 string CPC\262 image/x-cpi
  843. #
  844. 128 string DICM application/dicom
  845. # Symbian installation files
  846. 8 lelong 0x10000419 application/vnd.symbian.install
  847. 0 lelong 0x10201A7A x-epoc/x-sisx-app
  848. # FORTRAN source
  849. 0 string/c c\ text/x-fortran