diff options
author | obrien <obrien@FreeBSD.org> | 2002-09-16 05:54:26 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2002-09-16 05:54:26 +0000 |
commit | 2ef757c3c642f5ce8353e106c1fbbd3cea2b14c1 (patch) | |
tree | be5585d7b830cb36fbe379de5dc133810141410c /contrib/file/Magdir | |
parent | 7860fd7670d66336ca32454f171db9c04eb45f02 (diff) | |
download | FreeBSD-src-2ef757c3c642f5ce8353e106c1fbbd3cea2b14c1.zip FreeBSD-src-2ef757c3c642f5ce8353e106c1fbbd3cea2b14c1.tar.gz |
Virgin import of Christos Zoulas's FILE 3.39.
Diffstat (limited to 'contrib/file/Magdir')
34 files changed, 823 insertions, 195 deletions
diff --git a/contrib/file/Magdir/acorn b/contrib/file/Magdir/acorn new file mode 100644 index 0000000..ad89cc66 --- /dev/null +++ b/contrib/file/Magdir/acorn @@ -0,0 +1,32 @@ +#------------------------------------------------------------------------------ +# acorn: file(1) magic for files found on Acorn systems +# + +# RISC OS Chunk File Format +# From RISC OS Programmer's Reference Manual, Appendix D +# We guess the file type from the type of the first chunk. +0 lelong 0xc3cbc6c5 RISC OS Chunk data +>12 string OBJ_ \b, AOF object +>12 string LIB_ \b, ALF library + +# RISC OS AIF, contains "SWI OS_Exit" at offset 16. +16 lelong 0xef000011 RISC OS AIF executable + +# RISC OS Draw files +# From RISC OS Programmer's Reference Manual, Appendix E +0 string Draw RISC OS Draw file data + +# RISC OS new format font files +# From RISC OS Programmer's Reference Manual, Appendix E +0 string FONT\0 RISC OS outline font data, +>5 byte x version %d +0 string FONT\1 RISC OS 1bpp font data, +>5 byte x version %d +0 string FONT\4 RISC OS 4bpp font data +>5 byte x version %d + +# RISC OS Music files +# From RISC OS Programmer's Reference Manual, Appendix E +0 string Maestro\r RISC OS music file +>8 byte x version %d + diff --git a/contrib/file/Magdir/adventure b/contrib/file/Magdir/adventure index 38a5e33..864712f 100644 --- a/contrib/file/Magdir/adventure +++ b/contrib/file/Magdir/adventure @@ -4,11 +4,12 @@ # # from Allen Garvin <earendil@faeryland.tamu-commerce.edu> # Edited by Dave Chapeskie <dchapes@ddm.on.ca> Jun 28, 1998 +# Edited by Chris Chittleborough <cchittleborough@yahoo.com.au>, March 2002 # # ALAN # I assume there are other, lower versions, but these are the only ones I # saw in the archive. -0 beshort 0x0206 ALAN text adventure code data +0 beshort 0x0206 ALAN game data >2 byte <10 version 2.6%d # Conflicts with too much other stuff! @@ -34,6 +35,29 @@ #>18 string >\0 Serial %.6s) # TADS (Text Adventure Development System) -0 string TADS TADS game data ->13 string >\0 (ver. %.6s, ->22 string >\0 date %s) +# All files are machine-independent (games compile to byte-code) and are tagged +# with a version string of the form "V2.<digit>.<digit>\0" (but TADS 3 is +# on the way). +# Game files start with "TADS2 bin\n\r\032\0" then the compiler version. +0 string TADS2\ bin TADS +>9 belong !0x0A0D1A00 game data, CORRUPTED +>9 belong 0x0A0D1A00 +>>13 string >\0 %s game data +# Resource files start with "TADS2 rsc\n\r\032\0" then the compiler version. +0 string TADS2\ rsc TADS +>9 belong !0x0A0D1A00 resource data, CORRUPTED +>9 belong 0x0A0D1A00 +>>13 string >\0 %s resource data +# Some saved game files start with "TADS2 save/g\n\r\032\0", a little-endian +# 2-byte length N, the N-char name of the game file *without* a NUL (darn!), +# "TADS2 save\n\r\032\0" and the interpreter version. +0 string TADS2\ save/g TADS +>12 belong !0x0A0D1A00 saved game data, CORRUPTED +>12 belong 0x0A0D1A00 +>>(16.s+32) string >\0 %s saved game data +# Other saved game files start with "TADS2 save\n\r\032\0" and the interpreter +# version. +0 string TADS2\ save TADS +>10 belong !0x0A0D1A00 saved game data, CORRUPTED +>10 belong 0x0A0D1A00 +>>14 string >\0 %s saved game data diff --git a/contrib/file/Magdir/amigaos b/contrib/file/Magdir/amigaos index a4c3e82..a1be613 100644 --- a/contrib/file/Magdir/amigaos +++ b/contrib/file/Magdir/amigaos @@ -8,3 +8,32 @@ # 0 belong 0x000003f3 AmigaOS loadseg()ble executable/binary 0 belong 0x000003e7 AmigaOS object/library data +# +0 beshort 0xe310 Amiga Workbench +>2 beshort 1 +>>48 byte 1 disk icon +>>48 byte 2 drawer icon +>>48 byte 3 tool icon +>>48 byte 4 project icon +>>48 byte 5 garbage icon +>>48 byte 6 device icon +>>48 byte 7 kickstart icon +>>48 byte 8 workbench application icon +>2 beshort >1 icon, vers. %d +# +# various sound formats from the Amiga +# G=F6tz Waschk <waschk@informatik.uni-rostock.de> +# +0 string FC14 Future Composer 1.4 Module sound file +0 string SMOD Future Composer 1.3 Module sound file +0 string AON4artofnoise Art Of Noise Module sound file +1 string MUGICIAN/SOFTEYES Mugician Module sound file +58 string SIDMON\ II\ -\ THE Sidmon 2.0 Module sound file +0 string Synth4.0 Synthesis Module sound file +0 string ARP. The Holy Noise Module sound file +0 string BeEp\0 JamCracker Module sound file +0 string COSO\0 Hippel-COSO Module sound file +26 string V.3 Brian Postma's Soundmon Module sound file v3 +26 string BPSM Brian Postma's Soundmon Module sound file v3 +26 string V.2 Brian Postma's Soundmon Module sound file v2 + diff --git a/contrib/file/Magdir/animation b/contrib/file/Magdir/animation index 6fa689f..56f25cf 100644 --- a/contrib/file/Magdir/animation +++ b/contrib/file/Magdir/animation @@ -15,75 +15,96 @@ # MPEG Audio (*.mpx) # from dreesen@math.fu-berlin.de -# XXX -# This conflicts with the FF FE signature for UTF-16-encoded Unicode -# text, which will be identified as an MP3 file. I don't have any MP3s -# so I don't know how to (or even if it's possible to) change this to -# tell the two apart. enf@pobox.com +# MPEG 1.0 Layer 3 +0 beshort&0xfffe =0xfffa \bMP3 +>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 +# freq +>2 byte&0x0C =0x00 \b, 44.1 kHz +>2 byte&0x0C =0x04 \b, 48 kHz +>2 byte&0x0C =0x08 \b, 32 kHz +# misc +>3 byte&0xC0 =0x00 \b, Stereo +>3 byte&0xC0 =0x40 \b, JStereo +>3 byte&0xC0 =0x80 \b, Dual-Ch +>3 byte&0xC0 =0xC0 \b, Mono +#>1 byte&0x01 =0x00 \b, Error Protection +#>2 byte&0x02 =0x02 \b, Padding +#>2 byte&0x01 =0x01 \b, Private +#>3 byte&0x08 =0x08 \b, Copyright +#>3 byte&0x04 =0x04 \b, Original +#>3 byte&0x03 1 \b, Emphasis 5 +#>3 byte&0x03 3 \b, Emphasis c -0 beshort &0xfff0 MP -# MPEG 1.0 ->1 byte&0x08 =0x08 \b -# Layer 3 ->>1 byte &0x02 \b3 ->>>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 -# Layer 2 ->>1 byte &0x04 \b2 ->>>2 byte&0xf0 =0x10 \b, 32 kBits ->>>2 byte&0xf0 =0x20 \b, 48 kBits ->>>2 byte&0xf0 =0x30 \b, 56 kBits ->>>2 byte&0xf0 =0x40 \b, 64 kBits ->>>2 byte&0xf0 =0x50 \b, 80 kBits ->>>2 byte&0xf0 =0x60 \b, 96 kBits ->>>2 byte&0xf0 =0x70 \b, 112 kBits ->>>2 byte&0xf0 =0x80 \b, 128 kBits ->>>2 byte&0xf0 =0x90 \b, 160 kBits ->>>2 byte&0xf0 =0xA0 \b, 192 kBits ->>>2 byte&0xf0 =0xB0 \b, 224 kBits ->>>2 byte&0xf0 =0xC0 \b, 256 kBits ->>>2 byte&0xf0 =0xD0 \b, 320 kBits ->>>2 byte&0xf0 =0xE0 \b, 384 kBits +# MPEG 1.0 Layer 2 +0 beshort&0xfffe =0xfffc \bMP2 +>2 byte&0xf0 =0x10 \b, 32 kBits +>2 byte&0xf0 =0x20 \b, 48 kBits +>2 byte&0xf0 =0x30 \b, 56 kBits +>2 byte&0xf0 =0x40 \b, 64 kBits +>2 byte&0xf0 =0x50 \b, 80 kBits +>2 byte&0xf0 =0x60 \b, 96 kBits +>2 byte&0xf0 =0x70 \b, 112 kBits +>2 byte&0xf0 =0x80 \b, 128 kBits +>2 byte&0xf0 =0x90 \b, 160 kBits +>2 byte&0xf0 =0xA0 \b, 192 kBits +>2 byte&0xf0 =0xB0 \b, 224 kBits +>2 byte&0xf0 =0xC0 \b, 256 kBits +>2 byte&0xf0 =0xD0 \b, 320 kBits +>2 byte&0xf0 =0xE0 \b, 384 kBits # freq ->>2 byte&0x0C =0x00 \b, 44.1 kHz ->>2 byte&0x0C =0x04 \b, 48 kHz ->>2 byte&0x0C =0x08 \b, 32 kHz +>2 byte&0x0C =0x00 \b, 44.1 kHz +>2 byte&0x0C =0x04 \b, 48 kHz +>2 byte&0x0C =0x08 \b, 32 kHz +# misc +>3 byte&0xC0 =0x00 \b, Stereo +>3 byte&0xC0 =0x40 \b, JStereo +>3 byte&0xC0 =0x80 \b, Dual-Ch +>3 byte&0xC0 =0xC0 \b, Mono +#>1 byte&0x01 =0x00 \b, Error Protection +#>2 byte&0x02 =0x02 \b, Padding +#>2 byte&0x01 =0x01 \b, Private +#>3 byte&0x08 =0x08 \b, Copyright +#>3 byte&0x04 =0x04 \b, Original +#>3 byte&0x03 1 \b, Emphasis 5 +#>3 byte&0x03 3 \b, Emphasis c + # MPEG 2.0 ->1 byte&0x08 =0x00 \b +0 beshort&0xfff8 =0xfff0 MP # Layer 3 ->>1 byte &0x02 \b3 +>1 byte &0x02 \b3 # Layer 2 ->>1 byte &0x04 \b2 ->>2 byte&0xf0 =0x10 \b, 8 kBits ->>2 byte&0xf0 =0x20 \b, 16 kBits ->>2 byte&0xf0 =0x30 \b, 24 kBits ->>2 byte&0xf0 =0x40 \b, 32 kBits ->>2 byte&0xf0 =0x50 \b, 40 kBits ->>2 byte&0xf0 =0x60 \b, 48 kBits ->>2 byte&0xf0 =0x70 \b, 56 kBits ->>2 byte&0xf0 =0x80 \b, 64 kBits ->>2 byte&0xf0 =0x90 \b, 80 kBits ->>2 byte&0xf0 =0xA0 \b, 96 kBits ->>2 byte&0xf0 =0xB0 \b, 112 kBits ->>2 byte&0xf0 =0xC0 \b, 128 kBits ->>2 byte&0xf0 =0xD0 \b, 144 kBits ->>2 byte&0xf0 =0xE0 \b, 160 kBits +>1 byte &0x04 \b2 +>2 byte&0xf0 =0x10 \b, 8 kBits +>2 byte&0xf0 =0x20 \b, 16 kBits +>2 byte&0xf0 =0x30 \b, 24 kBits +>2 byte&0xf0 =0x40 \b, 32 kBits +>2 byte&0xf0 =0x50 \b, 40 kBits +>2 byte&0xf0 =0x60 \b, 48 kBits +>2 byte&0xf0 =0x70 \b, 56 kBits +>2 byte&0xf0 =0x80 \b, 64 kBits +>2 byte&0xf0 =0x90 \b, 80 kBits +>2 byte&0xf0 =0xA0 \b, 96 kBits +>2 byte&0xf0 =0xB0 \b, 112 kBits +>2 byte&0xf0 =0xC0 \b, 128 kBits +>2 byte&0xf0 =0xD0 \b, 144 kBits +>2 byte&0xf0 =0xE0 \b, 160 kBits # freq ->>2 byte&0x0C =0x00 \b, 22.05 kHz ->>2 byte&0x0C =0x04 \b, 24 kHz ->>2 byte&0x0C =0x08 \b, 16 kHz +>2 byte&0x0C =0x00 \b, 22.05 kHz +>2 byte&0x0C =0x04 \b, 24 kHz +>2 byte&0x0C =0x08 \b, 16 kHz # misc >3 byte&0xC0 =0x00 \b, Stereo >3 byte&0xC0 =0x40 \b, JStereo @@ -168,3 +189,8 @@ # Microsoft Advanced Streaming Format (ASF) <mpruett@sgi.com> 0 belong 0x3026b275 Microsoft ASF + +# MNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/> +0 string \x8aMNG MNG video data, +>4 belong !0x0d0a1a0a CORRUPTED, +>4 belong 0x0d0a1a0a diff --git a/contrib/file/Magdir/archive b/contrib/file/Magdir/archive index 7e98240..ac3da71 100644 --- a/contrib/file/Magdir/archive +++ b/contrib/file/Magdir/archive @@ -250,3 +250,9 @@ >>14 beshort 0x677a (gzipped) >>14 beshort !0x677a (not gzipped) >13 string >3 version %s + +############################################################################ +# Parity archive reconstruction file, the 'par' file format now used on Usenet. +0 string PAR\0 PARity archive data +>48 leshort =0 - Index file +>48 leshort >0 - file number %d diff --git a/contrib/file/Magdir/audio b/contrib/file/Magdir/audio index 65988f1..5a16971 100644 --- a/contrib/file/Magdir/audio +++ b/contrib/file/Magdir/audio @@ -136,9 +136,28 @@ # Audio Visual Research <mpruett@sgi.com> 0 string 2BIT Audio Visual Research file -# From Felix von Leitner <leitner@fefe.de> -0 string OggS Ogg-Vorbis compressed sound file - # SGI SoundTrack <mpruett@sgi.com> 0 string _SGI_SoundTrack SGI SoundTrack project file -0 string ID3 mp3 file with ID3 2.0 tag +# ID3 version 2 tags <waschk@informatik.uni-rostock.de> +0 string ID3 MP3 file with ID3 version 2. +>3 ubyte <0xff \b%d. +>4 ubyte <0xff \b%d tag + +# NSF (NES sound file) magic +0 string NESM\x1a NES Sound File +>14 string >\0 ("%s" by +>46 string >\0 %s, copyright +>78 string >\0 %s), +>5 byte x version %d, +>6 byte x %d tracks, +>122 byte&0x2 =1 dual PAL/NTSC +>122 byte&0x1 =1 PAL +>122 byte&0x1 =0 NTSC + +# Impuse tracker module (audio/x-it) +0 string IMPM Impulse Tracker module sound data - +>4 string >\0 "%s" + +# Imago Orpheus module (audio/x-imf) +60 string IM10 Imago Orpheus module sound data - +>0 string >\0 "%s" diff --git a/contrib/file/Magdir/cddb b/contrib/file/Magdir/cddb new file mode 100644 index 0000000..2ea97ee --- /dev/null +++ b/contrib/file/Magdir/cddb @@ -0,0 +1,11 @@ + +#------------------------------------------------------------------------------ +# CDDB: file(1) magic for CDDB(tm) format CD text data files +# +# From <steve@gracenote.com> +# +# This is the /etc/magic entry to decode datafiles as used by +# CDDB-enabled CD player applications. +# + +0 string/b #\040xmcd CDDB(tm) format CD text data diff --git a/contrib/file/Magdir/commands b/contrib/file/Magdir/commands index 3fe253a..a9dd089 100644 --- a/contrib/file/Magdir/commands +++ b/contrib/file/Magdir/commands @@ -27,16 +27,6 @@ 0 string/b #!\ /usr/bin/awk awk script text executable 0 string BEGIN awk script text -# For Larry Wall's perl language. The ``eval'' line recognizes an -# outrageously clever hack for USG systems. -# Keith Waclena <keith@cerberus.uchicago.edu> -0 string/b #!\ /bin/perl perl script text executable -0 string eval\ "exec\ /bin/perl perl script text -0 string/b #!\ /usr/bin/perl perl script text executable -0 string eval\ "exec\ /usr/bin/perl perl script text -0 string/b #!\ /usr/local/bin/perl perl script text -0 string eval\ "exec\ /usr/local/bin/perl perl script text executable - # AT&T Bell Labs' Plan 9 shell 0 string/b #!\ /bin/rc Plan 9 rc shell script text executable @@ -60,3 +50,13 @@ >2 string >\0 %s script text executable 0 string #!\ script text executable >3 string >\0 for %s + +# PHP scripts +# Ulf Harnhammar <ulfh@update.uu.se> +0 string/c =<?php PHP script text +0 string =<?\n PHP script text +0 string =<?\r PHP script text +0 string/b #!\ /usr/local/bin/php PHP script text executable +0 string/b #!\ /usr/bin/php PHP script text executable + +0 string Zend\x00 PHP script Zend Optimizer data diff --git a/contrib/file/Magdir/compress b/contrib/file/Magdir/compress index f4fe4a4..3da7f5f 100644 --- a/contrib/file/Magdir/compress +++ b/contrib/file/Magdir/compress @@ -14,28 +14,32 @@ >2 byte&0x1f x %d bits # gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver) +# Edited by Chris Chittleborough <cchittleborough@yahoo.com.au>, March 2002 +# * Original filename is only at offset 10 if "extra field" absent +# * 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 ->2 byte <8 \b, reserved method, ->2 byte 8 \b, deflated, ->3 byte &0x01 ASCII, ->3 byte &0x02 continuation, ->3 byte &0x04 extra field, ->3 byte &0x08 original filename, ->>10 string x `%s', ->3 byte &0x10 comment, ->3 byte &0x20 encrypted, ->4 ledate x last modified: %s, ->8 byte 2 max compression, ->8 byte 4 max speed, ->9 byte =0x00 os: MS-DOS ->9 byte =0x01 os: Amiga ->9 byte =0x02 os: VMS ->9 byte =0x03 os: Unix ->9 byte =0x05 os: Atari ->9 byte =0x06 os: OS/2 ->9 byte =0x07 os: MacOS ->9 byte =0x0A os: Tops/20 ->9 byte =0x0B os: Win/32 +>2 byte <8 \b, reserved method +>2 byte >8 \b, unknown method +>3 byte &0x01 \b, ASCII +>3 byte &0x02 \b, continuation +>3 byte &0x04 \b, extra field +>3 byte&0xC =0x08 +>>10 string x \b, was "%s" +>9 byte =0x00 \b, from MS-DOS +>9 byte =0x01 \b, from Amiga +>9 byte =0x02 \b, from VMS +>9 byte =0x03 \b, from Unix +>9 byte =0x05 \b, from Atari +>9 byte =0x06 \b, from OS/2 +>9 byte =0x07 \b, from MacOS +>9 byte =0x0A \b, from Tops/20 +>9 byte =0x0B \b, from Win/32 +>3 byte &0x10 \b, comment +>3 byte &0x20 \b, encrypted +### >4 ledate x last modified: %s, +>8 byte 2 \b, max compression +>8 byte 4 \b, max speed # packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis 0 string \037\036 packed data @@ -144,3 +148,7 @@ >>17 byte =0x0A os: Tops/20 >>17 byte =0x0B os: WinNT >>17 byte =0x0E os: Win32 + +# 4.3BSD-Quasijarus Strong Compression +# http://minnie.tuhs.org/Quasijarus/compress.html +0 string \037\241 Quasijarus strong compressed data diff --git a/contrib/file/Magdir/cvs b/contrib/file/Magdir/cvs new file mode 100644 index 0000000..2ce9a1a --- /dev/null +++ b/contrib/file/Magdir/cvs @@ -0,0 +1,6 @@ +#------------------------------------------------------------------------------ +# file(1) magic for cvs(1) files +# From Hendrik Scholz <hendrik@scholz.net> + +0 string /1\ :pserver: cvs password text file + diff --git a/contrib/file/Magdir/database b/contrib/file/Magdir/database index 87ecac7..9d5fe19 100644 --- a/contrib/file/Magdir/database +++ b/contrib/file/Magdir/database @@ -72,3 +72,9 @@ # Round Robin Database Tool by Tobias Oetiker <oetiker@ee.ethz.ch> 0 string RRD RRDTool DB >4 string x version %s +#---------------------------------------------------------------------- +# ROOT: file(1) magic for ROOT databases +# +0 string root\0 ROOT file +>4 belong x Version %d +>33 belong x (Compression: %d) diff --git a/contrib/file/Magdir/dolby b/contrib/file/Magdir/dolby new file mode 100644 index 0000000..230f738 --- /dev/null +++ b/contrib/file/Magdir/dolby @@ -0,0 +1,57 @@ +# ATSC A/53 aka AC-3 aka Dolby Digital <ashitaka@gmx.at> +# from http://www.atsc.org/standards/a_52a.pdf +# corrections, additions, etc. are always welcome! +# +# syncword +0 beshort 0x0b77 ATSC A/52 aka AC-3 aka Dolby Digital stream, +# fscod +>4 byte&0xc0 0x00 48 kHz, +>4 byte&0xc0 0x40 44.1 kHz, +>4 byte&0xc0 0x80 32 kHz, +# is this one used for 96 kHz? +>4 byte&0xc0 0xc0 reserved frequency, +# +>5 byte&7 = 0 \b, complete main (CM) +>5 byte&7 = 1 \b, music and effects (ME) +>5 byte&7 = 2 \b, visually impaired (VI) +>5 byte&7 = 3 \b, hearing impaired (HI) +>5 byte&7 = 4 \b, dialogue (D) +>5 byte&7 = 5 \b, commentary (C) +>5 byte&7 = 6 \b, emergency (E) +# acmod +>6 byte&0xe0 0x00 1+1 front, +>6 byte&0xe0 0x20 1 front/0 rear, +>6 byte&0xe0 0x40 2 front/0 rear, +>6 byte&0xe0 0x60 3 front/0 rear, +>6 byte&0xe0 0x80 2 front/1 rear, +>6 byte&0xe0 0xa0 3 front/1 rear, +>6 byte&0xe0 0xc0 2 front/2 rear, +>6 byte&0xe0 0xe0 3 front/2 rear, +# lfeon (these may be incorrect) +>7 byte&0x40 0x00 LFE off, +>7 byte&0x40 0x40 LFE on, +# +>4 byte&0x3e = 0x00 \b, 32 kbit/s +>4 byte&0x3e = 0x02 \b, 40 kbit/s +>4 byte&0x3e = 0x04 \b, 48 kbit/s +>4 byte&0x3e = 0x06 \b, 56 kbit/s +>4 byte&0x3e = 0x08 \b, 64 kbit/s +>4 byte&0x3e = 0x0a \b, 80 kbit/s +>4 byte&0x3e = 0x0c \b, 96 kbit/s +>4 byte&0x3e = 0x0e \b, 112 kbit/s +>4 byte&0x3e = 0x10 \b, 128 kbit/s +>4 byte&0x3e = 0x12 \b, 160 kbit/s +>4 byte&0x3e = 0x14 \b, 192 kbit/s +>4 byte&0x3e = 0x16 \b, 224 kbit/s +>4 byte&0x3e = 0x18 \b, 256 kbit/s +>4 byte&0x3e = 0x1a \b, 320 kbit/s +>4 byte&0x3e = 0x1c \b, 384 kbit/s +>4 byte&0x3e = 0x1e \b, 448 kbit/s +>4 byte&0x3e = 0x20 \b, 512 kbit/s +>4 byte&0x3e = 0x22 \b, 576 kbit/s +>4 byte&0x3e = 0x24 \b, 640 kbit/s +# dsurmod (these may be incorrect) +>6 beshort&0x0180 0x0000 Dolby Surround not indicated +>6 beshort&0x0180 0x0080 not Dolby Surround encoded +>6 beshort&0x0180 0x0100 Dolby Surround encoded +>6 beshort&0x0180 0x0180 reserved Dolby Surround mode diff --git a/contrib/file/Magdir/editors b/contrib/file/Magdir/editors index c529d0d..7edbe8b 100644 --- a/contrib/file/Magdir/editors +++ b/contrib/file/Magdir/editors @@ -7,3 +7,7 @@ >4 string 1 CP 852 >4 string 2 KOI8-CS >4 string >2 unknown encoding + +# Vi IMproved Encrypted file +# by David Necas <yeti@physics.muni.cz> +0 string VimCrypt~ Vim encrypted file data diff --git a/contrib/file/Magdir/elf b/contrib/file/Magdir/elf index 53a6bc9..a6c04ee 100644 --- a/contrib/file/Magdir/elf +++ b/contrib/file/Magdir/elf @@ -5,38 +5,45 @@ # We have to check the byte order flag to see what byte order all the # other stuff in the header is in. # -# MIPS R3000 may also be for MIPS R2000. # What're the correct byte orders for the nCUBE and the Fujitsu VPP500? # # updated by Daniel Quinlan (quinlan@yggdrasil.com) 0 string \177ELF ELF >4 byte 0 invalid class >4 byte 1 32-bit -# only for MIPS +# only for MIPS - in the future, the ABI field of e_flags should be used. >>18 beshort 8 >>18 beshort 10 >>>36 belong &0x20 N32 >4 byte 2 64-bit >5 byte 0 invalid byte order >5 byte 1 LSB -# only for MIPS R3000_BE +# The official e_machine number for MIPS is now #8, regardless of endianness. +# The second number (#10) will be deprecated later. For now, we still +# say something if #10 is encountered, but only gory details for #8. >>18 leshort 8 # only for 32-bit >>>4 byte 1 ->>>>36 lelong&0xf0000000 0x00000000 mips-1 ->>>>36 lelong&0xf0000000 0x10000000 mips-2 ->>>>36 lelong&0xf0000000 0x20000000 mips-3 ->>>>36 lelong&0xf0000000 0x30000000 mips-4 ->>>>36 lelong&0xf0000000 0x40000000 mips-5 ->>>>36 lelong&0xf0000000 0x50000000 mips-6 +>>>>36 lelong&0xf0000000 0x00000000 MIPS-I +>>>>36 lelong&0xf0000000 0x10000000 MIPS-II +>>>>36 lelong&0xf0000000 0x20000000 MIPS-III +>>>>36 lelong&0xf0000000 0x30000000 MIPS-IV +>>>>36 lelong&0xf0000000 0x40000000 MIPS-V +>>>>36 lelong&0xf0000000 0x60000000 MIPS32 +>>>>36 lelong&0xf0000000 0x70000000 MIPS64 +>>>>36 lelong&0xf0000000 0x80000000 MIPS32 rel2 +>>>>36 lelong&0xf0000000 0x90000000 MIPS64 rel2 # only for 64-bit >>>4 byte 2 ->>>>48 lelong&0xf0000000 0x00000000 mips-1 ->>>>48 lelong&0xf0000000 0x10000000 mips-2 ->>>>48 lelong&0xf0000000 0x20000000 mips-3 ->>>>48 lelong&0xf0000000 0x30000000 mips-4 ->>>>48 lelong&0xf0000000 0x40000000 mips-5 ->>>>48 lelong&0xf0000000 0x50000000 mips-6 +>>>>48 lelong&0xf0000000 0x00000000 MIPS-I +>>>>48 lelong&0xf0000000 0x10000000 MIPS-II +>>>>48 lelong&0xf0000000 0x20000000 MIPS-III +>>>>48 lelong&0xf0000000 0x30000000 MIPS-IV +>>>>48 lelong&0xf0000000 0x40000000 MIPS-V +>>>>48 lelong&0xf0000000 0x60000000 MIPS32 +>>>>48 lelong&0xf0000000 0x70000000 MIPS64 +>>>>48 lelong&0xf0000000 0x80000000 MIPS32 rel2 +>>>>48 lelong&0xf0000000 0x90000000 MIPS64 rel2 >>16 leshort 0 no file type, >>16 leshort 1 relocatable, >>16 leshort 2 executable, @@ -44,21 +51,24 @@ # Core handling from Peter Tobias <tobias@server.et-inf.fho-emden.de> # corrections by Christian 'Dr. Disk' Hechelmann <drdisk@ds9.au.s.shuttle.de> >>16 leshort 4 core file ->>>(0x38+0xcc) string >\0 of '%s' ->>>(0x38+0x10) lelong >0 (signal %d), +# Core file detection is not reliable. +#>>>(0x38+0xcc) string >\0 of '%s' +#>>>(0x38+0x10) lelong >0 (signal %d), >>16 leshort &0xff00 processor-specific, >>18 leshort 0 no machine, >>18 leshort 1 AT&T WE32100 - invalid byte order, >>18 leshort 2 SPARC - invalid byte order, >>18 leshort 3 Intel 80386, ->>18 leshort 4 Motorola 68000 - invalid byte order, +>>18 leshort 4 Motorola +>>>36 lelong &0x01000000 68000 - invalid byte order, +>>>36 lelong &0x00810000 CPU32 - invalid byte order, +>>>36 lelong 0 68020 - invalid byte order, >>18 leshort 5 Motorola 88000 - invalid byte order, >>18 leshort 6 Intel 80486, >>18 leshort 7 Intel 80860, -# "officially" big endian, but binutils bfd only emits magic #8 for MIPS. ->>18 leshort 8 MIPS R3000_LE [bfd bug], +>>18 leshort 8 MIPS, >>18 leshort 9 Amdahl - invalid byte order, ->>18 leshort 10 MIPS R3000_LE, +>>18 leshort 10 MIPS (deprecated), >>18 leshort 11 RS6000 - invalid byte order, >>18 leshort 15 PA-RISC - invalid byte order, >>>50 leshort 0x0214 2.0 @@ -92,43 +102,52 @@ >>20 lelong 1 version 1 >>36 lelong 1 MathCoPro/FPU/MAU Required >5 byte 2 MSB -# only for MIPS R3000_BE +# only for MIPS - see comment in little-endian section above. >>18 beshort 8 # only for 32-bit >>>4 byte 1 ->>>>36 belong&0xf0000000 0x00000000 mips-1 ->>>>36 belong&0xf0000000 0x10000000 mips-2 ->>>>36 belong&0xf0000000 0x20000000 mips-3 ->>>>36 belong&0xf0000000 0x30000000 mips-4 ->>>>36 belong&0xf0000000 0x40000000 mips-5 ->>>>36 belong&0xf0000000 0x50000000 mips-6 +>>>>36 belong&0xf0000000 0x00000000 MIPS-I +>>>>36 belong&0xf0000000 0x10000000 MIPS-II +>>>>36 belong&0xf0000000 0x20000000 MIPS-III +>>>>36 belong&0xf0000000 0x30000000 MIPS-IV +>>>>36 belong&0xf0000000 0x40000000 MIPS-V +>>>>36 belong&0xf0000000 0x60000000 MIPS32 +>>>>36 belong&0xf0000000 0x70000000 MIPS64 +>>>>36 belong&0xf0000000 0x80000000 MIPS32 rel2 +>>>>36 belong&0xf0000000 0x90000000 MIPS64 rel2 # only for 64-bit >>>4 byte 2 ->>>>48 belong&0xf0000000 0x00000000 mips-1 ->>>>48 belong&0xf0000000 0x10000000 mips-2 ->>>>48 belong&0xf0000000 0x20000000 mips-3 ->>>>48 belong&0xf0000000 0x30000000 mips-4 ->>>>48 belong&0xf0000000 0x40000000 mips-5 ->>>>48 belong&0xf0000000 0x50000000 mips-6 +>>>>48 belong&0xf0000000 0x00000000 MIPS-I +>>>>48 belong&0xf0000000 0x10000000 MIPS-II +>>>>48 belong&0xf0000000 0x20000000 MIPS-III +>>>>48 belong&0xf0000000 0x30000000 MIPS-IV +>>>>48 belong&0xf0000000 0x40000000 MIPS-V +>>>>48 belong&0xf0000000 0x60000000 MIPS32 +>>>>48 belong&0xf0000000 0x70000000 MIPS64 +>>>>48 belong&0xf0000000 0x80000000 MIPS32 rel2 +>>>>48 belong&0xf0000000 0x90000000 MIPS64 rel2 >>16 beshort 0 no file type, >>16 beshort 1 relocatable, >>16 beshort 2 executable, >>16 beshort 3 shared object, >>16 beshort 4 core file, ->>>(0x38+0xcc) string >\0 of '%s' ->>>(0x38+0x10) belong >0 (signal %d), +#>>>(0x38+0xcc) string >\0 of '%s' +#>>>(0x38+0x10) belong >0 (signal %d), >>16 beshort &0xff00 processor-specific, >>18 beshort 0 no machine, >>18 beshort 1 AT&T WE32100, >>18 beshort 2 SPARC, >>18 beshort 3 Intel 80386 - invalid byte order, ->>18 beshort 4 Motorola 68000, +>>18 beshort 4 Motorola +>>>36 belong &0x01000000 68000, +>>>36 belong &0x00810000 CPU32, +>>>36 belong 0 68020, >>18 beshort 5 Motorola 88000, >>18 beshort 6 Intel 80486 - invalid byte order, >>18 beshort 7 Intel 80860, ->>18 beshort 8 MIPS R3000_BE, +>>18 beshort 8 MIPS, >>18 beshort 9 Amdahl, ->>18 beshort 10 MIPS R3000_LE - invalid byte order, +>>18 beshort 10 MIPS (deprecated), >>18 beshort 11 RS6000, >>18 beshort 15 PA-RISC >>>50 beshort 0x0214 2.0 diff --git a/contrib/file/Magdir/filesystems b/contrib/file/Magdir/filesystems index 20600c6..1e6624c 100644 --- a/contrib/file/Magdir/filesystems +++ b/contrib/file/Magdir/filesystems @@ -25,7 +25,12 @@ >512 belong&077777777 0600407 \b, boot block present 0x1FE leshort 0xAA55 x86 boot sector >2 string OSBS \b, OS/BS MBR +# J\xf6rg Jenderek <joerg@pcialias.localnet> >0x8C string Invalid\ partition\ table \b, MS-DOS MBR +>0x9D string Invalid\ partition\ table \b, DR-DOS MBR, version 7.01 to 7.03 +>0x10F string Ung\201ltige\ Partitionstabelle \b, MS-DOS MBR, german version 4.10.1998, 4.10.2222 +>0x8B string Ung\201ltige\ Partitionstabelle \b, MS-DOS MBR, german version 5.00 to 4.00.950 +>0x145 string Default:\ F \b, FREE-DOS MBR >0 string \0\0\0\0 \b, extended partition table >0 leshort 0x3CEB \b, system >>3 string >\0 %s @@ -41,8 +46,17 @@ >>>>32 lelong x %d sectors >0x200 lelong 0x82564557 \b, BSD disklabel +# Solaris 7 FAT12 floppies J\xf6rg Jenderek <joerg@pcialias.localnet> +>0 leshort 0x7AEB \b, system +>>3 string >\0 %s +>>0x36 string FAT \b, %s +>>>0x39 string 12 (%s bit) + # Minix filesystems - Juan Cespedes <cespedes@debian.org> 0x410 leshort 0x137f Minix filesystem +0x410 beshort 0x137f Minix filesystem (big endian), +>0x402 beshort !0 \b, %d zones +>0x1e string minix \b, bootable 0x410 leshort 0x138f Minix filesystem, 30 char names 0x410 leshort 0x2468 Minix filesystem, version 2 0x410 leshort 0x2478 Minix filesystem, version 2, 30 char names @@ -116,3 +130,72 @@ >0x68 beshort x inosz=3D%d, >0x64 beshort ^0x2004 v1 dirs) >0x64 beshort &0x2004 v2 dirs) + +############################################################################ +# Minix-ST kernel floppy +0x800 belong 0x46fc2700 Atari-ST Minix kernel image +>19 string \240\5\371\5\0\011\0\2\0 \b, 720k floppy +>19 string \320\2\370\5\0\011\0\1\0 \b, 360k floppy + +############################################################################ +# Hmmm, is this a better way of detecting _standard_ floppy images ? +19 string \320\2\360\3\0\011\0\1\0 DOS floppy 360k +>0x1FE leshort 0xAA55 \b, x86 hard disk boot sector +19 string \240\5\371\3\0\011\0\2\0 DOS floppy 720k +>0x1FE leshort 0xAA55 \b, x86 hard disk boot sector +19 string \100\013\360\011\0\022\0\2\0 DOS floppy 1440k +>0x1FE leshort 0xAA55 \b, x86 hard disk boot sector + +19 string \240\5\371\5\0\011\0\2\0 DOS floppy 720k, IBM +>0x1FE leshort 0xAA55 \b, x86 hard disk boot sector +19 string \100\013\371\5\0\011\0\2\0 DOS floppy 1440k, mkdosfs +>0x1FE leshort 0xAA55 \b, x86 hard disk boot sector + +19 string \320\2\370\5\0\011\0\1\0 Atari-ST floppy 360k +19 string \240\5\371\5\0\011\0\2\0 Atari-ST floppy 720k + +# Valid media descriptor bytes for MS-DOS: +# +# Byte Capacity Media Size and Type +# ------------------------------------------------- +# +# F0 2.88 MB 3.5-inch, 2-sided, 36-sector +# F0 1.44 MB 3.5-inch, 2-sided, 18-sector +# F9 720K 3.5-inch, 2-sided, 9-sector +# F9 1.2 MB 5.25-inch, 2-sided, 15-sector +# FD 360K 5.25-inch, 2-sided, 9-sector +# FF 320K 5.25-inch, 2-sided, 8-sector +# FC 180K 5.25-inch, 1-sided, 9-sector +# FE 160K 5.25-inch, 1-sided, 8-sector +# FE 250K 8-inch, 1-sided, single-density +# FD 500K 8-inch, 2-sided, single-density +# FE 1.2 MB 8-inch, 2-sided, double-density +# F8 ----- Fixed disk +# +# FC xxxK Apricot 70x1x9 boot disk. +# +# Originally a bitmap: +# xxxxxxx0 Not two sided +# xxxxxxx1 Double sided +# xxxxxx0x Not 8 SPT +# xxxxxx1x 8 SPT +# xxxxx0xx Not Removable drive +# xxxxx1xx Removable drive +# 11111xxx Must be one. +# +# But now it's rather random: +# 111111xx Low density disk +# 00 SS, Not 8 SPT +# 01 DS, Not 8 SPT +# 10 SS, 8 SPT +# 11 DS, 8 SPT +# +# 11111001 Double density 3½ floppy disk, high density 5¼ +# 11110000 High density 3½ floppy disk +# 11111000 Hard disk any format +# + +# CDROM Filesystems +32769 string CD001 ISO 9660 CD-ROM filesystem data +37633 string CD001 ISO 9660 CD-ROM filesystem data (raw 2352 byte sectors) +32776 string CDROM High Sierra CD-ROM filesystem data diff --git a/contrib/file/Magdir/gringotts b/contrib/file/Magdir/gringotts new file mode 100644 index 0000000..2d135f8 --- /dev/null +++ b/contrib/file/Magdir/gringotts @@ -0,0 +1,25 @@ + +#------------------------------------------------------------------------------ +# gringotts: file(1) magic for Gringotts +# http://devel.pluto.linux.it/projects/Gringotts/ +# author: Germano Rizzo <mano@pluto.linux.it> +#GRG2????Y +0 string GRG Gringotts data file +>3 string 1 v.1, SERPENT crypt, SHA-256 hash, ZLib lvl.9 +>3 string 2 v.2, +>>8 byte&0x70 0x00 RIJNDAEL-128 crypt, +>>8 byte&0x70 0x10 SERPENT crypt, +>>8 byte&0x70 0x20 TWOFISH crypt, +>>8 byte&0x70 0x30 CAST-256 crypt, +>>8 byte&0x70 0x40 SAFER+ crypt, +>>8 byte&0x70 0x50 LOKI97 crypt, +>>8 byte&0x70 0x60 3DES crypt, +>>8 byte&0x70 0x70 RIJNDAEL-256 crypt, +>>8 byte&0x08 0x00 SHA1 hash, +>>8 byte&0x08 0x08 RIPEMD-160 hash, +>>8 byte&0x04 0x00 ZLib +>>8 byte&0x04 0x04 BZip2 +>>8 byte&0x03 0x00 lvl.0 +>>8 byte&0x03 0x01 lvl.3 +>>8 byte&0x03 0x02 lvl.6 +>>8 byte&0x03 0x03 lvl.9 diff --git a/contrib/file/Magdir/hitachi-sh b/contrib/file/Magdir/hitachi-sh index 136c038..a096eeb 100644 --- a/contrib/file/Magdir/hitachi-sh +++ b/contrib/file/Magdir/hitachi-sh @@ -7,12 +7,12 @@ 0 beshort 0x0500 Hitachi SH big-endian COFF >18 beshort&0x0002 =0x0000 object >18 beshort&0x0002 =0x0002 executable ->18 beshort&0x0008 =0x0000 \b, stripped ->18 beshort&0x0008 =0x0008 \b, not stripped +>18 beshort&0x0008 =0x0008 \b, stripped +>18 beshort&0x0008 =0x0000 \b, not stripped # 0 leshort 0x0550 Hitachi SH little-endian COFF >18 leshort&0x0002 =0x0000 object >18 leshort&0x0002 =0x0002 executable ->18 leshort&0x0008 =0x0000 \b, stripped ->18 leshort&0x0008 =0x0008 \b, not stripped +>18 leshort&0x0008 =0x0008 \b, stripped +>18 leshort&0x0008 =0x0000 \b, not stripped diff --git a/contrib/file/Magdir/human68k b/contrib/file/Magdir/human68k new file mode 100644 index 0000000..0ac82a7 --- /dev/null +++ b/contrib/file/Magdir/human68k @@ -0,0 +1,25 @@ + +#------------------------------------------------------------------------------ +# human68k: file(1) magic for Human68k (X680x0 DOS) binary formats + +0 string HU Human68k +>68 string LZX LZX compressed +>>72 string >\0 (version %s) +>(8.L+74) string LZX LZX compressed +>>(8.L+78) string >\0 (version %s) +>60 belong >0 binded +>(8.L+66) string #HUPAIR hupair +>0 string HU X executable +>(8.L+74) string #LIBCV1 - linked PD LIBC ver 1 +>4 belong >0 - base address 0x%x +>28 belong >0 not stripped +>32 belong >0 with debug information +0 beshort 0x601a Human68k Z executable +0 beshort 0x6000 Human68k object file +0 belong 0xd1000000 Human68k ar binary archive +0 belong 0xd1010000 Human68k ar ascii archive +0 beshort 0x0068 Human68k lib archive +4 string LZX Human68k LZX compressed +>8 string >\0 (version %s) +>4 string LZX R executable +2 string #HUPAIR Human68k hupair R executable diff --git a/contrib/file/Magdir/images b/contrib/file/Magdir/images index c07fa0c..daddc41 100644 --- a/contrib/file/Magdir/images +++ b/contrib/file/Magdir/images @@ -79,7 +79,7 @@ >4 string 7a \b, version 8%s, >4 string 9a \b, version 8%s, >6 leshort >0 %hd x ->8 leshort >0 %hd, +>8 leshort >0 %hd #>10 byte &0x80 color mapped, #>10 byte&0x07 =0x00 2 colors #>10 byte&0x07 =0x01 4 colors diff --git a/contrib/file/Magdir/impulse b/contrib/file/Magdir/impulse new file mode 100644 index 0000000..64c14c3 --- /dev/null +++ b/contrib/file/Magdir/impulse @@ -0,0 +1,18 @@ +#------------------------------------------------------------------------------ +# impulse tracker: file(1) magic for Impulse Tracker data files +# +# From <collver1@attbi.com> +# These are the /etc/magic entries to decode modules, instruments, and +# samples in Impulse Tracker's native format. + +0 string IMPS Impulse Tracker Sample +>18 byte &2 16 bit +>18 byte ^2 8 bit +>18 byte &4 stereo +>18 byte ^4 mono +0 string IMPI Impulse Tracker Instrument +>28 leshort !0 ITv%x +>30 byte !0 %d samples +0 string IMPM Impulse Tracker Module +>40 leshort !0 compatible w/ITv%x +>42 leshort !0 created w/ITv%x diff --git a/contrib/file/Magdir/linux b/contrib/file/Magdir/linux index 295edd9..4db4958 100644 --- a/contrib/file/Magdir/linux +++ b/contrib/file/Magdir/linux @@ -58,6 +58,8 @@ >3 byte >0 8x%d # Linux swap file, from Daniel Quinlan <quinlan@yggdrasil.com> 4086 string SWAP-SPACE Linux/i386 swap file +# according to man page of mkswap (8) March 1999 +4086 string SWAPSPACE2 Linux/i386 swap file (new style) # ECOFF magic for OSF/1 and Linux (only tested under Linux though) # # from Erik Troan (ewt@redhat.com) examining od dumps, so this @@ -99,3 +101,67 @@ >0x1e9 string Loading from prehistoric times # LSM entries - Nicolįs Lichtmaier <nick@feedback.net.ar> 0 string Begin3 Linux Software Map entry text + +############################################################################ +# Linux kernel versions + +0 string \xb8\xc0\x07\x8e\xd8\xb8\x00\x90 Linux +>497 leshort 0 x86 boot sector +>>514 belong 0x8e of a kernel from the dawn of time! +>>514 belong 0x908ed8b4 version 0.99-1.1.42 +>>514 belong 0x908ed8b8 for memtest86 + +>497 leshort !0 x86 kernel +>>504 leshort >0 RAMdisksize=%u KB +>>502 leshort >0 swap=0x%X +>>508 leshort >0 root=0x%X +>>>498 leshort 1 \b-ro +>>>498 leshort 0 \b-rw +>>506 leshort 0xFFFF vga=normal +>>506 leshort 0xFFFE vga=extended +>>506 leshort 0xFFFD vga=ask +>>506 leshort >0 vga=%d +>>514 belong 0x908ed881 version 1.1.43-1.1.45 +>>514 belong 0x15b281cd +>>>0xa8e belong 0x55AA5a5a version 1.1.46-1.2.13,1.3.0 +>>>0xa99 belong 0x55AA5a5a version 1.3.1,2 +>>>0xaa3 belong 0x55AA5a5a version 1.3.3-1.3.30 +>>>0xaa6 belong 0x55AA5a5a version 1.3.31-1.3.41 +>>>0xb2b belong 0x55AA5a5a version 1.3.42-1.3.45 +>>>0xaf7 belong 0x55AA5a5a version 1.3.46-1.3.72 +>>514 string HdrS +>>>518 leshort >0x1FF +>>>>529 byte 0 \b, zImage +>>>>529 byte 1 \b, bzImage +>>>>(526.s+0x200) string >\0 \b, version %s + +# Linux boot sector thefts. +0 belong 0xb8c0078e Linux +>0x1e6 belong 0x454c4b53 ELKS Kernel +>0x1e6 belong !0x454c4b53 style boot sector + +############################################################################ +# Linux 8086 executable +0 lelong&0xFF0000FF 0xC30000E9 Linux-Dev86 executable, headerless +>5 string . +>>4 string >\0 \b, libc version %s + +0 lelong&0xFF00FFFF 0x4000301 Linux-8086 executable +>2 byte&0x01 !0 \b, unmapped zero page +>2 byte&0x20 0 \b, impure +>2 byte&0x20 !0 +>>2 byte&0x10 !0 \b, A_EXEC +>2 byte&0x02 !0 \b, A_PAL +>2 byte&0x04 !0 \b, A_NSYM +>2 byte&0x08 !0 \b, A_STAND +>2 byte&0x40 !0 \b, A_PURE +>2 byte&0x80 !0 \b, A_TOVLY +>28 long !0 \b, not stripped +>37 string . +>>36 string >\0 \b, libc version %s + +# 0 lelong&0xFF00FFFF 0x10000301 ld86 I80386 executable +# 0 lelong&0xFF00FFFF 0xB000301 ld86 M68K executable +# 0 lelong&0xFF00FFFF 0xC000301 ld86 NS16K executable +# 0 lelong&0xFF00FFFF 0x17000301 ld86 SPARC executable + diff --git a/contrib/file/Magdir/lisp b/contrib/file/Magdir/lisp index 4e6c926..11f33cd 100644 --- a/contrib/file/Magdir/lisp +++ b/contrib/file/Magdir/lisp @@ -3,17 +3,24 @@ # lisp: file(1) magic for lisp programs # # various lisp types, from Daniel Quinlan (quinlan@yggdrasil.com) + +# This is a guess, but a good one. 0 string ;; Lisp/Scheme program text + # Emacs 18 - this is always correct, but not very magical. -0 string \012( byte-compiled Emacs-Lisp program data +0 string \012( Emacs v18 byte-compiled Lisp data # Emacs 19+ - ver. recognition added by Ian Springer -0 string ;ELC byte-compiled Emacs-Lisp program data, ->4 byte >0 version %d -# +# Also applies to XEmacs 19+ .elc files; could tell them apart if we had regexp +# support or similar - Chris Chittleborough <cchittleborough@yahoo.com.au> +0 string ;ELC +>4 byte >19 +>4 byte <32 Emacs/XEmacs v%d byte-compiled Lisp data + # Files produced by CLISP Common Lisp From: Bruno Haible <haible@ilog.fr> 0 string (SYSTEM::VERSION\040' CLISP byte-compiled Lisp program text 0 long 0x70768BD2 CLISP memory image data 0 long 0xD28B7670 CLISP memory image data, other endian + # Files produced by GNU gettext 0 long 0xDE120495 GNU-format message catalog data 0 long 0x950412DE GNU-format message catalog data diff --git a/contrib/file/Magdir/mcrypt b/contrib/file/Magdir/mcrypt index 6416104..e862f59 100644 --- a/contrib/file/Magdir/mcrypt +++ b/contrib/file/Magdir/mcrypt @@ -1,31 +1,36 @@ #------------------------------------------------------------------------------ # Mavroyanopoulos Nikos <nmav@hellug.gr> # mcrypt: file(1) magic for mcrypt 2.2.x; -0 string \0m\2 mcrypt 2.2 encrypted data, ->3 byte 0 algorithm: blowfish-448, ->3 byte 1 algorithm: DES, ->3 byte 2 algorithm: 3DES, ->3 byte 3 algorithm: 3-WAY, ->3 byte 4 algorithm: GOST, ->3 byte 6 algorithm: SAFER-SK64, ->3 byte 7 algorithm: SAFER-SK128, ->3 byte 8 algorithm: CAST-128, ->3 byte 9 algorithm: xTEA, ->3 byte 10 algorithm: TWOFISH-128, ->3 byte 11 algorithm: RC2, ->3 byte 12 algorithm: TWOFISH-192, ->3 byte 13 algorithm: TWOFISH-256, ->3 byte 14 algorithm: blowfish-128, ->3 byte 15 algorithm: blowfish-192, ->3 byte 16 algorithm: blowfish-256, ->3 byte 100 algorithm: RC6, ->3 byte 101 algorithm: IDEA, ->4 byte 0 mode: CBC, ->4 byte 1 mode: ECB, ->4 byte 2 mode: CFB, ->4 byte 3 mode: OFB, ->4 byte 4 mode: nOFB, ->5 byte 0 keymode: 8bit ->5 byte 1 keymode: 4bit ->5 byte 2 keymode: SHA-1 hash ->5 byte 3 keymode: MD5 hash +0 string \0m\3 mcrypt 2.5 encrypted data, +>4 string >\0 algorithm: %s, +>>&1 leshort >0 keysize: %d bytes, +>>>&0 string >\0 mode: %s, + +0 string \0m\2 mcrypt 2.2 encrypted data, +>3 byte 0 algorithm: blowfish-448, +>3 byte 1 algorithm: DES, +>3 byte 2 algorithm: 3DES, +>3 byte 3 algorithm: 3-WAY, +>3 byte 4 algorithm: GOST, +>3 byte 6 algorithm: SAFER-SK64, +>3 byte 7 algorithm: SAFER-SK128, +>3 byte 8 algorithm: CAST-128, +>3 byte 9 algorithm: xTEA, +>3 byte 10 algorithm: TWOFISH-128, +>3 byte 11 algorithm: RC2, +>3 byte 12 algorithm: TWOFISH-192, +>3 byte 13 algorithm: TWOFISH-256, +>3 byte 14 algorithm: blowfish-128, +>3 byte 15 algorithm: blowfish-192, +>3 byte 16 algorithm: blowfish-256, +>3 byte 100 algorithm: RC6, +>3 byte 101 algorithm: IDEA, +>4 byte 0 mode: CBC, +>4 byte 1 mode: ECB, +>4 byte 2 mode: CFB, +>4 byte 3 mode: OFB, +>4 byte 4 mode: nOFB, +>5 byte 0 keymode: 8bit +>5 byte 1 keymode: 4bit +>5 byte 2 keymode: SHA-1 hash +>5 byte 3 keymode: MD5 hash diff --git a/contrib/file/Magdir/mlssa b/contrib/file/Magdir/mlssa new file mode 100644 index 0000000..21ab61e --- /dev/null +++ b/contrib/file/Magdir/mlssa @@ -0,0 +1,7 @@ + +#------------------------------------------------------------------------------ +# mlssa: file(1) magic for MLSSA datafiles +# +0 lelong 0xffffabcd MLSSA datafile, +>4 leshort x algorithm %d, +>10 lelong x %d samples diff --git a/contrib/file/Magdir/nitpicker b/contrib/file/Magdir/nitpicker new file mode 100644 index 0000000..c40daec --- /dev/null +++ b/contrib/file/Magdir/nitpicker @@ -0,0 +1,12 @@ +#------------------------------------------------------------------------------ +# nitpicker: file(1) magic for Flowfiles. +# From: Christian Jachmann <C.Jachmann@gmx.net> http://www.nitpicker.de +0 string NPFF NItpicker Flow File +>4 byte x V%d. +>5 byte x %d +>6 bedate x started: %s +>10 bedate x stopped: %s +>14 belong x Bytes: %u +>18 belong x Bytes1: %u +>22 belong x Flows: %u +>26 belong x Pkts: %u diff --git a/contrib/file/Magdir/perl b/contrib/file/Magdir/perl new file mode 100644 index 0000000..28b6086 --- /dev/null +++ b/contrib/file/Magdir/perl @@ -0,0 +1,18 @@ + +#------------------------------------------------------------------------------ +# perl: file(1) magic for Larry Wall's perl language. +# +# The ``eval'' line recognizes an outrageously clever hack for USG systems. +# Keith Waclena <keith@cerberus.uchicago.edu> +# Send additions to <perl5-porters@perl.org> +0 string/b #!\ /bin/perl perl script text executable +0 string eval\ "exec\ /bin/perl perl script text +0 string/b #!\ /usr/bin/perl perl script text executable +0 string eval\ "exec\ /usr/bin/perl perl script text +0 string/b #!\ /usr/local/bin/perl perl script text +0 string eval\ "exec\ /usr/local/bin/perl perl script text executable + +# a couple more, by me +# XXX: christos matches +#0 regex package Perl5 module source text (via regex) +0 string package Perl5 module source text diff --git a/contrib/file/Magdir/printer b/contrib/file/Magdir/printer index c47ff3b..dfbd5b9 100644 --- a/contrib/file/Magdir/printer +++ b/contrib/file/Magdir/printer @@ -86,3 +86,7 @@ >45 string >0 face % # From Jukka Ukkonen 0 string \033[K\002\0\0\017\033(a\001\0\001\033(g Canon Bubble Jet BJC formatted data + +# From <mike@flyn.org> +# These are the /etc/magic entries to decode data sent to an Epson printer. +0 string \x1B\x40\x1B\x28\x52\x08\x00\x00REMOTE1P Epson Stylus Color 460 data diff --git a/contrib/file/Magdir/pulsar b/contrib/file/Magdir/pulsar new file mode 100644 index 0000000..a4a5c21 --- /dev/null +++ b/contrib/file/Magdir/pulsar @@ -0,0 +1,12 @@ + +#------------------------------------------------------------------------------ +# pulsar: file(1) magic for Pulsar POP3 daemon binary files +# +# http://pulsar.sourceforge.net +# mailto:rok.papez@lugos.si +# + +0 belong 0x1ee7f11e Pulsar POP3 daemon mailbox cache file. +>4 ubelong x Version: %d. +>8 ubelong x \b%d + diff --git a/contrib/file/Magdir/sendmail b/contrib/file/Magdir/sendmail index 503ef89..7880ab5 100644 --- a/contrib/file/Magdir/sendmail +++ b/contrib/file/Magdir/sendmail @@ -8,3 +8,12 @@ >16 string >\0 - version %s 0 short 0x271c Sendmail frozen configuration >16 string >\0 - version %s + +#------------------------------------------------------------------------------ +# sendmail: file(1) magic for sendmail m4(1) files +# +# From Hendrik Scholz <hendrik@scholz.net> +# i.e. files in /usr/share/sendmail/cf/ +# +0 string divert(-1)\n sendmail m4 text file + diff --git a/contrib/file/Magdir/tex b/contrib/file/Magdir/tex index 79d5bba..be84ecc 100644 --- a/contrib/file/Magdir/tex +++ b/contrib/file/Magdir/tex @@ -37,6 +37,10 @@ 0 string \\documentclass LaTeX 2e document text 0 string \\relax LaTeX auxiliary file 0 string \\contentsline LaTeX table of contents +0 string %\ -*-latex-*- LaTeX document text + +# Tex document, from Hendrik Scholz <hendrik@scholz.net> +0 string \\ifx TeX document text # Index and glossary files 0 string \\indexentry LaTeX raw index file @@ -44,4 +48,56 @@ 0 string \\glossaryentry LaTeX raw glossary 0 string \\begin{theglossary} LaTeX sorted glossary 0 string This\ is\ makeindex Makeindex log file + # End of TeX + +#------------------------------------------------------------------------------ +# file(1) magic for BibTex text files +# From Hendrik Scholz <hendrik@scholz.net> + +0 string @article{ BibTex text file +0 string @book{ BibTex text file +0 string @inbook{ BibTex text file +0 string @incollection{ BibTex text file +0 string @inproceedings{ BibTex text file +0 string @manual{ BibTex text file +0 string @misc{ BibTex text file +0 string @preamble{ BibTex text file +0 string @phdthesis{ BibTex text file +0 string @techreport{ BibTex text file +0 string @unpublished{ BibTex text file + +0 string @Article{ BibTex text file +0 string @Book{ BibTex text file +0 string @Inbook{ BibTex text file +0 string @Incollection{ BibTex text file +0 string @Inproceedings{ BibTex text file +0 string @Manual{ BibTex text file +0 string @Misc{ BibTex text file +0 string @Preamble{ BibTex text file +0 string @Phdthesis{ BibTex text file +0 string @Techreport{ BibTex text file +0 string @Unpublished{ BibTex text file + +0 string @ARTICLE{ BibTex text file +0 string @BOOK{ BibTex text file +0 string @INBOOK{ BibTex text file +0 string @INCOLLECTION{ BibTex text file +0 string @INPROCEEDINGS{ BibTex text file +0 string @MANUAL{ BibTex text file +0 string @MISC{ BibTex text file +0 string @PREAMBLE{ BibTex text file +0 string @PHDTHESIS{ BibTex text file +0 string @TECHREPORT{ BibTex text file +0 string @UNPUBLISHED{ BibTex text file + +73 string %%%\ \ BibTeX-file{ BibTex text file (with full header) + +73 string %%%\ \ @BibTeX-style-file{ BibTeX style text file (with full header) + +0 string %\ BibTeX\ standard\ bibliography\ BibTeX standard bibliography style text file + +0 string %\ BibTeX\ ` BibTeX custom bibliography style text file + +0 string @c\ @mapfile{ TeX font aliases text file + diff --git a/contrib/file/Magdir/tgif b/contrib/file/Magdir/tgif new file mode 100644 index 0000000..a6ffe36 --- /dev/null +++ b/contrib/file/Magdir/tgif @@ -0,0 +1,6 @@ +#------------------------------------------------------------------------------ +# file(1) magic for tgif(1) files +# From Hendrik Scholz <hendrik@scholz.net> + +0 string %TGIF\ 4 tgif version 4 object file + diff --git a/contrib/file/Magdir/varied.out b/contrib/file/Magdir/varied.out index 03ca510..76322dd 100644 --- a/contrib/file/Magdir/varied.out +++ b/contrib/file/Magdir/varied.out @@ -26,3 +26,7 @@ # gnu gmon magic From: Eugen Dedu <dedu@ese-metz.fr> 0 string gmon GNU prof performance data >4 long x - version %ld +# From: Dave Pearson <davep@davep.org> +# Harbour <URL:http://www.harbour-project.org/> HRB files. +0 string \xc0HRB Harbour HRB file +>4 short x version %d diff --git a/contrib/file/Magdir/vorbis b/contrib/file/Magdir/vorbis index 6e4efad..5e40842 100644 --- a/contrib/file/Magdir/vorbis +++ b/contrib/file/Magdir/vorbis @@ -4,6 +4,7 @@ # # From Felix von Leitner <leitner@fefe.de> # Extended by Beni Cherniavsky <cben@crosswinds.net> +# Further extended by Greg Wooledge <greg@wooledge.org> # # Most (everything but the number of channels and bitrate) is commented # out with `##' as it's not interesting to the average user. The most @@ -29,34 +30,44 @@ >>>>48 string <\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff \b, # The above tests if at least one of these is specified: >>>>>44 lelong !-1 ->>>>>>44 lelong x >%lu +# Vorbis RC2 has a bug which puts -1000 in the min/max bitrate fields +# instead of -1. +>>>>>>44 lelong !-1000 +>>>>>>>44 lelong x >%lu >>>>>48 lelong !-1 >>>>>>48 lelong x ~%lu >>>>>52 lelong !-1 ->>>>>>52 lelong x <%lu +>>>>>>52 lelong !-1000 +>>>>>>>52 lelong x <%lu >>>>>48 string <\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff kbps # -- Second vorbis header packet - the comments ->>>102 string \x03vorbis # A kludge to read the vendor string. It's a counted string, not a # zero-terminated one, so file(1) can't read it in a generic way. # libVorbis is the only one existing currently, so I detect specifically # it. The interesting value is the cvs date (8 digits decimal). -##>>>>113 string/c Xiphophorus\ libVorbis\ I \b, created by: Xiphophorus libVorbis I -##>>>>>137 string >00000000 %.8s +# Post-RC1 Ogg files have the second header packet (and thus the version) +# in a different place, so we must use an indirect offset. +>>>(84.b+85) string \x03vorbis +>>>>(84.b+96) string/c Xiphophorus\ libVorbis\ I \b, created by: Xiphophorus libVorbis I +>>>>>(84.b+120) string >00000000 %.8s # Map to beta version numbers: -##>>>>>>137 string <20000508 (<beta1 - prepublic) +>>>>>>(84.b+120) string <20000508 (<beta1 - prepublic) +>>>>>>(84.b+120) string 20000508 (beta1/2) +>>>>>>(84.b+120) string >20000508 +>>>>>>>(84.b+120) string <20001031 (beta2-3) +>>>>>>(84.b+120) string 20001031 (beta3) +>>>>>>(84.b+120) string >20001031 +>>>>>>>(84.b+120) string <20010225 (beta3-4) +>>>>>>(84.b+120) string 20010225 (beta4) +>>>>>>(84.b+120) string >20010225 +>>>>>>>(84.b+120) string <20010615 (beta4-RC1) +>>>>>>(84.b+120) string 20010615 (RC1) +>>>>>>(84.b+120) string 20010813 (RC2) +>>>>>>(84.b+120) string 20010816 (RC2 - Garf tuned v1) +>>>>>>(84.b+120) string 20011014 (RC2 - Garf tuned v2) +>>>>>>(84.b+120) string 20011217 (pre-RC3 CVS) +>>>>>>(84.b+120) string 20011231 (RC3) # The string has not changed from beta1 to 2 - they are indistinguishable. -##>>>>>>137 string 20000508 (beta1/2) -##>>>>>>137 string >20000508 -##>>>>>>>137 string <20001031 (beta2-3) -##>>>>>>137 string 20001031 (beta3) -##>>>>>>137 string >20001031 -##>>>>>>>137 string <20010225 (beta3-4) -##>>>>>>137 string 20010225 (beta4) -##>>>>>>137 string >20010225 -##>>>>>>>137 string <20010615 (beta4-RC1) -##>>>>>>137 string 20010615 (RC1) -##>>>>>>137 string >20010615 (>RC1) # Then come the comments, again length-counted (and number-counted). # Some looping constructs and registers would allow reading them but now # it's impossible. However we can print the number of comments present diff --git a/contrib/file/Magdir/vxl b/contrib/file/Magdir/vxl new file mode 100644 index 0000000..d3f5561 --- /dev/null +++ b/contrib/file/Magdir/vxl @@ -0,0 +1,13 @@ + +#------------------------------------------------------------------------------ +# VXL: file(1) magic for VXL binary IO data files +# +# from Ian Scott <scottim@sf.net> +# +# VXL is a collection of C++ libraries for Computer Vision. +# See the vsl chapter in the VXL Book for more info +# http://www.isbe.man.ac.uk/public_vxl_doc/books/vxl/book.html +# http:/vxl.sf.net + +2 lelong 0x472b2c4e VXL data file, +>0 leshort >0 schema version no %d |