From 5fc399ce18520540c659182ced84bc10487663dd Mon Sep 17 00:00:00 2001 From: Peter Avalos Date: Tue, 12 Dec 2006 18:44:17 +0000 Subject: [PATCH] Update to file-4.19. --- contrib/file-4/ChangeLog | 42 +++++++ contrib/file-4/doc/file.man | 6 +- contrib/file-4/doc/libmagic.man | 4 +- contrib/file-4/magic/Magdir/archive | 12 ++ contrib/file-4/magic/Magdir/audio | 4 - contrib/file-4/magic/Magdir/cad | 15 +++ contrib/file-4/magic/Magdir/commands | 2 + contrib/file-4/magic/Magdir/editors | 3 + contrib/file-4/magic/Magdir/elf | 4 +- contrib/file-4/magic/Magdir/filesystems | 10 +- contrib/file-4/magic/Magdir/linux | 7 ++ contrib/file-4/magic/Magdir/msdos | 10 +- contrib/file-4/magic/Magdir/python | 1 + contrib/file-4/magic/Magdir/riff | 7 ++ contrib/file-4/magic/Magdir/sysex | 127 ++++++++++++++++++++- contrib/file-4/magic/Magdir/unicode | 15 +++ contrib/file-4/magic/Magdir/vmware | 7 -- contrib/file-4/magic/Magdir/wordprocessors | 15 ++- contrib/file-4/magic/Magdir/xwindows | 2 +- contrib/file-4/magic/magic.mime | 74 +++++++----- contrib/file-4/src/apprentice.c | 119 +++++++++++++------ contrib/file-4/src/file.c | 25 ++-- contrib/file-4/src/file.h | 7 +- contrib/file-4/src/funcs.c | 10 +- contrib/file-4/src/patchlevel.h | 7 +- contrib/file-4/src/print.c | 10 +- contrib/file-4/src/readelf.c | 7 +- contrib/file-4/src/softmagic.c | 99 +++++++++------- 28 files changed, 491 insertions(+), 160 deletions(-) create mode 100644 contrib/file-4/magic/Magdir/unicode diff --git a/contrib/file-4/ChangeLog b/contrib/file-4/ChangeLog index 0117dcb417..8c58f749a2 100644 --- a/contrib/file-4/ChangeLog +++ b/contrib/file-4/ChangeLog @@ -1,3 +1,45 @@ +2006-12-11 16:49 Christos Zoulas + + * fix byteswapping issue + + * report the number of bytes we tried to + allocate when allocation fails + + * add a few missed cases in the strength routine + +2006-12-08 16:32 Christos Zoulas + + * store and print the line number of the magic + entry for debugging. + + * if the magic entry did not print anything, + don't treat it as a match + + * change the magic strength algorithm to take + into account the relationship op. + + * fix a bug in search where we could accidentally + return a match. + + * propagate the error return from match to + file_softmagic. + +2006-11-25 13:35 Christos Zoulas + + * Don't store the current offset in the magic + struct, because it needs to be restored and + it was not done properly all the time. Bug + found by: Arkadiusz Miskiewicz + + * Fix problem in the '\0' separator; and don't + print it as an additional separator; print + it as the only separator. + +2006-11-17 10:51 Christos Zoulas + + * Added a -0 option to print a '\0' separator + Etienne Buira + 2006-10-31 15:14 Christos Zoulas * Check offset before copying (Mike Frysinger) diff --git a/contrib/file-4/doc/file.man b/contrib/file-4/doc/file.man index ce8caccf93..3016d07a60 100644 --- a/contrib/file-4/doc/file.man +++ b/contrib/file-4/doc/file.man @@ -1,5 +1,5 @@ .TH FILE __CSECTION__ "Copyright but distributable" -.\" $Id: file.man,v 1.58 2006/05/03 19:20:25 christos Exp $ +.\" $Id: file.man,v 1.59 2006/11/17 16:11:10 christos Exp $ .SH NAME file \- determine file type @@ -271,6 +271,10 @@ Print the version of the program and exit. .TP 8 .B "\-z, \-\-uncompress" Try to look inside compressed files. +.B "\-0, \-\-print0" +Output a null character ('\0') after the end of the filename. Nice to +.BR cut (1) +the output. This does not affect the separator which is still printed. .TP 8 .B "\-\-help" Print a help message and exit. diff --git a/contrib/file-4/doc/libmagic.man b/contrib/file-4/doc/libmagic.man index 22d15a09b0..3ef560c0f9 100644 --- a/contrib/file-4/doc/libmagic.man +++ b/contrib/file-4/doc/libmagic.man @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 22, 2003 +.Dd November 15, 2006 .Dt MAGIC 3 .Os .Sh NAME @@ -120,7 +120,7 @@ no error. The .Fn magic_errno function returns the last operating system error number -.Pq .Xr errno 3 +.Pq .Xr errno 2 that was encountered by a system call. .Pp The diff --git a/contrib/file-4/magic/Magdir/archive b/contrib/file-4/magic/Magdir/archive index 87c2f95cc9..e110fd4811 100644 --- a/contrib/file-4/magic/Magdir/archive +++ b/contrib/file-4/magic/Magdir/archive @@ -509,6 +509,12 @@ # RAR archiver (Greg Roelofs, newt@uchicago.edu) 0 string Rar! RAR archive data, >44 byte x v%0x, +>10 byte >0 flags: +>>10 byte &0x01 Archive volume, +>>10 byte &0x02 Commented, +>>10 byte &0x04 Locked, +>>10 byte &0x08 Solid, +>>10 byte &0x20 Authenticated, >35 byte 0 os: MS-DOS >35 byte 1 os: OS/2 >35 byte 2 os: Win32 @@ -703,6 +709,12 @@ # From: Tilman Sauerbeck 0 belong 0x1ee7ff00 EET archive +# rzip archives +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + # From: "Robert Dale" 0 belong 123 dar archive, >4 belong x label "%.8x diff --git a/contrib/file-4/magic/Magdir/audio b/contrib/file-4/magic/Magdir/audio index 829c946065..fd9d7715d7 100644 --- a/contrib/file-4/magic/Magdir/audio +++ b/contrib/file-4/magic/Magdir/audio @@ -475,10 +475,6 @@ # From: Emanuel Haupt 0 string ZXAYEMUL Spectrum 128 tune -# From: Alex Beregszaszi -0 string MP+ Musepack ->3 byte&0x0f x SV%d - 0 string \0BONK BONK, #>5 byte x version %d >14 byte x %d channel(s), diff --git a/contrib/file-4/magic/Magdir/cad b/contrib/file-4/magic/Magdir/cad index 03263401c7..757dab6be0 100644 --- a/contrib/file-4/magic/Magdir/cad +++ b/contrib/file-4/magic/Magdir/cad @@ -35,6 +35,7 @@ >>30 string \120\104 DGNFile >>30 string \172\104 DGNFile >>30 string \172\105 DGNFile +>>30 string \172\106 DGNFile >>30 string \234\106 DGNFile >>30 string \273\105 DGNFile >>30 string \306\106 DGNFile @@ -52,3 +53,17 @@ 0 string AC1012 AutoCad (release 12) 0 string AC1013 AutoCad (release 13) 0 string AC1014 AutoCad (release 14) + +# CAD: file(1) magic for computer aided design files +# Phillip Griffith +# AutoCAD magic taken from the Open Design Alliance's OpenDWG specifications. +# +0 belong 0x08051700 Bentley/Intergraph MicroStation DGN cell library +0 belong 0x0809fe02 Bentley/Intergraph MicroStation DGN vector CAD +0 belong 0xc809fe02 Bentley/Intergraph MicroStation DGN vector CAD +0 beshort 0x0809 Bentley/Intergraph MicroStation +>0x02 byte 0xfe +>>0x04 beshort 0x1800 CIT raster CAD +0 string AC1012 AutoDesk AutoCAD R13 +0 string AC1014 AutoDesk AutoCAD R14 +0 string AC1015 AutoDesk AutoCAD R2000 diff --git a/contrib/file-4/magic/Magdir/commands b/contrib/file-4/magic/Magdir/commands index 24649844b1..2bdffbebf2 100644 --- a/contrib/file-4/magic/Magdir/commands +++ b/contrib/file-4/magic/Magdir/commands @@ -52,3 +52,5 @@ 0 string/b #!\ /usr/bin/php PHP script text executable 0 string Zend\x00 PHP script Zend Optimizer data + +0 string \$! DCL command file diff --git a/contrib/file-4/magic/Magdir/editors b/contrib/file-4/magic/Magdir/editors index 7edbe8bc6b..02826fa071 100644 --- a/contrib/file-4/magic/Magdir/editors +++ b/contrib/file-4/magic/Magdir/editors @@ -11,3 +11,6 @@ # Vi IMproved Encrypted file # by David Necas 0 string VimCrypt~ Vim encrypted file data +# Vi IMproved Swap file +# by Sven Wegener +0 string b0VIM\ Vim swap file, version %s diff --git a/contrib/file-4/magic/Magdir/elf b/contrib/file-4/magic/Magdir/elf index b2eb247362..6c9976f970 100644 --- a/contrib/file-4/magic/Magdir/elf +++ b/contrib/file-4/magic/Magdir/elf @@ -96,9 +96,10 @@ >>18 leshort 51 Stanford MIPS-X, >>18 leshort 52 Motorola Coldfire, >>18 leshort 53 Motorola M68HC12, ->>18 leshort 62 AMD x86-64, +>>18 leshort 62 x86-64, >>18 leshort 75 Digital VAX, >>18 leshort 88 Renesas M32R, +>>18 leshort 94 Tensilica Xtensa, >>18 leshort 97 NatSemi 32k, >>18 leshort 0x9026 Alpha (unofficial), >>20 lelong 0 invalid version @@ -191,6 +192,7 @@ >>18 beshort 73 Cray NV1, >>18 beshort 75 Digital VAX, >>18 beshort 88 Renesas M32R, +>>18 beshort 94 Tensilica Xtensa, >>18 beshort 97 NatSemi 32k, >>18 beshort 0x9026 Alpha (unofficial), >>18 beshort 0xa390 IBM S/390 (obsolete), diff --git a/contrib/file-4/magic/Magdir/filesystems b/contrib/file-4/magic/Magdir/filesystems index 5fa3df65c5..dd4910a99d 100644 --- a/contrib/file-4/magic/Magdir/filesystems +++ b/contrib/file-4/magic/Magdir/filesystems @@ -923,15 +923,15 @@ 0 string VoIP\ Startup\ and Aculab VoIP firmware >35 string x format %s -# PPCBoot image file +# u-boot/PPCBoot image file # From: Mark Brown -0 belong 0x27051956 PPCBoot image +0 belong 0x27051956 u-boot/PPCBoot image >4 string PPCBoot >>12 string x version %s # JFFS2 file system -0 leshort 0x1984 Linux old jffs2 filesystem data little endian -0 lelong 0xe0011985 Linux jffs2 filesystem data little endian +0 leshort 0x1984 Linux old jffs2 filesystem data little endian +0 leshort 0x1985 Linux jffs2 filesystem data little endian # Squashfs 0 string sqsh Squashfs filesystem, big endian, @@ -963,6 +963,8 @@ >>51 lelong x blocksize: %d bytes, >39 ledate x created: %s +0 string td\000 floppy image data (TeleDisk) + # AFS Dump Magic # From: Ty Sarna 0 string \x01\xb3\xa1\x13\x22 AFS Dump diff --git a/contrib/file-4/magic/Magdir/linux b/contrib/file-4/magic/Magdir/linux index 36cc24fc2f..fc0c42d40c 100644 --- a/contrib/file-4/magic/Magdir/linux +++ b/contrib/file-4/magic/Magdir/linux @@ -229,3 +229,10 @@ 0x618 string LVM2\ 001 LVM2 (Linux Logical Volume Manager) >(0x614.l+0x600) string >\0 , UUID: %s + +# SE Linux policy database +0 lelong 0xf97cff8c SE Linux policy +>16 lelong x v%d +>20 lelong 1 MLS +>24 lelong x %d symbols +>28 lelong x %d ocons diff --git a/contrib/file-4/magic/Magdir/msdos b/contrib/file-4/magic/Magdir/msdos index 0eeb33d2fa..4f226dd9bc 100644 --- a/contrib/file-4/magic/Magdir/msdos +++ b/contrib/file-4/magic/Magdir/msdos @@ -592,10 +592,16 @@ >>(64.l) lestring16 >0 Description: %15.15s # From: Alex Beregszaszi -0 string COWD VMWare3 disk image ->12 belong x %d bytes +0 string COWD VMWare3 +>4 byte 3 disk image +>>32 lelong x (%d/ +>>36 lelong x \b%d/ +>>40 lelong x \b%d) +>4 byte 2 undoable disk image +>>32 string >\0 (%s) 0 string VMDK VMware4 disk image +0 string KDMV VMware4 disk image 0 belong 0x514649fb QEMU Copy-On-Write disk image >4 belong x version %d, diff --git a/contrib/file-4/magic/Magdir/python b/contrib/file-4/magic/Magdir/python index 5aea137f28..9fac2b9ae7 100644 --- a/contrib/file-4/magic/Magdir/python +++ b/contrib/file-4/magic/Magdir/python @@ -13,6 +13,7 @@ 0 belong 0x2ded0d0a python 2.2 byte-compiled 0 belong 0x3bf20d0a python 2.3 byte-compiled 0 belong 0x6df20d0a python 2.4 byte-compiled +0 belong 0xb3f20d0a python 2.5 byte-compiled 0 string/b #!\ /usr/bin/python python script text executable diff --git a/contrib/file-4/magic/Magdir/riff b/contrib/file-4/magic/Magdir/riff index 1f1deeca3b..5aa9d10938 100644 --- a/contrib/file-4/magic/Magdir/riff +++ b/contrib/file-4/magic/Magdir/riff @@ -29,6 +29,8 @@ >8 string RMID \b, MIDI # RIFF Multimedia Movie File format >8 string RMMP \b, multimedia movie +# RIFF wrapper for MP3 +>8 string RMP3 \b, MPEG Layer 3 audio # Microsoft WAVE format (*.wav) >8 string WAVE \b, WAVE audio >>20 leshort 1 \b, Microsoft PCM @@ -120,6 +122,7 @@ >>>>>>>(104.l+132) string/c iv50 Indeo 5.0 >>>>>>>(104.l+132) string/c mp42 Microsoft MPEG-4 v2 >>>>>>>(104.l+132) string/c mp43 Microsoft MPEG-4 v3 +>>>>>>>(104.l+132) string/c fmp4 FFMpeg MPEG-4 >>>>>>>(104.l+132) string/c mjpg Motion JPEG >>>>>>>(104.l+132) string/c div3 DivX 3 >>>>>>>>112 string/c div3 Low-Motion @@ -127,6 +130,7 @@ >>>>>>>(104.l+132) string/c divx DivX 4 >>>>>>>(104.l+132) string/c dx50 DivX 5 >>>>>>>(104.l+132) string/c xvid XviD +>>>>>>>(104.l+132) string/c wmv3 Windows Media Video 9 >>>>>>>(104.l+132) string/c h264 X.264 >>>>>>>(104.l+132) lelong 0 ##>>>>>>>(104.l+132) string x (%.4s) @@ -138,6 +142,9 @@ >>>>>>>(92.l+172) string strf >>>>>>>>(92.l+180) leshort 0x0001 uncompressed PCM >>>>>>>>(92.l+180) leshort 0x0002 ADPCM +>>>>>>>>(92.l+180) leshort 0x0006 aLaw +>>>>>>>>(92.l+180) leshort 0x0007 uLaw +>>>>>>>>(92.l+180) leshort 0x0050 MPEG-1 Layer 1 or 2 >>>>>>>>(92.l+180) leshort 0x0055 MPEG-1 Layer 3 >>>>>>>>(92.l+180) leshort 0x2000 Dolby AC3 >>>>>>>>(92.l+180) leshort 0x0161 DivX diff --git a/contrib/file-4/magic/Magdir/sysex b/contrib/file-4/magic/Magdir/sysex index e2a4bd827d..03d6cdd6b7 100644 --- a/contrib/file-4/magic/Magdir/sysex +++ b/contrib/file-4/magic/Magdir/sysex @@ -11,7 +11,28 @@ >1 byte 0x04 Moog >1 byte 0x05 Passport >1 byte 0x06 Lexicon ->1 byte 0x07 Kurzweil +>1 byte 0x07 Kurzweil/Future Retro +>>3 byte 0x77 777 +>>4 byte 0x00 Bank +>>4 byte 0x01 Song +>>5 byte 0x0f 16 +>>5 byte 0x0e 15 +>>5 byte 0x0d 14 +>>5 byte 0x0c 13 +>>5 byte 0x0b 12 +>>5 byte 0x0a 11 +>>5 byte 0x09 10 +>>5 byte 0x08 9 +>>5 byte 0x07 8 +>>5 byte 0x06 7 +>>5 byte 0x05 6 +>>5 byte 0x04 5 +>>5 byte 0x03 4 +>>5 byte 0x02 3 +>>5 byte 0x01 2 +>>5 byte 0x00 1 +>>5 byte 0x10 (ALL) +>>2 byte x \b, Channel %d >1 byte 0x08 Fender >1 byte 0x09 Gulbransen >1 byte 0x0a AKG @@ -21,6 +42,12 @@ >1 byte 0x0e Garfield >1 byte 0x0f Ensoniq >1 byte 0x10 Oberheim +>>2 byte 0x06 Matrix 6 series +>>3 byte 0x0A Dump (All) +>>3 byte 0x01 Dump (Bank) +>>4 belong 0x0002040E Matrix 1000 +>>>11 byte <2 User bank %d +>>>11 byte >1 Preset bank %d >1 byte 0x11 Apple >1 byte 0x12 GreyMatter >1 byte 0x14 PalmTree @@ -52,11 +79,107 @@ >>3 byte 0x09 EK-44 >1 byte 0x30 Dynacord +>1 byte 0x31 Jomox >1 byte 0x33 Clavia >1 byte 0x39 Soundcraft - +# Some Waldorf info from http://Stromeko.Synth.net/Downloads#WaldorfDocs >1 byte 0x3e Waldorf +>>2 byte 0x00 microWave +>>2 byte 0x0E microwave2 / XT +>>2 byte 0x0F Q / Q+ +>>3 byte =0 (default id) +>>3 byte >0 ( +>>>3 byte <0x7F \bdevice %d) +>>>3 byte =0x7F \bbroadcast id) >>3 byte 0x7f Microwave I +>>>4 byte 0x00 SNDR (Sound Request) +>>>4 byte 0x10 SNDD (Sound Dump) +>>>4 byte 0x20 SNDP (Sound Parameter Change) +>>>4 byte 0x30 SNDQ (Sound Parameter Inquiry) +>>>4 byte 0x70 BOOT (Sound Reserved) +>>>4 byte 0x01 MULR (Multi Request) +>>>4 byte 0x11 MULD (Multi Dump) +>>>4 byte 0x21 MULP (Multi Parameter Change) +>>>4 byte 0x31 MULQ (Multi Parameter Inquiry) +>>>4 byte 0x71 OS (Multi Reserved) +>>>4 byte 0x02 DRMR (Drum Map Request) +>>>4 byte 0x12 DRMD (Drum Map Dump) +>>>4 byte 0x22 DRMP (Drum Map Parameter Change) +>>>4 byte 0x32 DRMQ (Drum Map Parameter Inquiry) +>>>4 byte 0x72 BIN (Drum Map Reserved) +>>>4 byte 0x03 PATR (Sequencer Pattern Request) +>>>4 byte 0x13 PATD (Sequencer Pattern Dump) +>>>4 byte 0x23 PATP (Sequencer Pattern Parameter Change) +>>>4 byte 0x33 PATQ (Sequencer Pattern Parameter Inquiry) +>>>4 byte 0x73 AFM (Sequencer Pattern Reserved) +>>>4 byte 0x04 GLBR (Global Parameter Request) +>>>4 byte 0x14 GLBD (Global Parameter Dump) +>>>4 byte 0x24 GLBP (Global Parameter Parameter Change) +>>>4 byte 0x34 GLBQ (Global Parameter Parameter Inquiry) +>>>4 byte 0x07 MODR (Mode Parameter Request) +>>>4 byte 0x17 MODD (Mode Parameter Dump) +>>>4 byte 0x27 MODP (Mode Parameter Parameter Change) +>>>4 byte 0x37 MODQ (Mode Parameter Parameter Inquiry) +>>2 byte 0x10 microQ +>>>4 byte 0x00 SNDR (Sound Request) +>>>4 byte 0x10 SNDD (Sound Dump) +>>>4 byte 0x20 SNDP (Sound Parameter Change) +>>>4 byte 0x30 SNDQ (Sound Parameter Inquiry) +>>>4 byte 0x70 (Sound Reserved) +>>>4 byte 0x01 MULR (Multi Request) +>>>4 byte 0x11 MULD (Multi Dump) +>>>4 byte 0x21 MULP (Multi Parameter Change) +>>>4 byte 0x31 MULQ (Multi Parameter Inquiry) +>>>4 byte 0x71 OS (Multi Reserved) +>>>4 byte 0x02 DRMR (Drum Map Request) +>>>4 byte 0x12 DRMD (Drum Map Dump) +>>>4 byte 0x22 DRMP (Drum Map Parameter Change) +>>>4 byte 0x32 DRMQ (Drum Map Parameter Inquiry) +>>>4 byte 0x72 BIN (Drum Map Reserved) +>>>4 byte 0x04 GLBR (Global Parameter Request) +>>>4 byte 0x14 GLBD (Global Parameter Dump) +>>>4 byte 0x24 GLBP (Global Parameter Parameter Change) +>>>4 byte 0x34 GLBQ (Global Parameter Parameter Inquiry) +>>2 byte 0x11 rackAttack +>>>4 byte 0x00 SNDR (Sound Parameter Request) +>>>4 byte 0x10 SNDD (Sound Parameter Dump) +>>>4 byte 0x20 SNDP (Sound Parameter Parameter Change) +>>>4 byte 0x30 SNDQ (Sound Parameter Parameter Inquiry) +>>>4 byte 0x01 PRGR (Program Parameter Request) +>>>4 byte 0x11 PRGD (Program Parameter Dump) +>>>4 byte 0x21 PRGP (Program Parameter Parameter Change) +>>>4 byte 0x31 PRGQ (Program Parameter Parameter Inquiry) +>>>4 byte 0x71 OS (Program Parameter Reserved) +>>>4 byte 0x03 PATR (Pattern Parameter Request) +>>>4 byte 0x13 PATD (Pattern Parameter Dump) +>>>4 byte 0x23 PATP (Pattern Parameter Parameter Change) +>>>4 byte 0x33 PATQ (Pattern Parameter Parameter Inquiry) +>>>4 byte 0x04 GLBR (Global Parameter Request) +>>>4 byte 0x14 GLBD (Global Parameter Dump) +>>>4 byte 0x24 GLBP (Global Parameter Parameter Change) +>>>4 byte 0x34 GLBQ (Global Parameter Parameter Inquiry) +>>>4 byte 0x05 EFXR (FX Parameter Request) +>>>4 byte 0x15 EFXD (FX Parameter Dump) +>>>4 byte 0x25 EFXP (FX Parameter Parameter Change) +>>>4 byte 0x35 EFXQ (FX Parameter Parameter Inquiry) +>>>4 byte 0x07 MODR (Mode Command Request) +>>>4 byte 0x17 MODD (Mode Command Dump) +>>>4 byte 0x27 MODP (Mode Command Parameter Change) +>>>4 byte 0x37 MODQ (Mode Command Parameter Inquiry) +>>2 byte 0x03 Wave +>>>4 byte 0x00 SBPR (Soundprogram) +>>>4 byte 0x01 SAPR (Performance) +>>>4 byte 0x02 SWAVE (Wave) +>>>4 byte 0x03 SWTBL (Wave control table) +>>>4 byte 0x04 SVT (Velocity Curve) +>>>4 byte 0x05 STT (Tuning Table) +>>>4 byte 0x06 SGLB (Global Parameters) +>>>4 byte 0x07 SARRMAP (Performance Program Change Map) +>>>4 byte 0x08 SBPRMAP (Sound Program Change Map) +>>>4 byte 0x09 SBPRPAR (Sound Parameter) +>>>4 byte 0x0A SARRPAR (Performance Parameter) +>>>4 byte 0x0B SINSPAR (Instrument/External Parameter) +>>>4 byte 0x0F SBULK (Bulk Switch on/off) # Japanese Group >1 byte 0x40 Kawai diff --git a/contrib/file-4/magic/Magdir/unicode b/contrib/file-4/magic/Magdir/unicode new file mode 100644 index 0000000000..45a32d4536 --- /dev/null +++ b/contrib/file-4/magic/Magdir/unicode @@ -0,0 +1,15 @@ + +#--------------------------------------------------------------------------- +# Unicode: BOM prefixed text files - Adrian Havill +# +0 string +/v8 Unicode text, UTF-7 +0 string +/v9 Unicode text, UTF-7 +0 string +/v+ Unicode text, UTF-7 +0 string +/v/ Unicode text, UTF-7 +0 string \357\273\277 Unicode text, UTF-8 +0 string \335\163\146\163 Unicode text, UTF-8-EBCDIC +0 string \376\377\000\000 Unicode text, UTF-32, big-endian +0 string \377\376\000\000 Unicode text, UTF-32, little-endian +0 string \376\377 Unicode text, UTF-16, big-endian +0 string \377\376 Unicode text, UTF-16, little-endian +0 string \016\376\377 Unicode text, SCSU (Standard Compression Scheme for Unicode) diff --git a/contrib/file-4/magic/Magdir/vmware b/contrib/file-4/magic/Magdir/vmware index 6af543c435..28e19e57a8 100644 --- a/contrib/file-4/magic/Magdir/vmware +++ b/contrib/file-4/magic/Magdir/vmware @@ -3,10 +3,3 @@ # VMware specific files (deducted from version 1.1 and log file entries) # Anthon van der Neut (anthon@mnt.org) 0 belong 0x4d52564e VMware nvram -0 belong 0x434f5744 VMware ->4 byte 3 virtual disk ->>32 lelong x (%d/ ->>36 lelong x \b%d/ ->>40 lelong x \b%d) ->4 byte 2 undoable disk ->>32 string >\0 (%s) diff --git a/contrib/file-4/magic/Magdir/wordprocessors b/contrib/file-4/magic/Magdir/wordprocessors index 0ac97baafa..9c06d8d6cb 100644 --- a/contrib/file-4/magic/Magdir/wordprocessors +++ b/contrib/file-4/magic/Magdir/wordprocessors @@ -104,7 +104,9 @@ #end of WordPerfect type files Version 1.6 - PLEASE DO NOT REMOVE THIS LINE # Hangul (Korean) Word Processor File -0 string HWP\ Document\ File Hangul (Korean) Word Processor File +0 string HWP\ Document\ File Hangul (Korean) Word Processor File 3.0 +# From: Won-Kyu Park +512 string R\0o\0o\0t\0 Hangul (Korean) Word Processor File 2000 # CosmicBook, from BenoƮt Rouits 0 string CSBK Ted Neslson's CosmicBook hypertext file @@ -121,3 +123,14 @@ 2 string IIXPRa Intel Quark Express Document (Korean) 2 string MMXPR3 Motorola Quark Express Document (English) 2 string MMXPRa Motorola Quark Express Document (Korean) + +# adobe indesign (document, whatever...) from querkan +0 belong 0x0606edf5 Adobe InDesign +>16 string DOCUMENT Document + +# From: Michael Piefel +# sqtroff intermediate language (replacement for ditroff int. lang.) +0 string X\ 495 SoftQuad troff Context intermediate for AT&T 495 laser printer +0 string X\ hp SoftQuad troff Context intermediate for HP LaserJet +0 string X\ impr SoftQuad troff Context intermediate for IMAGEN imPRESS +0 string X\ ps SoftQuad troff Context intermediate for PostScript diff --git a/contrib/file-4/magic/Magdir/xwindows b/contrib/file-4/magic/Magdir/xwindows index 1805d45b92..57f3b083f3 100644 --- a/contrib/file-4/magic/Magdir/xwindows +++ b/contrib/file-4/magic/Magdir/xwindows @@ -13,7 +13,7 @@ # xfsdump archive 0 string xFSdump0 xfsdump archive ->8 long x (version %d) +>8 belong x (version %d) # Jaleo XFS files 0 long 395726 Jaleo XFS file diff --git a/contrib/file-4/magic/magic.mime b/contrib/file-4/magic/magic.mime index 7815286216..3fa67e5928 100644 --- a/contrib/file-4/magic/magic.mime +++ b/contrib/file-4/magic/magic.mime @@ -99,9 +99,7 @@ # svg -0 string \38 string \<\!DOCTYPE\040svg image/svg+xml +38 string \<\!DOCTYPE\040svg image/svg+xml # xml @@ -111,8 +109,8 @@ #------------------------------------------------------------------------------ # Java -0 short 0xcafe ->2 short 0xbabe application/java +0 beshort 0xcafe +>2 beshort 0xbabe application/java #------------------------------------------------------------------------------ # audio: file(1) magic for sound formats @@ -135,7 +133,7 @@ # DEC systems (e.g. DECstation 5000) use a variant of the Sun/NeXT format # that uses little-endian encoding and has a different magic number # (0x0064732E in little-endian encoding). -0 lelong 0x0064732E +0 lelong 0x0064732E >12 lelong 1 audio/x-dec-basic >12 lelong 2 audio/x-dec-basic >12 lelong 3 audio/x-dec-basic @@ -148,25 +146,25 @@ # Bytes 0-3 of AIFF, AIFF-C, & 8SVX audio files are "FORM" # AIFF audio data -8 string AIFF audio/x-aiff +8 string AIFF audio/x-aiff # AIFF-C audio data -8 string AIFC audio/x-aiff +8 string AIFC audio/x-aiff # IFF/8SVX audio data -8 string 8SVX audio/x-aiff +8 string 8SVX audio/x-aiff # Creative Labs AUDIO stuff # Standard MIDI data -0 string MThd audio/unknown +0 string MThd audio/unknown #>9 byte >0 (format %d) #>11 byte >1 using %d channels # Creative Music (CMF) data -0 string CTMF audio/unknown +0 string CTMF audio/unknown # SoundBlaster instrument data -0 string SBI audio/unknown +0 string SBI audio/unknown # Creative Labs voice data -0 string Creative\ Voice\ File audio/unknown +0 string Creative\ Voice\ File audio/unknown ## is this next line right? it came this way... #>19 byte 0x1A #>23 byte >0 - version %d @@ -408,10 +406,7 @@ 0 string \