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