From: Christos Zoulas Date: Mon, 4 Feb 2008 16:33:44 +0000 (+0000) Subject: magic merge from rrt@ X-Git-Tag: pre-rrt-big-changes-post-4-23~76 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ba18b81532450cfdb2877a4536159d983b45fd9a;p=file magic merge from rrt@ --- diff --git a/ChangeLog b/ChangeLog index ed457507..f9cc7bc4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-02-04 11:31 Christos Zoulas + + * !mine: annotations in magic files (Reuben Thomas) + 2007-01-29 15:35 Christos Zoulas * zero out utime/utimes structs (Gavin Atkinson) diff --git a/Makefile.am b/Makefile.am index 59dac9bc..b560c1d9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,5 @@ # don't enforce GNU packaging standards -AUTOMAKE_OPTIONS = foreign no-dependencies +AUTOMAKE_OPTIONS = foreign EXTRA_DIST = LEGAL.NOTICE MAINT PORTING diff --git a/magic/Magdir/adventure b/magic/Magdir/adventure index 405d3cc4..7b30c496 100644 --- a/magic/Magdir/adventure +++ b/magic/Magdir/adventure @@ -73,3 +73,13 @@ >10 belong 0x0A0D1A00 >>14 string >\0 %s saved game data +# Danny Milosavljevic +# this are adrift (adventure game standard) game files, extension .taf +# depending on version magic continues with 0x93453E6139FA (V 4.0) +# 0x9445376139FA (V 3.90) +# 0x9445366139FA (V 3.80) +# this is from source (http://www.adrift.org.uk/) and I have some taf +# files, and checked them. +#0 belong 0x3C423FC9 +#>4 belong 0x6A87C2CF Adrift game file +#!:mime application/x-adrift diff --git a/magic/Magdir/animation b/magic/Magdir/animation index 6392f850..b2e687cf 100644 --- a/magic/Magdir/animation +++ b/magic/Magdir/animation @@ -8,37 +8,56 @@ # SGI and Apple formats 0 string MOVI Silicon Graphics movie file +!:mime video/x-sgi-movie 4 string moov Apple QuickTime +!:mime video/quicktime >12 string mvhd \b movie (fast start) >12 string mdra \b URL >12 string cmov \b movie (fast start, compressed header) >12 string rmra \b multiple URLs 4 string mdat Apple QuickTime movie (unoptimized) +!:mime video/quicktime 4 string wide Apple QuickTime movie (unoptimized) +!:mime video/quicktime 4 string skip Apple QuickTime movie (modified) +!:mime video/quicktime 4 string free Apple QuickTime movie (modified) +!:mime video/quicktime 4 string idsc Apple QuickTime image (fast start) +!:mime image/x-quicktime 4 string idat Apple QuickTime image (unoptimized) +!:mime image/x-quicktime 4 string pckg Apple QuickTime compressed archive +!:mime application/x-quicktime-player 4 string/B jP JPEG 2000 image +!:mime image/jp2 4 string ftyp ISO Media >8 string isom \b, MPEG v4 system, version 1 +!:mime video/mp4 >8 string iso2 \b, MPEG v4 system, part 12 revision >8 string mp41 \b, MPEG v4 system, version 1 +!:mime video/mp4 >8 string mp42 \b, MPEG v4 system, version 2 +!:mime video/mp4 >8 string mp7t \b, MPEG v4 system, MPEG v7 XML >8 string mp7b \b, MPEG v4 system, MPEG v7 binary XML >8 string/B jp2 \b, JPEG 2000 +!:mime image/jp2 >8 string 3gp \b, MPEG v4 system, 3GPP +!:mime video/3gpp >>11 byte 4 \b v4 (H.263/AMR GSM 6.10) >>11 byte 5 \b v5 (H.263/AMR GSM 6.10) >>11 byte 6 \b v6 (ITU H.264/AMR GSM 6.10) >8 string mmp4 \b, MPEG v4 system, 3GPP Mobile +!:mime video/mp4 >8 string avc1 \b, MPEG v4 system, 3GPP JVT AVC +!:mime video/3gpp >8 string/B M4A \b, MPEG v4 system, iTunes AAC-LC +!:mime video/mp4 >8 string/B M4P \b, MPEG v4 system, iTunes AES encrypted >8 string/B M4B \b, MPEG v4 system, iTunes bookmarked >8 string/B qt \b, Apple QuickTime movie +!:mime video/quicktime # MPEG sequences # Scans for all common MPEG header start codes @@ -252,22 +271,39 @@ # modified to fully support MPEG ADTS # MP3, M1A -0 beshort&0xFFFE 0xFFFA MPEG ADTS, layer III, v1 +# modified by Joerg Jenderek +# GRR the original test are too common for many DOS files +# so don't accept as MP3 until we've tested the rate +0 beshort&0xFFFE # rates ->2 byte&0xF0 0x10 \b, 32 kBits ->2 byte&0xF0 0x20 \b, 40 kBits ->2 byte&0xF0 0x30 \b, 48 kBits ->2 byte&0xF0 0x40 \b, 56 kBits ->2 byte&0xF0 0x50 \b, 64 kBits ->2 byte&0xF0 0x60 \b, 80 kBits ->2 byte&0xF0 0x70 \b, 96 kBits ->2 byte&0xF0 0x80 \b, 112 kBits ->2 byte&0xF0 0x90 \b, 128 kBits ->2 byte&0xF0 0xA0 \b, 160 kBits ->2 byte&0xF0 0xB0 \b, 192 kBits ->2 byte&0xF0 0xC0 \b, 224 kBits ->2 byte&0xF0 0xD0 \b, 256 kBits ->2 byte&0xF0 0xE0 \b, 320 kBits +>2 byte&0xF0 0x10 MPEG ADTS, layer III, v1, 32 kBits +!:mime audio/mpeg +>2 byte&0xF0 0x20 MPEG ADTS, layer III, v1, 40 kBits +!:mime audio/mpeg +>2 byte&0xF0 0x30 MPEG ADTS, layer III, v1, 48 kBits +!:mime audio/mpeg +>2 byte&0xF0 0x40 MPEG ADTS, layer III, v1, 56 kBits +!:mime audio/mpeg +>2 byte&0xF0 0x50 MPEG ADTS, layer III, v1, 64 kBits +!:mime audio/mpeg +>2 byte&0xF0 0x60 MPEG ADTS, layer III, v1, 80 kBits +!:mime audio/mpeg +>2 byte&0xF0 0x70 MPEG ADTS, layer III, v1, 96 kBits +!:mime audio/mpeg +>2 byte&0xF0 0x80 MPEG ADTS, layer III, v1, 112 kBits +!:mime audio/mpeg +>2 byte&0xF0 0x90 MPEG ADTS, layer III, v1, 128 kBits +!:mime audio/mpeg +>2 byte&0xF0 0xA0 MPEG ADTS, layer III, v1, 160 kBits +!:mime audio/mpeg +>2 byte&0xF0 0xB0 MPEG ADTS, layer III, v1, 192 kBits +!:mime audio/mpeg +>2 byte&0xF0 0xC0 MPEG ADTS, layer III, v1, 224 kBits +!:mime audio/mpeg +>2 byte&0xF0 0xD0 MPEG ADTS, layer III, v1, 256 kBits +!:mime audio/mpeg +>2 byte&0xF0 0xE0 MPEG ADTS, layer III, v1, 320 kBits +!:mime audio/mpeg # timing >2 byte&0x0C 0x00 \b, 44.1 kHz >2 byte&0x0C 0x04 \b, 48 kHz @@ -497,6 +533,7 @@ # Stored AAC streams (instead of the MP4 format) 0 string ADIF MPEG ADIF, AAC +!:mime audio/x-hx-aac-adif >4 byte &0x80 >>13 byte &0x10 \b, VBR >>13 byte ^0x10 \b, CBR @@ -521,6 +558,7 @@ # Live or stored single AAC stream (used with MPEG-2 systems) 0 beshort&0xFFF6 0xFFF0 MPEG ADTS, AAC +!:mime audio/x-hx-aac-adts >1 byte &0x08 \b, v2 >1 byte ^0x08 \b, v4 # profile @@ -557,6 +595,7 @@ # Live MPEG-4 audio streams (instead of RTP FlexMux) 0 beshort&0xFFE0 0x56E0 MPEG-4 LOAS +!:mime audio/x-mp4a-latm #>1 beshort&0x1FFF x \b, %u byte packet >3 byte&0xE0 0x40 >>4 byte&0x3C 0x04 \b, single stream @@ -571,9 +610,11 @@ >>4 byte &0x20 \b, 4 or more streams >>4 byte &0x40 \b, 8 or more streams 0 beshort 0x4DE1 MPEG-4 LO-EP audio stream +!:mime audio/x-mp4a-latm # FLI animation format 4 leshort 0xAF11 FLI file +!:mime video/x-fli >6 leshort x - %d frames, >8 leshort x width=%d pixels, >10 leshort x height=%d pixels, @@ -581,6 +622,7 @@ >16 leshort x ticks/frame=%d # FLC animation format 4 leshort 0xAF12 FLC file +!:mime video/x-flc >6 leshort x - %d frames >8 leshort x width=%d pixels, >10 leshort x height=%d pixels, @@ -599,9 +641,11 @@ # 255 (hex FF)! The DL format is really bad. # #0 byte 1 DL version 1, medium format (160x100, 4 images/screen) +#!:mime video/x-unknown #>42 byte x - %d screens, #>43 byte x %d commands #0 byte 2 DL version 2 +#!:mime video/x-unknown #>1 byte 1 - large format (320x200,1 image/screen), #>1 byte 2 - medium format (160x100,4 images/screen), #>1 byte >2 - unknown format, @@ -641,6 +685,7 @@ # MNG Video Format, 0 string \x8aMNG MNG video data, +!:mime video/x-mng >4 belong !0x0d0a1a0a CORRUPTED, >4 belong 0x0d0a1a0a >>16 belong x %ld x @@ -648,6 +693,7 @@ # JNG Video Format, 0 string \x8bJNG JNG video data, +!:mime video/x-jng >4 belong !0x0d0a1a0a CORRUPTED, >4 belong 0x0d0a1a0a >>16 belong x %ld x @@ -658,7 +704,9 @@ # VRML (Virtual Reality Modelling Language) 0 string/b #VRML\ V1.0\ ascii VRML 1 file +!:mime model/vrml 0 string/b #VRML\ V2.0\ utf8 ISO/IEC 14772 VRML 97 file +!:mime model/vrml #--------------------------------------------------------------------------- # HVQM4: compressed movie format designed by Hudson for Nintendo GameCube @@ -689,3 +737,25 @@ >36 string I \binterlaced, >40 ledouble x \baspect:%.2f, >48 ledouble x \bfps:%.2f + +# MPEG file +# MPEG sequences +# FIXME: This section is from the old magic.mime file and needs integrating with the rest +0 belong 0x000001BA +>4 byte &0x40 +!:mime video/mp2p +>4 byte ^0x40 +!:mime video/mpeg +0 belong 0x000001BB +!:mime video/mpeg +0 belong 0x000001B0 +!:mime video/mp4v-es +0 belong 0x000001B5 +!:mime video/mp4v-es +0 belong 0x000001B3 +!:mime video/mpv +0 belong&0xFF5FFF1F 0x47400010 +!:mime video/mp2t +0 belong 0x00000001 +>4 byte&0x1F 0x07 +!:mime video/h264 diff --git a/magic/Magdir/archive b/magic/Magdir/archive index 55a591f6..a6eeaffa 100644 --- a/magic/Magdir/archive +++ b/magic/Magdir/archive @@ -8,7 +8,9 @@ # POSIX tar archives 257 string ustar\0 POSIX tar archive +!:mime application/x-tar # encoding: posix 257 string ustar\040\040\0 GNU tar archive +!:mime application/x-tar # encoding: gnu # cpio archives # @@ -22,7 +24,9 @@ # are defined as "short"s; I think all the new formats are # character-header formats and thus are strings, not numbers. 0 short 070707 cpio archive +!:mime application/x-cpio 0 short 0143561 byte-swapped cpio archive +!:mime application/x-cpio # encoding: swapped 0 string 070707 ASCII cpio archive (pre-SVR4 or odc) 0 string 070701 ASCII cpio archive (SVR4 with no CRC) 0 string 070702 ASCII cpio archive (SVR4 with CRC) @@ -30,8 +34,10 @@ # Debian package (needs to go before regular portable archives) # 0 string =!\ndebian +!:mime application/x-debian-package >8 string debian-split part of multipart Debian package >8 string debian-binary Debian binary package +>8 string !debian >68 string >\0 (format %s) # These next two lines do not work, because a bzip2 Debian archive # still uses gzip for the control.tar (first in the archive). Only @@ -49,6 +55,7 @@ 0 short 0177545 old PDP-11 archive 0 long 0100554 apl workspace 0 string = archive +!:mime application/x-archive # MIPS archive (needs to go before regular portable archives) # @@ -79,6 +86,7 @@ # "ar" archives? # 0 string =! current ar archive +!:mime application/x-archive >8 string __.SYMDEF random library >0 belong =65538 - pre SR9.5 >0 belong =65539 - post SR9.5 @@ -121,15 +129,24 @@ # we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%), # 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%). 0x01 collides with terminfo. 0 lelong&0x8080ffff 0x0000081a ARC archive data, dynamic LZW +!:mime application/x-arc 0 lelong&0x8080ffff 0x0000091a ARC archive data, squashed +!:mime application/x-arc 0 lelong&0x8080ffff 0x0000021a ARC archive data, uncompressed +!:mime application/x-arc 0 lelong&0x8080ffff 0x0000031a ARC archive data, packed +!:mime application/x-arc 0 lelong&0x8080ffff 0x0000041a ARC archive data, squeezed +!:mime application/x-arc 0 lelong&0x8080ffff 0x0000061a ARC archive data, crunched +!:mime application/x-arc # [JW] stuff taken from idarc, obviously ARC successors: 0 lelong&0x8080ffff 0x00000a1a PAK archive data +!:mime application/x-arc 0 lelong&0x8080ffff 0x0000141a ARC+ archive data +!:mime application/x-arc 0 lelong&0x8080ffff 0x0000481a HYP archive data +!:mime application/x-arc # Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk) # I can't create either SPARK or ArcFS archives so I have not tested this stuff @@ -435,6 +452,7 @@ # ARJ archiver (jason@jarthur.Claremont.EDU) 0 leshort 0xea60 ARJ archive data +!:mime application/x-arj >5 byte x \b, v%d, >8 byte &0x04 multi-volume, >8 byte &0x10 slash-switched, @@ -487,19 +505,32 @@ # LHARC/LHA archiver (Greg Roelofs, newt@uchicago.edu) 2 string -lh0- LHarc 1.x/ARX archive data [lh0] +!:mime application/x-lharc 2 string -lh1- LHarc 1.x/ARX archive data [lh1] +!:mime application/x-lharc 2 string -lz4- LHarc 1.x archive data [lz4] +!:mime application/x-lharc 2 string -lz5- LHarc 1.x archive data [lz5] +!:mime application/x-lharc # [never seen any but the last; -lh4- reported in comp.compression:] 2 string -lzs- LHa/LZS archive data [lzs] +!:mime application/x-lha 2 string -lh\40- LHa 2.x? archive data [lh ] +!:mime application/x-lha 2 string -lhd- LHa 2.x? archive data [lhd] +!:mime application/x-lha 2 string -lh2- LHa 2.x? archive data [lh2] +!:mime application/x-lha 2 string -lh3- LHa 2.x? archive data [lh3] +!:mime application/x-lha 2 string -lh4- LHa (2.x) archive data [lh4] +!:mime application/x-lha 2 string -lh5- LHa (2.x) archive data [lh5] +!:mime application/x-lha 2 string -lh6- LHa (2.x) archive data [lh6] +!:mime application/x-lha 2 string -lh7- LHa (2.x)/LHark archive data [lh7] +!:mime application/x-lha >20 byte x - header level %d # taken from idarc [JW] 2 string -lZ PUT archive data @@ -508,6 +539,7 @@ # RAR archiver (Greg Roelofs, newt@uchicago.edu) 0 string Rar! RAR archive data, +!:mime application/x-rar >44 byte x v%0x, >10 byte >0 flags: >>10 byte &0x01 Archive volume, @@ -531,6 +563,7 @@ # ZIP archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) 0 string PK\003\004 +!:mime application/zip >4 byte 0x00 Zip archive data >4 byte 0x09 Zip archive data, at least v0.9 to extract >4 byte 0x0a Zip archive data, at least v1.0 to extract @@ -596,6 +629,7 @@ # Zoo archiver 20 lelong 0xfdc4a7dc Zoo archive data +!:mime application/x-zoo >4 byte >48 \b, v%c. >>6 byte >47 \b%c >>>7 byte >47 \b%c @@ -607,6 +641,7 @@ # Shell archives 10 string #\ This\ is\ a\ shell\ archive shell archive text +!:mime application/octet-stream # # LBR. NB: May conflict with the questionable @@ -652,6 +687,7 @@ # Felix von Leitner 0 string d8:announce BitTorrent file +!:mime application/x-bittorrent # Atari MSA archive - Teemu Hukkanen 0 beshort 0x0e0f Atari MSA archive data @@ -709,6 +745,7 @@ # EET archive # From: Tilman Sauerbeck 0 belong 0x1ee7ff00 EET archive +!:mime application/x-eet # rzip archives 0 string RZIP rzip compressed data @@ -729,9 +766,11 @@ # http://www.thouky.co.uk/software/psifs/sis.html # http://developer.symbian.com/main/downloads/papers/SymbianOSv91/softwareinstallsis.pdf 8 lelong 0x10000419 Symbian installation file +!:mime application/vnd.symbian.install >4 lelong 0x1000006D (EPOC release 3/4/5) >4 lelong 0x10003A12 (EPOC release 6) 0 lelong 0x10201A7A Symbian installation file (Symbian OS 9.x) +!:mime x-epoc/x-sisx-app # Pack200 Java archives, http://jcp.org/en/jsr/detail?id=200 0 belong 0xcafed00d Pack200 Java archive diff --git a/magic/Magdir/audio b/magic/Magdir/audio index 18b47a62..c235e8ae 100644 --- a/magic/Magdir/audio +++ b/magic/Magdir/audio @@ -9,12 +9,19 @@ # Sun/NeXT audio data 0 string .snd Sun/NeXT audio data: >12 belong 1 8-bit ISDN mu-law, +!:mime audio/basic >12 belong 2 8-bit linear PCM [REF-PCM], +!:mime audio/basic >12 belong 3 16-bit linear PCM, +!:mime audio/basic >12 belong 4 24-bit linear PCM, +!:mime audio/basic >12 belong 5 32-bit linear PCM, +!:mime audio/basic >12 belong 6 32-bit IEEE floating point, +!:mime audio/basic >12 belong 7 64-bit IEEE floating point, +!:mime audio/basic >12 belong 8 Fragmented sample data, >12 belong 10 DSP program, >12 belong 11 8-bit fixed point, @@ -26,6 +33,7 @@ >12 belong 20 16-bit linear with emphasis and compression, >12 belong 21 Music kit DSP commands, >12 belong 23 8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice enc.), +!:mime audio/x-adpcm >12 belong 24 compressed (8-bit CCITT G.722 ADPCM) >12 belong 25 compressed (3-bit CCITT G.723.3 ADPCM), >12 belong 26 compressed (5-bit CCITT G.723.5 ADPCM), @@ -39,12 +47,19 @@ # that uses little-endian encoding and has a different magic number 0 lelong 0x0064732E DEC audio data: >12 lelong 1 8-bit ISDN mu-law, +!:mime audio/x-dec-basic >12 lelong 2 8-bit linear PCM [REF-PCM], +!:mime audio/x-dec-basic >12 lelong 3 16-bit linear PCM, +!:mime audio/x-dec-basic >12 lelong 4 24-bit linear PCM, +!:mime audio/x-dec-basic >12 lelong 5 32-bit linear PCM, +!:mime audio/x-dec-basic >12 lelong 6 32-bit IEEE floating point, +!:mime audio/x-dec-basic >12 lelong 7 64-bit IEEE floating point, +!:mime audio/x-dec-basic >12 belong 8 Fragmented sample data, >12 belong 10 DSP program, >12 belong 11 8-bit fixed point, @@ -56,6 +71,7 @@ >12 belong 20 16-bit linear with emphasis and compression, >12 belong 21 Music kit DSP commands, >12 lelong 23 8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice enc.), +!:mime audio/x-dec-basic >12 belong 24 compressed (8-bit CCITT G.722 ADPCM) >12 belong 25 compressed (3-bit CCITT G.723.3 ADPCM), >12 belong 26 compressed (5-bit CCITT G.723.5 ADPCM), @@ -67,6 +83,7 @@ # Creative Labs AUDIO stuff 0 string MThd Standard MIDI data +!:mime audio/x-midi >8 beshort x (format %d) >10 beshort x using %d track >10 beshort >1 \bs @@ -74,8 +91,11 @@ >12 beshort&0x8000 >0 SMPTE 0 string CTMF Creative Music (CMF) data +!:mime audio/x-unknown 0 string SBI SoundBlaster instrument data +!:mime audio/x-unknown 0 string Creative\ Voice\ File Creative Labs voice data +!:mime audio/x-unknown # is this next line right? it came this way... >19 byte 0x1A >23 byte >0 - version %d @@ -96,7 +116,13 @@ # Real Audio (Magic .ra\0375) 0 belong 0x2e7261fd RealAudio sound file +!:mime audio/x-pn-realaudio 0 string .RMF RealMedia file +!:mime application/vnd.rn-realmedia +#video/x-pn-realvideo +#video/vnd.rn-realvideo +#application/vnd.rn-realmedia +# sigh, there are many mimes for that but the above are the most common. # MTM/669/FAR/S3M/ULT/XM format checking [Aaron Eppert, aeppert@dialin.ind.net] # Oct 31, 1995 @@ -119,44 +145,84 @@ 0 string GF1PATCH110\0ID#000002\0 GUS patch 0 string GF1PATCH100\0ID#000002\0 Old GUS patch +# mime types according to http://www.geocities.com/nevilo/mod.htm: +# audio/it .it +# audio/x-zipped-it .itz +# audio/xm fasttracker modules +# audio/x-s3m screamtracker modules +# audio/s3m screamtracker modules +# audio/x-zipped-mod mdz +# audio/mod mod +# audio/x-mod All modules (mod, s3m, 669, mtm, med, xm, it, mdz, stm, itz, xmz, s3z) + # # Taken from loader code from mikmod version 2.14 # by Steve McIntyre (stevem@chiark.greenend.org.uk) # added title printing on 2003-06-24 0 string MAS_UTrack_V00 >14 string >/0 ultratracker V1.%.1s module sound data +!:mime audio/x-mod +#audio/x-tracker-module 0 string UN05 MikMod UNI format module sound data 0 string Extended\ Module: Fasttracker II module sound data +!:mime audio/x-mod +#audio/x-tracker-module >17 string >\0 Title: "%s" 21 string/c =!SCREAM! Screamtracker 2 module sound data +!:mime audio/x-mod +#audio/x-screamtracker-module 21 string BMOD2STM Screamtracker 2 module sound data +!:mime audio/x-mod +#audio/x-screamtracker-module 1080 string M.K. 4-channel Protracker module sound data +!:mime audio/x-mod +#audio/x-protracker-module >0 string >\0 Title: "%s" 1080 string M!K! 4-channel Protracker module sound data +!:mime audio/x-mod +#audio/x-protracker-module >0 string >\0 Title: "%s" 1080 string FLT4 4-channel Startracker module sound data +!:mime audio/x-mod +#audio/x-startracker-module >0 string >\0 Title: "%s" 1080 string FLT8 8-channel Startracker module sound data +!:mime audio/x-mod +#audio/x-startracker-module >0 string >\0 Title: "%s" 1080 string 4CHN 4-channel Fasttracker module sound data +!:mime audio/x-mod +#audio/x-fasttracker-module >0 string >\0 Title: "%s" 1080 string 6CHN 6-channel Fasttracker module sound data +!:mime audio/x-mod +#audio/x-fasttracker-module >0 string >\0 Title: "%s" 1080 string 8CHN 8-channel Fasttracker module sound data +!:mime audio/x-mod +#audio/x-fasttracker-module >0 string >\0 Title: "%s" 1080 string CD81 8-channel Octalyser module sound data +!:mime audio/x-mod +#audio/x-octalysertracker-module >0 string >\0 Title: "%s" -1080 string OKTA 8-channel Oktalyzer module sound data +1080 string OKTA 8-channel Octalyzer module sound data +!:mime audio/x-mod +#audio/x-octalysertracker-module >0 string >\0 Title: "%s" # Not good enough. #1082 string CH #>1080 string >/0 %.2s-channel Fasttracker "oktalyzer" module sound data 1080 string 16CN 16-channel Taketracker module sound data +!:mime audio/x-mod +#audio/x-taketracker-module >0 string >\0 Title: "%s" 1080 string 32CN 32-channel Taketracker module sound data +!:mime audio/x-mod +#audio/x-taketracker-module >0 string >\0 Title: "%s" # TOC sound files -Trevor Johnson @@ -222,6 +288,8 @@ 0 string _SGI_SoundTrack SGI SoundTrack project file # ID3 version 2 tags 0 string ID3 Audio file with ID3 version 2. +# ??? Normally such a file is an MP3 file, but this will give false positives +!:mime audio/mpeg >3 ubyte <0xff \b%d #>4 ubyte <0xff \b%d tag >2584 string fLaC \b, FLAC encoding @@ -270,6 +338,7 @@ # Impulse tracker module (audio/x-it) 0 string IMPM Impulse Tracker module sound data - +!:mime audio/x-mod >4 string >\0 "%s" >40 leshort !0 compatible w/ITv%x >42 leshort !0 created w/ITv%x @@ -380,6 +449,7 @@ # Free lossless audio codec # From: Przemyslaw Augustyniak 0 string fLaC FLAC audio bitstream data +!:mime audio/x-flac >4 byte&0x7f >0 \b, unknown version >4 byte&0x7f 0 \b # some common bits/sample values diff --git a/magic/Magdir/c-lang b/magic/Magdir/c-lang index fd3f9aa2..343ef7f1 100644 --- a/magic/Magdir/c-lang +++ b/magic/Magdir/c-lang @@ -6,6 +6,10 @@ # XPM icons (Greg Roelofs, newt@uchicago.edu) # if you uncomment "/*" for C/REXX below, also uncomment this entry #0 string /*\ XPM\ */ X pixmap image data +#!:mime image/x-xpmi + +# 3DS (3d Studio files) Conflicts with diff output 0x3d '=' +#16 beshort 0x3d3d image/x-3ds # this first will upset you if you're a PL/1 shop... # in which case rm it; ascmagic will catch real C programs diff --git a/magic/Magdir/cafebabe b/magic/Magdir/cafebabe index 233411c8..40cf5850 100644 --- a/magic/Magdir/cafebabe +++ b/magic/Magdir/cafebabe @@ -12,10 +12,14 @@ # (and use as a hack). Let's not use 18, because the Mach-O people # might add another one or two as time goes by... # -0 belong 0xcafebabe ->4 belong >30 compiled Java class data, ->>6 beshort x version %d. ->>4 beshort x \b%d ->4 belong 1 Mach-O fat file with 1 architecture ->4 belong >1 ->>4 belong <20 Mach-O fat file with %ld architectures +0 beshort 0xcafe +>2 beshort 0xbabe +!:mime application/x-java-applet +>>2 belong >30 compiled Java class data, +>>>6 beshort x version %d. +>>>4 beshort x \b%d +>>4 belong 1 Mach-O fat file with 1 architecture +>>4 belong >1 +>>>4 belong <20 Mach-O fat file with %ld architectures +>2 beshort 0xd00d JAR compressed with pack200 +!:mime application/x-java-pack200 diff --git a/magic/Magdir/commands b/magic/Magdir/commands index 599c190a..d1a33eba 100644 --- a/magic/Magdir/commands +++ b/magic/Magdir/commands @@ -2,31 +2,50 @@ #------------------------------------------------------------------------------ # commands: file(1) magic for various shells and interpreters # -0 string : shell archive or script for antique kernel text +#0 string : shell archive or script for antique kernel text 0 string/b #!\ /bin/sh Bourne shell script text executable +!:mime application/x-shellscript 0 string/b #!\ /bin/csh C shell script text executable +!:mime application/x-shellscript # korn shell magic, sent by George Wu, gwu@clyde.att.com 0 string/b #!\ /bin/ksh Korn shell script text executable +!:mime application/x-shellscript 0 string/b #!\ /bin/tcsh Tenex C shell script text executable +!:mime application/x-shellscript 0 string/b #!\ /usr/local/tcsh Tenex C shell script text executable +!:mime application/x-shellscript 0 string/b #!\ /usr/local/bin/tcsh Tenex C shell script text executable +!:mime application/x-shellscript # # zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson) 0 string/b #!\ /bin/zsh Paul Falstad's zsh script text executable +!:mime application/x-shellscript 0 string/b #!\ /usr/bin/zsh Paul Falstad's zsh script text executable +!:mime application/x-shellscript 0 string/b #!\ /usr/local/bin/zsh Paul Falstad's zsh script text executable +!:mime application/x-shellscript 0 string/b #!\ /usr/local/bin/ash Neil Brown's ash script text executable +!:mime application/x-shellscript 0 string/b #!\ /usr/local/bin/ae Neil Brown's ae script text executable +!:mime application/x-shellscript 0 string/b #!\ /bin/nawk new awk script text executable +!:mime application/x-nawk 0 string/b #!\ /usr/bin/nawk new awk script text executable +!:mime application/x-nawk 0 string/b #!\ /usr/local/bin/nawk new awk script text executable +!:mime application/x-nawk 0 string/b #!\ /bin/gawk GNU awk script text executable +!:mime application/x-gawk 0 string/b #!\ /usr/bin/gawk GNU awk script text executable +!:mime application/x-gawk 0 string/b #!\ /usr/local/bin/gawk GNU awk script text executable +!:mime application/x-gawk # 0 string/b #!\ /bin/awk awk script text executable +!:mime application/x-awk 0 string/b #!\ /usr/bin/awk awk script text executable +!:mime application/x-awk # update to distinguish from *.vcf files # this is broken because postscript has /EBEGIN{ for example. #0 regex BEGIN[[:space:]]*[{] awk script text @@ -36,7 +55,9 @@ # bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de) 0 string/b #!\ /bin/bash Bourne-Again shell script text executable +!:mime application/x-shellscript 0 string/b #!\ /usr/local/bin/bash Bourne-Again shell script text executable +!:mime application/x-shellscript # using env 0 string #!/usr/bin/env a diff --git a/magic/Magdir/compress b/magic/Magdir/compress index e9be46b7..1d8cbd11 100644 --- a/magic/Magdir/compress +++ b/magic/Magdir/compress @@ -10,6 +10,7 @@ # standard unix compress 0 string \037\235 compress'd data +!:mime application/x-compress >2 byte&0x80 >0 block compressed >2 byte&0x1f x %d bits @@ -19,6 +20,7 @@ # * Produce shorter output - notably, only report compression methods # other than 8 ("deflate", the only method defined in RFC 1952). 0 string \037\213 gzip compressed data +!:mime application/x-gzip >2 byte <8 \b, reserved method >2 byte >8 \b, unknown method >3 byte &0x01 \b, ASCII @@ -49,23 +51,29 @@ # packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis 0 string \037\036 packed data +!:mime application/octet-stream >2 belong >1 \b, %d characters originally >2 belong =1 \b, %d character originally # # This magic number is byte-order-independent. 0 short 0x1f1f old packed data +!:mime application/octet-stream # XXX - why *two* entries for "compacted data", one of which is # byte-order independent, and one of which is byte-order dependent? # 0 short 0x1fff compacted data +!:mime application/octet-stream # This string is valid for SunOS (BE) and a matching "short" is listed # in the Ultrix (LE) magic file. 0 string \377\037 compacted data +!:mime application/octet-stream 0 short 0145405 huf output +!:mime application/octet-stream # bzip2 0 string BZh bzip2 compressed data +!:mime application/x-bzip2 >3 byte >47 \b, block size = %c00k # squeeze and crunch diff --git a/magic/Magdir/database b/magic/Magdir/database index 8f2fc0a7..d1f374d5 100644 --- a/magic/Magdir/database +++ b/magic/Magdir/database @@ -9,8 +9,11 @@ # Will be maintained as part of the GDBM distribution in the future. # 0 belong 0x13579ace GNU dbm 1.x or ndbm database, big endian +!:mime application/x-gdbm 0 lelong 0x13579ace GNU dbm 1.x or ndbm database, little endian +!:mime application/x-gdbm 0 string GDBM GNU dbm 2.x database +!:mime application/x-gdbm # # Berkeley DB # @@ -21,6 +24,7 @@ # Hash and Btree 2.X and later databases store the metadata in host byte order. 0 long 0x00061561 Berkeley DB +!:mime application/x-dbm >8 belong 4321 >>4 belong >2 1.86 >>4 belong <3 1.85 @@ -107,74 +111,87 @@ #>>0x04 byte 6 non-incrementing secondary index .XGn file #>>0x04 byte 7 secondary index .YGn file #>>>0x04 byte 8 incrementing secondary index .XGn file + ## XBase database files #0 byte 0x02 #>8 leshort >0 #>>12 leshort 0 FoxBase +#!:mime application/x-dbf #>>>0x04 lelong 0 (no records) #>>>0x04 lelong >0 (%ld records) # #0 byte 0x03 +#!:mime application/x-dbf #>8 leshort >0 #>>12 leshort 0 FoxBase+, FoxPro, dBaseIII+, dBaseIV, no memo #>>>0x04 lelong 0 (no records) #>>>0x04 lelong >0 (%ld records) # #0 byte 0x04 +#!:mime application/x-dbf #>8 leshort >0 #>>12 leshort 0 dBASE IV no memo file #>>>0x04 lelong 0 (no records) #>>>0x04 lelong >0 (%ld records) # #0 byte 0x05 +#!:mime application/x-dbf #>8 leshort >0 #>>12 leshort 0 dBASE V no memo file #>>>0x04 lelong 0 (no records) #>>>0x04 lelong >0 (%ld records) # #0 byte 0x30 +#!:mime application/x-dbf #>8 leshort >0 #>>12 leshort 0 Visual FoxPro #>>>0x04 lelong 0 (no records) #>>>0x04 lelong >0 (%ld records) # #0 byte 0x43 +#!:mime application/x-dbf #>8 leshort >0 #>>12 leshort 0 FlagShip with memo var size #>>>0x04 lelong 0 (no records) #>>>0x04 lelong >0 (%ld records) # #0 byte 0x7b +#!:mime application/x-dbf #>8 leshort >0 #>>12 leshort 0 dBASEIV with memo #>>>0x04 lelong 0 (no records) #>>>0x04 lelong >0 (%ld records) # #0 byte 0x83 +#!:mime application/x-dbf #>8 leshort >0 #>>12 leshort 0 FoxBase+, dBaseIII+ with memo #>>>0x04 lelong 0 (no records) #>>>0x04 lelong >0 (%ld records) # #0 byte 0x8b +#!:mime application/x-dbf #>8 leshort >0 #>>12 leshort 0 dBaseIV with memo #>>>0x04 lelong 0 (no records) #>>>0x04 lelong >0 (%ld records) # #0 byte 0x8e +#!:mime application/x-dbf #>8 leshort >0 #>>12 leshort 0 dBaseIV with SQL Table #>>>0x04 lelong 0 (no records) #>>>0x04 lelong >0 (%ld records) # #0 byte 0xb3 +#!:mime application/x-dbf #>8 leshort >0 #>>12 leshort 0 FlagShip with .dbt memo #>>>0x04 lelong 0 (no records) #>>>0x04 lelong >0 (%ld records) # #0 byte 0xf5 +#!:mime application/x-dbf #>8 leshort >0 #>>12 leshort 0 FoxPro with memo #>>>0x04 lelong 0 (no records) @@ -183,7 +200,8 @@ #0 leshort 0x0006 DBase 3 index file # MS Access database -4 string Standard\ Jet\ DB Microsoft Access Database +4 string Standard\ Jet\ DB Microsoft Access Database +!:mime application/x-msaccess # TDB database from Samba et al - Martin Pool 0 string TDB\ file TDB database diff --git a/magic/Magdir/elf b/magic/Magdir/elf index 464b436a..dadfda77 100644 --- a/magic/Magdir/elf +++ b/magic/Magdir/elf @@ -15,12 +15,17 @@ >5 byte 0 invalid byte order >5 byte 1 LSB >>16 leshort 0 no file type, +!:mime application/octet-stream >>16 leshort 1 relocatable, +!:mime application/x-object >>16 leshort 2 executable, +!:mime application/x-executable >>16 leshort 3 shared object, +!:mime application/x-sharedlib # Core handling from Peter Tobias # corrections by Christian 'Dr. Disk' Hechelmann >>16 leshort 4 core file +!:mime application/x-coredump # Core file detection is not reliable. #>>>(0x38+0xcc) string >\0 of '%s' #>>>(0x38+0x10) lelong >0 (signal %d), @@ -108,10 +113,15 @@ >>36 lelong 1 MathCoPro/FPU/MAU Required >5 byte 2 MSB >>16 beshort 0 no file type, +!:mime application/octet-stream >>16 beshort 1 relocatable, +!:mime application/x-object >>16 beshort 2 executable, +!:mime application/x-executable >>16 beshort 3 shared object, +!:mime application/x-sharedlib >>16 beshort 4 core file, +!:mime application/x-coredump #>>>(0x38+0xcc) string >\0 of '%s' #>>>(0x38+0x10) belong >0 (signal %d), >>16 beshort &0xff00 processor-specific, diff --git a/magic/Magdir/filesystems b/magic/Magdir/filesystems index 20b257bc..d78b52d5 100644 --- a/magic/Magdir/filesystems +++ b/magic/Magdir/filesystems @@ -1115,19 +1115,21 @@ # CDROM Filesystems # Modified for UDF by gerardo.cacciari@gmail.com -32769 string CD001 ->38913 string !NSR0 ISO 9660 CD-ROM filesystem data ->38913 string NSR0 UDF filesystem data ->>38917 string 1 (version 1.0) ->>38917 string 2 (version 1.5) ->>38917 string 3 (version 2.0) ->>38917 byte >0x33 (unknown version, ID 0x%X) ->>38917 byte <0x31 (unknown version, ID 0x%X) +32769 string CD001 +!:mime application/x-iso9660-image +>38913 string !NSR0 ISO 9660 CD-ROM filesystem data +>38913 string NSR0 UDF filesystem data +>>38917 string 1 (version 1.0) +>>38917 string 2 (version 1.5) +>>38917 string 3 (version 2.0) +>>38917 byte >0x33 (unknown version, ID 0x%X) +>>38917 byte <0x31 (unknown version, ID 0x%X) # "application id" which appears to be used as a volume label ->32808 string >\0 '%s' ->34816 string \000CD001\001EL\ TORITO\ SPECIFICATION (bootable) -37633 string CD001 ISO 9660 CD-ROM filesystem data (raw 2352 byte sectors) -32776 string CDROM High Sierra CD-ROM filesystem data +>32808 string >\0 '%s' +>34816 string \000CD001\001EL\ TORITO\ SPECIFICATION (bootable) +37633 string CD001 ISO 9660 CD-ROM filesystem data (raw 2352 byte sectors) +!:mime application/x-iso9660-image +32776 string CDROM High Sierra CD-ROM filesystem data # cramfs filesystem - russell@coker.com.au 0 lelong 0x28cd3d45 Linux Compressed ROM File System data, little endian diff --git a/magic/Magdir/flash b/magic/Magdir/flash index f14b460c..0b985f22 100644 --- a/magic/Magdir/flash +++ b/magic/Magdir/flash @@ -8,10 +8,13 @@ # 0 string FWS Macromedia Flash data, >3 byte x version %d +!:mime application/x-shockwave-flash 0 string CWS Macromedia Flash data (compressed), +!:mime application/x-shockwave-flash >3 byte x version %d # From: Cal Peake 0 string FLV Macromedia Flash Video +!:mime video/x-flv # # From Dave Wilson diff --git a/magic/Magdir/fortran b/magic/Magdir/fortran index ce004adb..3e490333 100644 --- a/magic/Magdir/fortran +++ b/magic/Magdir/fortran @@ -1,2 +1,3 @@ # FORTRAN source 0 string/c c\ FORTRAN program +!:mime text/x-fortran diff --git a/magic/Magdir/frame b/magic/Magdir/frame index 1b397df0..643ba99e 100644 --- a/magic/Magdir/frame +++ b/magic/Magdir/frame @@ -5,7 +5,11 @@ # This stuff came on a FrameMaker demo tape, most of which is # copyright, but this file is "published" as witness the following: # +# Note that this is the Framemaker Maker Interchange Format, not the +# Normal format which would be application/vnd.framemaker. +# 0 string \11 string 5.5 (5.5 >11 string 5.0 (5.0 >11 string 4.0 (4.0 @@ -14,25 +18,32 @@ >11 string 1.0 (1.0 >14 byte x %c) 0 string \9 string 4.0 (4.0) >9 string 3.0 (3.0) >9 string 2.0 (2.0) >9 string 1.0 (1.x) 0 string \17 string 3.0 (3.0) >17 string 2.0 (2.0) >17 string 1.0 (1.x) 0 string \17 string 1.01 (%s) 0 string \10 string 3.0 (3.0 >10 string 2.0 (2.0 >10 string 1.0 (1.0 >13 byte x %c) # XXX - this book entry should be verified, if you find one, uncomment this #0 string \6 string 3.0 (3.0) #>6 string 2.0 (2.0) #>6 string 1.0 (1.0) 0 string \4 byte x version %d +# Note: magic.mime had 0x8501 for the next line instead of 0x8502 0 beshort 0x8502 GPG encrypted data +!:mime text/PGP # encoding: data + # This magic is not particularly good, as the keyrings don't have true # magic. Nevertheless, it covers many keyrings. 0 beshort 0x9901 GPG key public ring +!:mime application/x-gnupg-keyring # Gnumeric spreadsheet # This entry is only semi-helpful, as Gnumeric compresses its files, so diff --git a/magic/Magdir/iff b/magic/Magdir/iff index 3c88f903..4d2a832c 100644 --- a/magic/Magdir/iff +++ b/magic/Magdir/iff @@ -13,8 +13,11 @@ #>4 belong x \b, FORM is %d bytes long # audio formats >8 string AIFF \b, AIFF audio +!:mime audio/x-aiff >8 string AIFC \b, AIFF-C compressed audio +!:mime audio/x-aiff >8 string 8SVX \b, 8SVX 8-bit sampled sound voice +!:mime audio/x-aiff >8 string 16SV \b, 16SV 16-bit sampled sound voice >8 string SAMP \b, SAMP sampled audio >8 string MAUD \b, MAUD MacroSystem audio diff --git a/magic/Magdir/images b/magic/Magdir/images index fd9e14f9..57ef7a96 100644 --- a/magic/Magdir/images +++ b/magic/Magdir/images @@ -1,6 +1,7 @@ #------------------------------------------------------------------------------ -# images: file(1) magic for image formats (see also "iff") +# images: file(1) magic for image formats (see also "iff", and "c-lang" for +# XPM bitmaps) # # originally from jef@helios.ee.lbl.gov (Jef Poskanzer), # additions by janl@ifi.uio.no as well as others. Jan also suggested @@ -31,12 +32,19 @@ # PBMPLUS images # The next byte following the magic is always whitespace. 0 string P1 Netpbm PBM image text +!:mime image/x-portable-bitmap 0 string P2 Netpbm PGM image text +!:mime image/x-portable-greymap 0 string P3 Netpbm PPM image text +!:mime image/x-portable-pixmap 0 string P4 Netpbm PBM "rawbits" image data +!:mime image/x-portable-bitmap 0 string P5 Netpbm PGM "rawbits" image data +!:mime image/x-portable-greymap 0 string P6 Netpbm PPM "rawbits" image data +!:mime image/x-portable-pixmap 0 string P7 Netpbm PAM image file +!:mime image/x-portable-pixmap # From: bryanh@giraffe-data.com (Bryan Henderson) 0 string \117\072 Solitaire Image Recorder format @@ -50,13 +58,17 @@ >21 byte 51 version 3 # NIFF (Navy Interchange File Format, a modification of TIFF) images +# [GRR: this *must* go before TIFF] 0 string IIN1 NIFF image data +!:mime image/x-niff # Tag Image File Format, from Daniel Quinlan (quinlan@yggdrasil.com) # The second word of TIFF files is the TIFF version number, 42, which has # never changed. The TIFF specification recommends testing for it. 0 string MM\x00\x2a TIFF image data, big-endian +!:mime image/tiff 0 string II\x2a\x00 TIFF image data, little-endian +!:mime image/tiff # PNG [Portable Network Graphics, or "PNG's Not GIF"] images # (Greg Roelofs, newt@uchicago.edu) @@ -65,6 +77,7 @@ # 137 P N G \r \n ^Z \n [4-byte length] H E A D [HEAD data] [HEAD crc] ... # 0 string \x89PNG PNG image data, +!:mime image/png >4 belong !0x0d0a1a0a CORRUPTED, >4 belong 0x0d0a1a0a >>16 belong x %ld x @@ -80,8 +93,27 @@ >>28 byte 1 interlaced 1 string PNG PNG image data, CORRUPTED +# possible GIF replacements; none yet released! +# (Greg Roelofs, newt@uchicago.edu) +# +# GRR 950115: this was mine ("Zip GIF"): +0 string GIF94z ZIF image (GIF+deflate alpha) +!:mime image/x-unknown +# +# GRR 950115: this is Jeremy Wohl's Free Graphics Format (better): +# +0 string FGF95a FGF image (GIF+deflate beta) +!:mime image/x-unknown +# +# GRR 950115: this is Thomas Boutell's Portable Bitmap Format proposal +# (best; not yet implemented): +# +0 string PBF PBF image (deflate compression) +!:mime image/x-unknown + # GIF 0 string GIF8 GIF image data +!:mime image/gif >4 string 7a \b, version 8%s, >4 string 9a \b, version 8%s, >6 leshort >0 %hd x @@ -152,8 +184,9 @@ 0 string Sfff structured fax file -# PC bitmaps (OS/2, Windoze BMP files) (Greg Roelofs, newt@uchicago.edu) +# PC bitmaps (OS/2, Windows BMP files) (Greg Roelofs, newt@uchicago.edu) 0 string BM PC bitmap data +!:mime image/bmp >14 leshort 12 \b, OS/2 1.x format >>18 leshort x \b, %d x >>20 leshort x %d @@ -269,6 +302,7 @@ # DICOM medical imaging data 128 string DICM DICOM medical imaging data +!:mime application/dicom # XWD - X Window Dump file. # As described in /usr/X11R6/include/X11/XWDFile.h @@ -367,6 +401,7 @@ # Adobe Photoshop 0 string 8BPS Adobe Photoshop Image +!:mime image/vnd.adobe.photoshop # XV thumbnail indicator (ThMO) 0 string P7\ 332 XV thumbnail image data @@ -508,6 +543,7 @@ # From: stephane.loeuillet@tiscali.f # http://www.djvuzone.org/ 0 string AT&TFORM DjVu Image file +!:mime image/vnd.djvu # From: Jason Bacon 0 beshort 0x3020 character Computer Graphics Metafile @@ -527,5 +563,9 @@ # From: Tobias Burnus # Xara (for a while: Corel Xara) is a graphic package, see -# http://www.xara.com/ for Windows and as GPL application for +# http://www.xara.com/ for Windows and as GPL application for Linux 0 string XARA\243\243 Xara graphics file + +# http://www.cartesianinc.com/Tech/ +0 string CPC\262 Cartesian Perceptual Compression image +!:mime image/x-cpi diff --git a/magic/Magdir/java b/magic/Magdir/java index 971b72ce..cca5542c 100644 --- a/magic/Magdir/java +++ b/magic/Magdir/java @@ -9,8 +9,9 @@ >2 beshort >0x0004 \b, version %d 0 belong 0xfeedfeed Java KeyStore - +!:mime application/x-java-keystore 0 belong 0xcececece Java JCE KeyStore +!:mime application/x-java-jce-keystore # Dalvik .dex format. http://retrodev.com/android/dexformat.html # From "Mike Fleming" diff --git a/magic/Magdir/jpeg b/magic/Magdir/jpeg index af646d6f..b3e6646f 100644 --- a/magic/Magdir/jpeg +++ b/magic/Magdir/jpeg @@ -9,6 +9,7 @@ # both of which turn into "JPEG image data" here. # 0 beshort 0xffd8 JPEG image data +!:mime image/jpeg >6 string JFIF \b, JFIF standard # The following added by Erik Rossen 1999-09-06 # in a vain attempt to add image size reporting for JFIF. Note that these diff --git a/magic/Magdir/lisp b/magic/Magdir/lisp index e9c8ba8e..d468c471 100644 --- a/magic/Magdir/lisp +++ b/magic/Magdir/lisp @@ -6,6 +6,8 @@ # updated by Joerg Jenderek 0 string ;; +!:mime text/plain +# FIXME: Is the above MIME type pointless? # windows INF files often begin with semicolon and use CRLF as line end # lisp files are mainly created on unix system with LF as line end >2 search/2048 !\r Lisp/Scheme program text @@ -21,12 +23,14 @@ # Emacs 18 - this is always correct, but not very magical. 0 string \012( Emacs v18 byte-compiled Lisp data +!:mime application/x-elc # Emacs 19+ - ver. recognition added by Ian Springer # Also applies to XEmacs 19+ .elc files; could tell them apart if we had regexp # support or similar - Chris Chittleborough -0 string ;ELC ->4 byte >19 +0 string ;ELC +>4 byte >18 >4 byte <32 Emacs/XEmacs v%d byte-compiled Lisp data +!:mime application/x-elc # Files produced by CLISP Common Lisp From: Bruno Haible 0 string (SYSTEM::VERSION\040' CLISP byte-compiled Lisp program text diff --git a/magic/Magdir/macintosh b/magic/Magdir/macintosh index 4acd5c88..6a903f8c 100644 --- a/magic/Magdir/macintosh +++ b/magic/Magdir/macintosh @@ -5,6 +5,7 @@ # BinHex is the Macintosh ASCII-encoded file format (see also "apple") # Daniel Quinlan, quinlan@yggdrasil.com 11 string must\ be\ converted\ with\ BinHex BinHex binary text +!:mime application/mac-binhex40 >41 string x \b, version %.3s # Stuffit archives are the de facto standard of compression for Macintosh @@ -18,6 +19,7 @@ # Newer StuffIt archives (grant@netbsd.org) 0 string StuffIt StuffIt Archive +!:mime application/x-stuffit #>162 string >0 : %s # Macintosh Applications and Installation binaries (franklsm@tuns.ca) diff --git a/magic/Magdir/mail.news b/magic/Magdir/mail.news index f08261ca..f4025996 100644 --- a/magic/Magdir/mail.news +++ b/magic/Magdir/mail.news @@ -6,17 +6,28 @@ #0 string From mail text # There are tests to ascmagic.c to cope with mail and news. 0 string Relay-Version: old news text +!:mime message/rfc822 0 string #!\ rnews batched news text +!:mime message/rfc822 0 string N#!\ rnews mailed, batched news text +!:mime message/rfc822 0 string Forward\ to mail forwarding text +!:mime message/rfc822 0 string Pipe\ to mail piping text +!:mime message/rfc822 0 string Return-Path: smtp mail text +!:mime message/rfc822 0 string Path: news text +!:mime message/news 0 string Xref: news text +!:mime message/news 0 string From: news or mail text +!:mime message/rfc822 0 string Article saved news text +!:mime message/news 0 string BABYL Emacs RMAIL text 0 string Received: RFC 822 mail text +!:mime message/rfc822 0 string MIME-Version: MIME entity text #0 string Content- MIME entity text @@ -39,3 +50,5 @@ # XXX: Weak magic #256 leshort 0xAFAE4453 Squish message area data file #>4 leshort >0 (%d messages) + +#0 string \