diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2004-06-03 03:14:21 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2004-06-03 03:14:21 +0000 |
commit | 6ae9a9c3ff9f316b2f59d8aec767217158f3d5cd (patch) | |
tree | cb97f5624efe0be7ad46e8b83ca205da2d4f5688 /usr.bin | |
parent | f7123bd2ecd05d3faf2106f2a1b268c741043b08 (diff) |
merge in new magic from file 4.09. Mostly from Bruno Rohee
Diffstat (limited to 'usr.bin')
163 files changed, 4286 insertions, 219 deletions
diff --git a/usr.bin/file/magdir/386bsd b/usr.bin/file/magdir/386bsd index 77bbe9e52c9..60dbc95eb9f 100644 --- a/usr.bin/file/magdir/386bsd +++ b/usr.bin/file/magdir/386bsd @@ -1,3 +1,4 @@ +# $OpenBSD: 386bsd,v 1.2 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ # 386bsd: file(1) magic for 386BSD objects diff --git a/usr.bin/file/magdir/Localstuff b/usr.bin/file/magdir/Localstuff index c20418c3a38..b6960eb7295 100644 --- a/usr.bin/file/magdir/Localstuff +++ b/usr.bin/file/magdir/Localstuff @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ # Localstuff: file(1) magic for locally observed files # -# $OpenBSD: Localstuff,v 1.3 1997/02/09 23:58:40 millert Exp $ +# $OpenBSD: Localstuff,v 1.4 2004/06/03 03:14:19 tedu Exp $ # Add any locally observed files here. Remember: # text if readable, executable if runnable binary, data if unreadable. diff --git a/usr.bin/file/magdir/OpenBSD b/usr.bin/file/magdir/OpenBSD index b967521c328..e95757e689c 100644 --- a/usr.bin/file/magdir/OpenBSD +++ b/usr.bin/file/magdir/OpenBSD @@ -1,3 +1,4 @@ +# $OpenBSD: OpenBSD,v 1.11 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ # OpenBSD: file(1) magic for OpenBSD objects diff --git a/usr.bin/file/magdir/acorn b/usr.bin/file/magdir/acorn new file mode 100644 index 00000000000..8245a96b777 --- /dev/null +++ b/usr.bin/file/magdir/acorn @@ -0,0 +1,34 @@ +# $OpenBSD: acorn,v 1.1 2004/06/03 03:14:19 tedu Exp $ + +#------------------------------------------------------------------------------ +# 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/usr.bin/file/magdir/adi b/usr.bin/file/magdir/adi new file mode 100644 index 00000000000..a9c5a3f2302 --- /dev/null +++ b/usr.bin/file/magdir/adi @@ -0,0 +1,13 @@ +# $OpenBSD: adi,v 1.1 2004/06/03 03:14:19 tedu Exp $ + +#------------------------------------------------------------------------------ +# adi: file(1) magic for ADi's objects +# From Gregory McGarry <g.mcgarry@ieee.org> +# +0 leshort 0x521c COFF DSP21k +>18 lelong &02 executable, +>18 lelong ^02 +>>18 lelong &01 static object, +>>18 lelong ^01 relocatable object, +>18 lelong &010 stripped +>18 lelong ^010 not stripped diff --git a/usr.bin/file/magdir/allegro b/usr.bin/file/magdir/allegro new file mode 100644 index 00000000000..f3fc5bff8bf --- /dev/null +++ b/usr.bin/file/magdir/allegro @@ -0,0 +1,9 @@ +# $OpenBSD: allegro,v 1.1 2004/06/03 03:14:19 tedu Exp $ + +#------------------------------------------------------------------------------ +# allegro: file(1) magic for Allegro datafiles +# Toby Deshane <hac@shoelace.digivill.net> +# +0 belong 0x736C6821 Allegro datafile (packed) +0 belong 0x736C682E Allegro datafile (not packed/autodetect) +0 belong 0x736C682B Allegro datafile (appended exe data) diff --git a/usr.bin/file/magdir/alliant b/usr.bin/file/magdir/alliant index 69cf4b44d74..1cbe562c4aa 100644 --- a/usr.bin/file/magdir/alliant +++ b/usr.bin/file/magdir/alliant @@ -1,3 +1,4 @@ +# $OpenBSD: alliant,v 1.2 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ # alliant: file(1) magic for Alliant FX series a.out files diff --git a/usr.bin/file/magdir/alpha b/usr.bin/file/magdir/alpha index 4f84d971ac4..27f2efd82bb 100644 --- a/usr.bin/file/magdir/alpha +++ b/usr.bin/file/magdir/alpha @@ -1,4 +1,4 @@ -# $OpenBSD: alpha,v 1.2 2001/01/29 01:57:56 niklas Exp $ +# $OpenBSD: alpha,v 1.3 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ # alpha architecture description diff --git a/usr.bin/file/magdir/amanda b/usr.bin/file/magdir/amanda index 96bb873be62..e38340ccce7 100644 --- a/usr.bin/file/magdir/amanda +++ b/usr.bin/file/magdir/amanda @@ -1,4 +1,4 @@ -# $OpenBSD: amanda,v 1.3 2001/01/29 01:57:57 niklas Exp $ +# $OpenBSD: amanda,v 1.4 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ # amanda: file(1) magic for amanda file format diff --git a/usr.bin/file/magdir/amigaos b/usr.bin/file/magdir/amigaos index 22fc798e80c..572843bf97d 100644 --- a/usr.bin/file/magdir/amigaos +++ b/usr.bin/file/magdir/amigaos @@ -1,4 +1,4 @@ -# $OpenBSD: amigaos,v 1.3 2002/02/10 23:15:05 deraadt Exp $ +# $OpenBSD: amigaos,v 1.4 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ # amigaos: file(1) magic for AmigaOS binary formats: @@ -10,3 +10,63 @@ # 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 +# Too simple (short, pure ASCII, deep), MPi +#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 + +# The following are from: "Stefan A. Haubenthal" <polluks@web.de> +0 beshort 0x0f00 AmigaOS bitmap font +0 beshort 0x0f03 AmigaOS outline font +0 belong 0x80001001 AmigaOS outline tag +0 string ##\ version catalog translation + +0 string FORM IFF data +>8 string CTLG \b, CTLG message catalog +>8 string PREF \b, PREF preferences + +0 string Rar! RAR archive data, +>44 byte x v%0x, +>35 byte 0 os: MS-DOS +>35 byte 1 os: OS/2 +>35 byte 2 os: Win32 +>35 byte 3 os: Unix + +0 belong 0x000003fa AmigaOS shared library + +# Amiga disk types +# +0 string RDSK Rigid Disk Block +>160 string x on %.24s +0 string DOS\0 Amiga DOS disk +0 string DOS\1 Amiga FFS disk +0 string DOS\2 Amiga Inter DOS disk +0 string DOS\3 Amiga Inter FFS disk +0 string DOS\4 Amiga Fastdir DOS disk +0 string DOS\5 Amiga Fastdir FFS disk +0 string KICK Kickstart disk diff --git a/usr.bin/file/magdir/animation b/usr.bin/file/magdir/animation index 9d2dc8e69aa..b0af39fbd70 100644 --- a/usr.bin/file/magdir/animation +++ b/usr.bin/file/magdir/animation @@ -1,3 +1,4 @@ +# $OpenBSD: animation,v 1.3 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ # animation: file(1) magic for animation/movie formats @@ -7,7 +8,122 @@ # FLC, SGI, Apple originally from Daniel Quinlan (quinlan@yggdrasil.com) # MPEG animation format -0 string \000\000\001\263 MPEG file +0 belong 0x000001b3 MPEG video stream data +#>4 beshort&0xfff0 x (%d x +#>5 beshort&0x0fff x %d) +0 belong 0x000001ba MPEG system stream data + +# MPEG Audio (*.mpx) +# from dreesen@math.fu-berlin.de + +# 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 + +# 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 +# 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 +0 beshort&0xfff8 =0xfff0 MP +# Layer 3 +>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 +# freq +>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 +>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 + +#From: Johan Gade <jgade@diku.dk> + +# MPEG-4 Advanced Audio Coding (AAC) file (perhaps also MPEG-2 ACC?) +16 string M4A MPEG-4 Advanced Audio Coding file (AAC) + # FLI animation format 4 leshort 0xAF11 FLI file @@ -48,7 +164,78 @@ # \003. Most of them start with non-null values at hex offset 0x34 or so. #0 string \3\0\0\0\0\0\0\0\0\0\0\0 DL version 3 -# SGI and Apple formats +# SGI formats 0 string MOVI Silicon Graphics movie file + +# Apple Quicktime: Scan for all known top-level QT atom markers 4 string moov Apple QuickTime movie file (moov) 4 string mdat Apple QuickTime movie file (mdat) +4 string ftyp Apple QuickTime movie file (ftyp) +4 string free Apple QuickTime movie file (free) +4 string junk Apple QuickTime movie file (junk) +4 string pnot Apple QuickTime movie file (pnot) +4 string skip Apple QuickTime movie file (skip) +4 string wide Apple QuickTime movie file (wide) +4 string pict Apple QuickTime movie file (pict) + +# iso 13818 transport stream +# +# from Oskar Schirmer <schirmer@scara.com> Feb 3, 2001 (ISO 13818.1) +# (the following is a little bit restrictive and works fine for a stream +# that starts with PAT properly. it won't work for stream data, that is +# cut from an input device data right in the middle, but this shouldn't +# disturb) +# syncbyte 8 bit 0x47 +# error_ind 1 bit - +# payload_start 1 bit 1 +# priority 1 bit - +# PID 13 bit 0x0000 +# scrambling 2 bit - +# adaptfld_ctrl 2 bit 1 or 3 +# conti_count 4 bit 0 +0 belong&0xFF5FFF1F 0x47400010 MPEG transport stream data +>188 byte !0x47 CORRUPTED + +# DIF digital video file format <mpruett@sgi.com> +0 belong&0xffffff00 0x1f070000 DIF +>4 byte &0x01 (DVCPRO) movie file +>4 byte ^0x01 (DV) movie file +>3 byte &0x80 (PAL) +>3 byte ^0x80 (NTSC) + +# 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 +>>16 belong x %ld x +>>20 belong x %ld + +# JNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/> +0 string \x8bJNG JNG video data, +>4 belong !0x0d0a1a0a CORRUPTED, +>4 belong 0x0d0a1a0a +>>16 belong x %ld x +>>20 belong x %ld + +# Vivo video (Wolfram Kleff) +3 string \x0D\x0AVersion:Vivo Vivo video data + +# VRML (Virtual Reality Modelling Language) +0 string/b #VRML\ V1.0\ ascii VRML 1 file +0 string/b #VRML\ V2.0\ utf8 ISO/IEC 14772 VRML 97 file + +#--------------------------------------------------------------------------- +# HVQM4: compressed movie format designed by Hudson for Nintendo GameCube +# From Mark Sheppard <msheppard@climax.co.uk>, 2002-10-03 +# +0 string HVQM4 %s +>6 string >\0 v%s +>0 byte x GameCube movie, +>0x34 ubeshort x %d x +>0x36 ubeshort x %d, +>0x26 ubeshort x %dµs, +>0x42 ubeshort 0 no audio +>0x42 ubeshort >0 %dHz audio diff --git a/usr.bin/file/magdir/apl b/usr.bin/file/magdir/apl index 04004319193..326e2f9feda 100644 --- a/usr.bin/file/magdir/apl +++ b/usr.bin/file/magdir/apl @@ -1,3 +1,4 @@ +# $OpenBSD: apl,v 1.2 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ # apl: file(1) magic for APL (see also "pdp" and "vax" for other APL diff --git a/usr.bin/file/magdir/apple b/usr.bin/file/magdir/apple index 55acff1683b..7758b4a4f95 100644 --- a/usr.bin/file/magdir/apple +++ b/usr.bin/file/magdir/apple @@ -1,8 +1,130 @@ +# $OpenBSD: apple,v 1.4 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ -# apple: file(1) magic for Apple II file formats +# apple: file(1) magic for Apple file formats # 0 string FiLeStArTfIlEsTaRt binscii (apple ][) text 0 string \x0aGL Binary II (apple ][) data 0 string \x76\xff Squeezed (apple ][) data -0 string N\365F\351l\345 NuFile archive (apple ][) data +0 string NuFile NuFile archive (apple ][) data +0 string N\xf5F\xe9l\xe5 NuFile archive (apple ][) data +0 belong 0x00051600 AppleSingle encoded Macintosh file +0 belong 0x00051607 AppleDouble encoded Macintosh file + +# magic for Newton PDA package formats +# from Ruda Moura <ruda@helllabs.org> +0 string package0 Newton package, NOS 1.x, +>12 belong &0x80000000 AutoRemove, +>12 belong &0x40000000 CopyProtect, +>12 belong &0x10000000 NoCompression, +>12 belong &0x04000000 Relocation, +>12 belong &0x02000000 UseFasterCompression, +>16 belong x version %d + +0 string package1 Newton package, NOS 2.x, +>12 belong &0x80000000 AutoRemove, +>12 belong &0x40000000 CopyProtect, +>12 belong &0x10000000 NoCompression, +>12 belong &0x04000000 Relocation, +>12 belong &0x02000000 UseFasterCompression, +>16 belong x version %d + +0 string package4 Newton package, +>8 byte 8 NOS 1.x, +>8 byte 9 NOS 2.x, +>12 belong &0x80000000 AutoRemove, +>12 belong &0x40000000 CopyProtect, +>12 belong &0x10000000 NoCompression, + +# The following entries for the Apple II are for files that have +# been transferred as raw binary data from an Apple, without having +# been encapsulated by any of the above archivers. +# +# In general, Apple II formats are hard to identify because Apple DOS +# and especially Apple ProDOS have strong typing in the file system and +# therefore programmers never felt much need to include type information +# in the files themselves. +# +# Eric Fischer <enf@pobox.com> + +# AppleWorks word processor: +# +# This matches the standard tab stops for an AppleWorks file, but if +# a file has a tab stop set in the first four columns this will fail. +# +# The "O" is really the magic number, but that's so common that it's +# necessary to check the tab stops that follow it to avoid false positives. + +4 string O==== AppleWorks word processor data +>85 byte&0x01 >0 \b, zoomed +>90 byte&0x01 >0 \b, paginated +>92 byte&0x01 >0 \b, with mail merge +#>91 byte x \b, left margin %d + +# AppleWorks database: +# +# This isn't really a magic number, but it's the closest thing to one +# that I could find. The 1 and 2 really mean "order in which you defined +# categories" and "left to right, top to bottom," respectively; the D and R +# mean that the cursor should move either down or right when you press Return. + +#30 string \x01D AppleWorks database data +#30 string \x02D AppleWorks database data +#30 string \x01R AppleWorks database data +#30 string \x02R AppleWorks database data + +# AppleWorks spreadsheet: +# +# Likewise, this isn't really meant as a magic number. The R or C means +# row- or column-order recalculation; the A or M means automatic or manual +# recalculation. + +#131 string RA AppleWorks spreadsheet data +#131 string RM AppleWorks spreadsheet data +#131 string CA AppleWorks spreadsheet data +#131 string CM AppleWorks spreadsheet data + +# Applesoft BASIC: +# +# This is incredibly sloppy, but will be true if the program was +# written at its usual memory location of 2048 and its first line +# number is less than 256. Yuck. + +0 belong&0xff00ff 0x80000 Applesoft BASIC program data +#>2 leshort x \b, first line number %d + +# ORCA/EZ assembler: +# +# This will not identify ORCA/M source files, since those have +# some sort of date code instead of the two zero bytes at 6 and 7 +# XXX Conflicts with ELF +#4 belong&0xff00ffff 0x01000000 ORCA/EZ assembler source data +#>5 byte x \b, build number %d + +# Broderbund Fantavision +# +# I don't know what these values really mean, but they seem to recur. +# Will they cause too many conflicts? + +# Probably :-) +#2 belong&0xFF00FF 0x040008 Fantavision movie data + +# Some attempts at images. +# +# These are actually just bit-for-bit dumps of the frame buffer, so +# there's really no reasonably way to distinguish them except for their +# address (if preserved) -- 8192 or 16384 -- and their length -- 8192 +# or, occasionally, 8184. +# +# Nevertheless this will manage to catch a lot of images that happen +# to have a solid-colored line at the bottom of the screen. + +8144 string \x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F Apple II image with white background +8144 string \x55\x2A\x55\x2A\x55\x2A\x55\x2A Apple II image with purple background +8144 string \x2A\x55\x2A\x55\x2A\x55\x2A\x55 Apple II image with green background +8144 string \xD5\xAA\xD5\xAA\xD5\xAA\xD5\xAA Apple II image with blue background +8144 string \xAA\xD5\xAA\xD5\xAA\xD5\xAA\xD5 Apple II image with orange background + +# Beagle Bros. Apple Mechanic fonts + +0 belong&0xFF00FFFF 0x6400D000 Apple Mechanic font diff --git a/usr.bin/file/magdir/applix b/usr.bin/file/magdir/applix new file mode 100644 index 00000000000..87d1954df28 --- /dev/null +++ b/usr.bin/file/magdir/applix @@ -0,0 +1,13 @@ +# $OpenBSD: applix,v 1.1 2004/06/03 03:14:19 tedu Exp $ + +#------------------------------------------------------------------------------ +# applix: file(1) magic for Applixware +# From: Peter Soos <sp@osb.hu> +# +0 string *BEGIN Applixware +>7 string WORDS Words Document +>7 string GRAPHICS Graphic +>7 string RASTER Bitmap +>7 string SPREADSHEETS Spreadsheet +>7 string MACRO Macro +>7 string BUILDER Builder Object diff --git a/usr.bin/file/magdir/archive b/usr.bin/file/magdir/archive index f266b199808..95fec013ef8 100644 --- a/usr.bin/file/magdir/archive +++ b/usr.bin/file/magdir/archive @@ -1,3 +1,4 @@ +# $OpenBSD: archive,v 1.4 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ # archive: file(1) magic for archive formats (see also "msdos" for self- @@ -27,6 +28,16 @@ 0 string 070701 ASCII cpio archive (SVR4 with no CRC) 0 string 070702 ASCII cpio archive (SVR4 with CRC) +# Debian package (needs to go before regular portable archives) +# +0 string !<arch>\ndebian +>8 string debian-split part of multipart Debian package +>8 string debian-binary Debian binary package +>68 string >\0 (format %s) +>81 string bz2 \b, uses bzip2 compression +>84 string gz \b, uses gzip compression +#>136 ledate x created: %s + # other archives 0 long 0177555 very old archive 0 short 0177555 very old PDP-11 archive @@ -35,7 +46,7 @@ 0 long 0100554 apl workspace 0 string =<ar> archive -# MIPS archive (needs to go first) +# MIPS archive (needs to go before regular portable archives) # 0 string !<arch>\n__________E MIPS archive >20 string U with MIPS Ucode members @@ -65,8 +76,6 @@ # 0 string !<arch> current ar archive >8 string __.SYMDEF random library ->8 string debian-split part of multipart Debian package ->8 string debian-binary Debian binary package >0 belong =65538 - pre SR9.5 >0 belong =65539 - post SR9.5 >0 beshort 2 - object archive @@ -170,12 +179,14 @@ 2 string -lz5- LHarc 1.x archive data [lz5] # [never seen any but the last; -lh4- reported in comp.compression:] 2 string -lzs- LHa 2.x? archive data [lzs] -2 string -lh - LHa 2.x? archive data [lh ] +2 string -lh\40- LHa 2.x? archive data [lh ] 2 string -lhd- LHa 2.x? archive data [lhd] 2 string -lh2- LHa 2.x? archive data [lh2] 2 string -lh3- LHa 2.x? archive data [lh3] 2 string -lh4- LHa (2.x) archive data [lh4] 2 string -lh5- LHa (2.x) archive data [lh5] +2 string -lh6- LHa (2.x) archive data [lh6] +2 string -lh7- LHa (2.x) archive data [lh7] >20 byte x - header level %d # RAR archiver (Greg Roelofs, newt@uchicago.edu) @@ -208,3 +219,90 @@ # Shell archives 10 string #\ This\ is\ a\ shell\ archive shell archive text + +# +# LBR. NB: May conflict with the questionable +# "binary Computer Graphics Metafile" format. +# +0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data +# +# PMA (CP/M derivative of LHA) +# +2 string -pm0- PMarc archive data [pm0] +2 string -pm1- PMarc archive data [pm1] +2 string -pm2- PMarc archive data [pm2] +2 string -pms- PMarc SFX archive (CP/M, DOS) +5 string -pc1- PopCom compressed executable (CP/M) + +# From Rafael Laboissiere <rafael@laboissiere.net> +# The Project Revision Control System (see +# http://prcs.sourceforge.net) generates a packaged project +# file which is recognized by the following entry: +0 leshort 0xeb81 PRCS packaged project + +# Microsoft cabinets +# by David Necas (Yeti) <yeti@physics.muni.cz> +#0 string MSCF\0\0\0\0 Microsoft cabinet file data, +#>25 byte x v%d +#>24 byte x \b.%d +# MPi: All CABs have version 1.3, so this is pointless. +# Better magic in debian-additions. + +# GTKtalog catalogs +# by David Necas (Yeti) <yeti@physics.muni.cz> +4 string gtktalog\ GTKtalog catalog data, +>13 string 3 version 3 +>>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 + +# Felix von Leitner <felix-file@fefe.de> +0 string d8:announce BitTorrent file + +# Atari MSA archive - Teemu Hukkanen <tjhukkan@iki.fi> +0 beshort 0x0e0f Atari MSA archive data +>2 beshort x \b, %d sectors per track +>4 beshort 0 \b, 1 sided +>4 beshort 1 \b, 2 sided +>6 beshort x \b, starting track: %d +>8 beshort x \b, ending track: %d + +# Alternate ZIP string (amc@arwen.cs.berkeley.edu) +0 string PK00PK\003\004 Zip archive data + +# ACE archive (from http://www.wotsit.org/download.asp?f=ace) +# by Stefan `Sec` Zehl <sec@42.org> +7 string **ACE** ACE compressed archive +>15 byte >0 version %d +>16 byte =0x00 \b, from MS-DOS +>16 byte =0x01 \b, from OS/2 +>16 byte =0x02 \b, from Win/32 +>16 byte =0x03 \b, from Unix +>16 byte =0x04 \b, from MacOS +>16 byte =0x05 \b, from WinNT +>16 byte =0x06 \b, from Primos +>16 byte =0x07 \b, from AppleGS +>16 byte =0x08 \b, from Atari +>16 byte =0x09 \b, from Vax/VMS +>16 byte =0x0A \b, from Amiga +>16 byte =0x0B \b, from Next +>14 byte x \b, version %d to extract +>5 leshort &0x0080 \b, multiple volumes, +>>17 byte x \b (part %d), +>5 leshort &0x0002 \b, contains comment +>5 leshort &0x0200 \b, sfx +>5 leshort &0x0400 \b, small dictionary +>5 leshort &0x0800 \b, multi-volume +>5 leshort &0x1000 \b, contains AV-String +>>30 string\x16*UNREGISTERED\x20VERSION* (unregistered) +>5 leshort &0x2000 \b, with recovery record +>5 leshort &0x4000 \b, locked +>5 leshort &0x8000 \b, solid +# Date in MS-DOS format (whatever that is) +#>18 lelong x Created on diff --git a/usr.bin/file/magdir/asterix b/usr.bin/file/magdir/asterix index d89504a2407..8c350371b62 100644 --- a/usr.bin/file/magdir/asterix +++ b/usr.bin/file/magdir/asterix @@ -1,3 +1,4 @@ +# $OpenBSD: asterix,v 1.2 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ # asterix: file(1) magic for Aster*x; SunOS 5.5.1 gave the 4-character diff --git a/usr.bin/file/magdir/att3b b/usr.bin/file/magdir/att3b index 7723a7fb8e5..70985504fbf 100644 --- a/usr.bin/file/magdir/att3b +++ b/usr.bin/file/magdir/att3b @@ -1,3 +1,4 @@ +# $OpenBSD: att3b,v 1.2 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ # att3b: file(1) magic for AT&T 3B machines @@ -7,11 +8,12 @@ # # 3B20 # -0 beshort 0550 3b20 COFF executable ->12 belong >0 not stripped +# The 3B20 conflicts with SCCS. +#0 beshort 0550 3b20 COFF executable +#>12 belong >0 not stripped #>22 beshort >0 - version %ld -0 beshort 0551 3b20 COFF executable (TV) ->12 belong >0 not stripped +#0 beshort 0551 3b20 COFF executable (TV) +#>12 belong >0 not stripped #>22 beshort >0 - version %ld # # WE32K diff --git a/usr.bin/file/magdir/audio b/usr.bin/file/magdir/audio index 33f4226bb53..a166c8e87b8 100644 --- a/usr.bin/file/magdir/audio +++ b/usr.bin/file/magdir/audio @@ -1,3 +1,4 @@ +# $OpenBSD: audio,v 1.7 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ # audio: file(1) magic for sound formats (see also "iff") @@ -225,7 +226,3 @@ >3 byte&0xc0 0x40 joint-stereo >3 byte&0xc0 0x80 dual-channel >3 byte&0xc0 0xc0 mono - -# Ogg Vorbis -0 string Ogg Ogg Vorbis Audio - diff --git a/usr.bin/file/magdir/bFLT b/usr.bin/file/magdir/bFLT new file mode 100644 index 00000000000..19f6d50099b --- /dev/null +++ b/usr.bin/file/magdir/bFLT @@ -0,0 +1,14 @@ +# $OpenBSD: bFLT,v 1.1 2004/06/03 03:14:19 tedu Exp $ + +#------------------------------------------------------------------------------ +# bFLT: file(1) magic for BFLT uclinux binary files +# +# From Philippe De Muyter <phdm@macqel.be> +# +0 string bFLT BFLT executable +>4 belong x - version %ld +>4 belong 4 +>>36 belong&0x1 0x1 ram +>>36 belong&0x2 0x2 gotpic +>>36 belong&0x4 0x4 gzip +>>36 belong&0x8 0x8 gzdata diff --git a/usr.bin/file/magdir/blender b/usr.bin/file/magdir/blender new file mode 100644 index 00000000000..5dc3a3da9be --- /dev/null +++ b/usr.bin/file/magdir/blender @@ -0,0 +1,19 @@ +# $OpenBSD: blender,v 1.1 2004/06/03 03:14:19 tedu Exp $ + +#------------------------------------------------------------------------------ +# blender: file(1) magic for Blender 3D data files +# +# Coded by Guillermo S. Romero <gsromero@alumnos.euitt.upm.es> using the +# data from Ton Roosendaal <ton@blender.nl>. Ton or his company do not +# support the rule, so mail GSR if problems with it. Rule version: 1.1. +# You can get latest version with comments and details about the format +# at http://acd.asoc.euitt.upm.es/~gsromero/3d/blender/magic.blender + +0 string =BLENDER Blender3D, +>7 string =_ saved as 32-bits +>7 string =- saved as 64-bits +>8 string =v little endian +>8 string =V big endian +>9 byte x with version %c. +>10 byte x \b%c +>11 byte x \b%c diff --git a/usr.bin/file/magdir/blit b/usr.bin/file/magdir/blit index 7a470ed4a66..20946d181eb 100644 --- a/usr.bin/file/magdir/blit +++ b/usr.bin/file/magdir/blit @@ -1,3 +1,4 @@ +# $OpenBSD: blit,v 1.2 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ # blit: file(1) magic for 68K Blit stuff as seen from 680x0 machine diff --git a/usr.bin/file/magdir/bout b/usr.bin/file/magdir/bout index ab771fedec6..67e579f818a 100644 --- a/usr.bin/file/magdir/bout +++ b/usr.bin/file/magdir/bout @@ -1,3 +1,5 @@ +# $OpenBSD: bout,v 1.2 2004/06/03 03:14:19 tedu Exp $ + # # i80960 b.out objects and archives # diff --git a/usr.bin/file/magdir/bsdi b/usr.bin/file/magdir/bsdi index 2e3b646f6bd..f12f8c6d3ec 100644 --- a/usr.bin/file/magdir/bsdi +++ b/usr.bin/file/magdir/bsdi @@ -1,7 +1,43 @@ +# $OpenBSD: bsdi,v 1.2 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ # bsdi: file(1) magic for BSD/OS (from BSDI) objects # -0 lelong 000000314 BSD/OS i386 compact demand paged executable ->16 lelong >0 not stripped ->32 byte 0x6a (uses shared libs) + +0 lelong 0314 386 compact demand paged pure executable +>16 lelong >0 not stripped +>32 byte 0x6a (uses shared libs) + +0 lelong 0407 386 executable +>16 lelong >0 not stripped +>32 byte 0x6a (uses shared libs) + +0 lelong 0410 386 pure executable +>16 lelong >0 not stripped +>32 byte 0x6a (uses shared libs) + +0 lelong 0413 386 demand paged pure executable +>16 lelong >0 not stripped +>32 byte 0x6a (uses shared libs) + +# same as in SunOS 4.x, except for static shared libraries +0 belong&077777777 0600413 sparc demand paged +>0 byte &0x80 +>>20 belong <4096 shared library +>>20 belong =4096 dynamically linked executable +>>20 belong >4096 dynamically linked executable +>0 byte ^0x80 executable +>16 belong >0 not stripped +>36 belong 0xb4100001 (uses shared libs) + +0 belong&077777777 0600410 sparc pure +>0 byte &0x80 dynamically linked executable +>0 byte ^0x80 executable +>16 belong >0 not stripped +>36 belong 0xb4100001 (uses shared libs) + +0 belong&077777777 0600407 sparc +>0 byte &0x80 dynamically linked executable +>0 byte ^0x80 executable +>16 belong >0 not stripped +>36 belong 0xb4100001 (uses shared libs) diff --git a/usr.bin/file/magdir/c-lang b/usr.bin/file/magdir/c-lang index 1b0147595b7..fcfa862180f 100644 --- a/usr.bin/file/magdir/c-lang +++ b/usr.bin/file/magdir/c-lang @@ -1,3 +1,4 @@ +# $OpenBSD: c-lang,v 1.3 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ # c-lang: file(1) magic for C programs (or REXX) @@ -10,4 +11,15 @@ # this first will upset you if you're a PL/1 shop... # in which case rm it; ascmagic will catch real C programs #0 string /* C or REXX program text -0 string // C++ program text +#0 string // C++ program text + +# From: Mikhail Teterin <mi@aldan.algebra.com> +0 string cscope cscope reference data +>7 string x version %.2s +# We skip the path here, because it is often long (so file will +# truncate it) and mostly redundant. +# The inverted index functionality was added some time betwen +# versions 11 and 15, so look for -q if version is above 14: +>7 string >14 +>>10 regex .+\ -q\ with inverted index +>10 regex .+\ -c\ text (non-compressed) diff --git a/usr.bin/file/magdir/c64 b/usr.bin/file/magdir/c64 new file mode 100644 index 00000000000..ba9e57e1c9e --- /dev/null +++ b/usr.bin/file/magdir/c64 @@ -0,0 +1,28 @@ +# $OpenBSD: c64,v 1.1 2004/06/03 03:14:19 tedu Exp $ + +#------------------------------------------------------------------------------ +# c64: file(1) magic for various commodore 64 related files +# +# From <doj@cubic.org> + +0x16500 belong 0x12014100 D64 Image +0x16500 belong 0x12014180 D71 Image +0x61800 belong 0x28034400 D81 Image +0 string C64\40CARTRIDGE CCS C64 Emultar Cartridge Image +0 belong 0x43154164 X64 Image + +0 string GCR-1541 GCR Image +>8 byte x version: $i +>9 byte x tracks: %i + +9 string PSUR ARC archive (c64) +2 string -LH1- LHA archive (c64) + +0 string C64File PC64 Emulator file +>8 string >\0 "%s" +0 string C64Image PC64 Freezer Image + +0 beshort 0x38CD C64 PCLink Image +0 string CBM\144\0\0 Power 64 C64 Emulator Snapshot + +0 belong 0xFF424CFF WRAptor packer (c64) diff --git a/usr.bin/file/magdir/cad b/usr.bin/file/magdir/cad new file mode 100644 index 00000000000..e56a4d7d9b6 --- /dev/null +++ b/usr.bin/file/magdir/cad @@ -0,0 +1,37 @@ +# $OpenBSD: cad,v 1.1 2004/06/03 03:14:19 tedu Exp $ + +#------------------------------------------------------------------------------ +# autocad: file(1) magic for cad files +# + +# AutoCAD DWG versions R13/R14 (www.autodesk.com) +# Written December 01, 2003 by Lester Hightower +# Based on the DWG File Format Specifications at http://www.opendwg.org/ +0 string \101\103\061\060\061 AutoCAD +>5 string \062\000\000\000\000 DWG ver. R13 +>5 string \064\000\000\000\000 DWG ver. R14 + +# Microstation DGN/CIT Files (www.bentley.com) +# Written October 30, 2003 by Lester Hightower +# DGN is the default file extension of Microstation/Intergraph CAD files. +# CIT is the proprietary raster format (similar to TIFF) used to attach +# raster underlays to Microstation DGN (vector) drawings. +# +# http://www.wotsit.org/search.asp +# http://filext.com/detaillist.php?extdetail=DGN +# http://filext.com/detaillist.php?extdetail=CIT +# +# http://www.bentley.com/products/default.cfm?objectid=97F351F5-9C35-4E5E-89C2 +# 3F86C928&method=display&p_objectid=97F351F5-9C35-4E5E-89C280A93F86C928 +# http://www.bentley.com/products/default.cfm?objectid=A5C2FD43-3AC9-4C71-B682 +# 721C479F&method=display&p_objectid=A5C2FD43-3AC9-4C71-B682C7BE721C479F +0 string \010\011\376 Microstation +>3 string \002 +>>30 string \372\104 DGN File +>>30 string \172\104 DGN File +>>30 string \026\105 DGN File +>4 string \030\000\000 CIT File + +# AutoCad, from Nahuel Greco +0 string AC1012 AutoCad (release 12) +0 string AC1014 AutoCad (release 14) diff --git a/usr.bin/file/magdir/cddb b/usr.bin/file/magdir/cddb new file mode 100644 index 00000000000..e0f555f0cde --- /dev/null +++ b/usr.bin/file/magdir/cddb @@ -0,0 +1,12 @@ +# $OpenBSD: cddb,v 1.1 2004/06/03 03:14:19 tedu Exp $ + +#------------------------------------------------------------------------------ +# 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/usr.bin/file/magdir/chi b/usr.bin/file/magdir/chi index ee450f55588..6b91cf42865 100644 --- a/usr.bin/file/magdir/chi +++ b/usr.bin/file/magdir/chi @@ -1,3 +1,4 @@ +# $OpenBSD: chi,v 1.2 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ # chi: file(1) magic for ChiWriter files diff --git a/usr.bin/file/magdir/chord b/usr.bin/file/magdir/chord new file mode 100644 index 00000000000..281896b2cce --- /dev/null +++ b/usr.bin/file/magdir/chord @@ -0,0 +1,10 @@ +# $OpenBSD: chord,v 1.1 2004/06/03 03:14:19 tedu Exp $ + +#------------------------------------------------------------------------------ +# chord: file(1) magic for Chord music sheet typesetting utility input files +# +# From Philippe De Muyter <phdm@macqel.be> +# File format is actually free, but many distributed files begin with `{title' +# +0 string {title Chord text file + diff --git a/usr.bin/file/magdir/cisco b/usr.bin/file/magdir/cisco new file mode 100644 index 00000000000..95ff7461473 --- /dev/null +++ b/usr.bin/file/magdir/cisco @@ -0,0 +1,12 @@ +# $OpenBSD: cisco,v 1.1 2004/06/03 03:14:19 tedu Exp $ + +#------------------------------------------------------------------------------ +# cisco: file(1) magic for cisco Systems routers +# +# Most cisco file-formats are covered by the generic elf code +# +# Microcode files are non-ELF, 0x8501 conflicts with NetBSD/alpha. +0 belong&0xffffff00 0x85011400 cisco IOS microcode +>7 string >\0 for '%s' +0 belong&0xffffff00 0x8501cb00 cisco IOS experimental microcode +>7 string >\0 for '%s' diff --git a/usr.bin/file/magdir/citrus b/usr.bin/file/magdir/citrus new file mode 100644 index 00000000000..3a4def55034 --- /dev/null +++ b/usr.bin/file/magdir/citrus @@ -0,0 +1,8 @@ +# $OpenBSD: citrus,v 1.1 2004/06/03 03:14:19 tedu Exp $ + +#------------------------------------------------------------------------------ +# citrus locale declaration +# + +0 string RuneCT Citrus locale declaration for LC_CTYPE + diff --git a/usr.bin/file/magdir/clipper b/usr.bin/file/magdir/clipper index c325cb8f7c7..b218446e9f1 100644 --- a/usr.bin/file/magdir/clipper +++ b/usr.bin/file/magdir/clipper @@ -1,3 +1,4 @@ +# $OpenBSD: clipper,v 1.2 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ # clipper: file(1) magic for Intergraph (formerly Fairchild) Clipper. diff --git a/usr.bin/file/magdir/commands b/usr.bin/file/magdir/commands index 8a276070736..f9d86514bb5 100644 --- a/usr.bin/file/magdir/commands +++ b/usr.bin/file/magdir/commands @@ -1,3 +1,4 @@ +# $OpenBSD: commands,v 1.3 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ # commands: file(1) magic for various shells and interpreters diff --git a/usr.bin/file/magdir/compress b/usr.bin/file/magdir/compress index a797f8fff5d..7b85ed9346b 100644 --- a/usr.bin/file/magdir/compress +++ b/usr.bin/file/magdir/compress @@ -1,3 +1,4 @@ +# $OpenBSD: compress,v 1.4 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ # compress: file(1) magic for pure-compression formats (no archives) @@ -14,37 +15,40 @@ >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, ->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 >2 belong >1 \b, %d characters originally >2 belong =1 \b, %d character originally # -# This magic number is byte-order-independent. XXX - Does that mean this -# is big-endian, little-endian, either, or that you can't tell? -# this short is valid for SunOS -0 short 017437 old packed data +# This magic number is byte-order-independent. +0 short 0x1f1f old packed data # XXX - why *two* entries for "compacted data", one of which is # byte-order independent, and one of which is byte-order dependent? @@ -55,13 +59,18 @@ 0 string \377\037 compacted data 0 short 0145405 huf output -# Squeeze and Crunch... -# These numbers were gleaned from the Unix versions of the programs to -# handle these formats. Note that I can only uncrunch, not crunch, and -# I didn't have a crunched file handy, so the crunch number is untested. -# Keith Waclena <keith@cerberus.uchicago.edu> -0 leshort 0x76FF squeezed data (CP/M, DOS) -0 leshort 0x76FE crunched data (CP/M, DOS) +# bzip2 +0 string BZh bzip2 compressed data +>3 byte >47 \b, block size = %c00k + +# squeeze and crunch +# Michael Haardt <michael@cantor.informatik.rwth-aachen.de> +0 beshort 0x76FF squeezed data, +>4 string x original name %s +0 beshort 0x76FE crunched data, +>2 string x original name %s +0 beshort 0x76FD LZH compressed data, +>2 string x original name %s # Freeze 0 string \037\237 frozen file 2.1 @@ -85,8 +94,80 @@ #>99 byte&0xF0 0xd0 #>132 byte&0xF0 0xd0 GSM 06.10 compressed audio -# Bzip from ulmo@Q.Net -0 string BZ bzip compressed data, ->2 byte x format v. %c, ->3 byte x block size indicator %c +# bzip a block-sorting file compressor +# by Julian Seward <sewardj@cs.man.ac.uk> and others +# +0 string BZ bzip compressed data +>2 byte x \b, version: %c +>3 string =1 \b, compression block size 100k +>3 string =2 \b, compression block size 200k +>3 string =3 \b, compression block size 300k +>3 string =4 \b, compression block size 400k +>3 string =5 \b, compression block size 500k +>3 string =6 \b, compression block size 600k +>3 string =7 \b, compression block size 700k +>3 string =8 \b, compression block size 800k +>3 string =9 \b, compression block size 900k + +# lzop from <markus.oberhumer@jk.uni-linz.ac.at> +0 string \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a lzop compressed data +>9 beshort <0x0940 +>>9 byte&0xf0 =0x00 - version 0. +>>9 beshort&0x0fff x \b%03x, +>>13 byte 1 LZO1X-1, +>>13 byte 2 LZO1X-1(15), +>>13 byte 3 LZO1X-999, +## >>22 bedate >0 last modified: %s, +>>14 byte =0x00 os: MS-DOS +>>14 byte =0x01 os: Amiga +>>14 byte =0x02 os: VMS +>>14 byte =0x03 os: Unix +>>14 byte =0x05 os: Atari +>>14 byte =0x06 os: OS/2 +>>14 byte =0x07 os: MacOS +>>14 byte =0x0A os: Tops/20 +>>14 byte =0x0B os: WinNT +>>14 byte =0x0E os: Win32 +>9 beshort >0x0939 +>>9 byte&0xf0 =0x00 - version 0. +>>9 byte&0xf0 =0x10 - version 1. +>>9 byte&0xf0 =0x20 - version 2. +>>9 beshort&0x0fff x \b%03x, +>>15 byte 1 LZO1X-1, +>>15 byte 2 LZO1X-1(15), +>>15 byte 3 LZO1X-999, +## >>25 bedate >0 last modified: %s, +>>17 byte =0x00 os: MS-DOS +>>17 byte =0x01 os: Amiga +>>17 byte =0x02 os: VMS +>>17 byte =0x03 os: Unix +>>17 byte =0x05 os: Atari +>>17 byte =0x06 os: OS/2 +>>17 byte =0x07 os: MacOS +>>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 + +# From: Cory Dikkers <cdikkers@swbell.net> +0 string XPKF Amiga xpkf.library compressed data +0 string PP11 Power Packer 1.1 compressed data +0 string PP20 Power Packer 2.0 compressed data, +>4 belong 0x09090909 fast compression +>4 belong 0x090A0A0A mediocre compression +>4 belong 0x090A0B0B good compression +>4 belong 0x090A0C0C very good compression +>4 belong 0x090A0C0D best compression + +# 7z archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at) +# http://www.7-zip.org or DOC/7zFormat.txt +# +0 string 7z\274\257\047\034 7z archive data, +>6 byte x version %d +>7 byte x \b.%d +# AFX compressed files (Wolfram Kleff) +2 string -afx- AFX compressed file data diff --git a/usr.bin/file/magdir/console b/usr.bin/file/magdir/console new file mode 100644 index 00000000000..07bf9527cb6 --- /dev/null +++ b/usr.bin/file/magdir/console @@ -0,0 +1,157 @@ +# $OpenBSD: console,v 1.1 2004/06/03 03:14:19 tedu Exp $ + +#------------------------------------------------------------------------------ +# Console game magic +# Toby Deshane <hac@shoelace.digivill.net> +# ines: file(1) magic for Marat's iNES Nintendo Entertainment System +# ROM dump format + +0 string NES\032 iNES ROM dump, +>4 byte x %dx16k PRG +>5 byte x \b, %dx8k CHR +>6 byte&0x01 =0x1 \b, [Vert.] +>6 byte&0x01 =0x0 \b, [Horiz.] +>6 byte&0x02 =0x2 \b, [SRAM] +>6 byte&0x04 =0x4 \b, [Trainer] +>6 byte&0x04 =0x8 \b, [4-Scr] + +#------------------------------------------------------------------------------ +# gameboy: file(1) magic for the Nintendo (Color) Gameboy raw ROM format +# +0x104 belong 0xCEED6666 Gameboy ROM: +>0x134 string >\0 "%.16s" +>0x146 byte 0x03 \b,[SGB] +>0x147 byte 0x00 \b, [ROM ONLY] +>0x147 byte 0x01 \b, [ROM+MBC1] +>0x147 byte 0x02 \b, [ROM+MBC1+RAM] +>0x147 byte 0x03 \b, [ROM+MBC1+RAM+BATT] +>0x147 byte 0x05 \b, [ROM+MBC2] +>0x147 byte 0x06 \b, [ROM+MBC2+BATTERY] +>0x147 byte 0x08 \b, [ROM+RAM] +>0x147 byte 0x09 \b, [ROM+RAM+BATTERY] +>0x147 byte 0x0B \b, [ROM+MMM01] +>0x147 byte 0x0C \b, [ROM+MMM01+SRAM] +>0x147 byte 0x0D \b, [ROM+MMM01+SRAM+BATT] +>0x147 byte 0x0F \b, [ROM+MBC3+TIMER+BATT] +>0x147 byte 0x10 \b, [ROM+MBC3+TIMER+RAM+BATT] +>0x147 byte 0x11 \b, [ROM+MBC3] +>0x147 byte 0x12 \b, [ROM+MBC3+RAM] +>0x147 byte 0x13 \b, [ROM+MBC3+RAM+BATT] +>0x147 byte 0x19 \b, [ROM+MBC5] +>0x147 byte 0x1A \b, [ROM+MBC5+RAM] +>0x147 byte 0x1B \b, [ROM+MBC5+RAM+BATT] +>0x147 byte 0x1C \b, [ROM+MBC5+RUMBLE] +>0x147 byte 0x1D \b, [ROM+MBC5+RUMBLE+SRAM] +>0x147 byte 0x1E \b, [ROM+MBC5+RUMBLE+SRAM+BATT] +>0x147 byte 0x1F \b, [Pocket Camera] +>0x147 byte 0xFD \b, [Bandai TAMA5] +>0x147 byte 0xFE \b, [Hudson HuC-3] +>0x147 byte 0xFF \b, [Hudson HuC-1] + +>0x148 byte 0 \b, ROM: 256Kbit +>0x148 byte 1 \b, ROM: 512Kbit +>0x148 byte 2 \b, ROM: 1Mbit +>0x148 byte 3 \b, ROM: 2Mbit +>0x148 byte 4 \b, ROM: 4Mbit +>0x148 byte 5 \b, ROM: 8Mbit +>0x148 byte 6 \b, ROM: 16Mbit +>0x148 byte 0x52 \b, ROM: 9Mbit +>0x148 byte 0x53 \b, ROM: 10Mbit +>0x148 byte 0x54 \b, ROM: 12Mbit + +>0x149 byte 1 \b, RAM: 16Kbit +>0x149 byte 2 \b, RAM: 64Kbit +>0x149 byte 3 \b, RAM: 128Kbit +>0x149 byte 4 \b, RAM: 1Mbit + +#>0x14e long x \b, CRC: %x + +#------------------------------------------------------------------------------ +# genesis: file(1) magic for the Sega MegaDrive/Genesis raw ROM format +# +0x100 string SEGA Sega MegaDrive/Genesis raw ROM dump +>0x120 string >\0 Name: "%.16s" +>0x110 string >\0 %.16s +>0x1B0 string RA with SRAM + +#------------------------------------------------------------------------------ +# genesis: file(1) magic for the Super MegaDrive ROM dump format +# +0x280 string EAGN Super MagicDrive ROM dump +>0 byte x %dx16k blocks +>2 byte 0 \b, last in series or standalone +>2 byte >0 \b, split ROM +>8 byte 0xAA +>9 byte 0xBB + +#------------------------------------------------------------------------------ +# genesis: file(1) alternate magic for the Super MegaDrive ROM dump format +# +0x280 string EAMG Super MagicDrive ROM dump +>0 byte x %dx16k blocks +>2 byte x \b, last in series or standalone +>8 byte 0xAA +>9 byte 0xBB + +#------------------------------------------------------------------------------ +# smsgg: file(1) magic for Sega Master System and Game Gear ROM dumps +# +# Does not detect all images. Very preliminary guesswork. Need more data +# on format. +# +# FIXME: need a little more info...;P +# +#0 byte 0xF3 +#>1 byte 0xED Sega Master System/Game Gear ROM dump +#>1 byte 0x31 Sega Master System/Game Gear ROM dump +#>1 byte 0xDB Sega Master System/Game Gear ROM dump +#>1 byte 0xAF Sega Master System/Game Gear ROM dump +#>1 byte 0xC3 Sega Master System/Game Gear ROM dump + +#------------------------------------------------------------------------------ +# dreamcast: file(1) uncertain magic for the Sega Dreamcast VMU image format +# +0 belong 0x21068028 Sega Dreamcast VMU game image +0 string LCDi Dream Animator file + +#------------------------------------------------------------------------------ +# v64: file(1) uncertain magic for the V64 format N64 ROM dumps +# +0 belong 0x37804012 V64 Nintendo 64 ROM dump + +#------------------------------------------------------------------------------ +# msx: file(1) magic for MSX game cartridge dumps +# Too simple - MPi +#0 beshort 0x4142 MSX game cartridge dump + +#------------------------------------------------------------------------------ +# Sony Playstation executables (Adam Sjoegren <asjo@diku.dk>) : +0 string PS-X\ EXE Sony Playstation executable +# Area: +>113 string x (%s) + +#------------------------------------------------------------------------------ +# Microsoft Xbox executables .xbe (Esa Hyytiä <ehyytia@cc.hut.fi>) +0 string XBEH XBE, Microsoft Xbox executable +# probabilistic checks whether signed or not +>0x0004 ulelong =0x0 +>>&2 ulelong =0x0 +>>>&2 ulelong =0x0 \b, not signed +>0x0004 ulelong >0 +>>&2 ulelong >0 +>>>&2 ulelong >0 \b, signed +# expect base address of 0x10000 +>0x0104 ulelong =0x10000 +>>(0x0118-0x0FF60) ulelong&0x80000007 0x80000007 \b, all regions +>>(0x0118-0x0FF60) ulelong&0x80000007 !0x80000007 +>>>(0x0118-0x0FF60) ulelong >0 (regions: +>>>>(0x0118-0x0FF60) ulelong &0x00000001 NA +>>>>(0x0118-0x0FF60) ulelong &0x00000002 Japan +>>>>(0x0118-0x0FF60) ulelong &0x00000004 Rest_of_World +>>>>(0x0118-0x0FF60) ulelong &0x80000000 Manufacturer +>>>(0x0118-0x0FF60) ulelong >0 \b) + +# -------------------------------- +# Microsoft Xbox data file formats +0 string XIP0 XIP, Microsoft Xbox data +0 string XTF0 XTF, Microsoft Xbox data diff --git a/usr.bin/file/magdir/convex b/usr.bin/file/magdir/convex index 565ba61ba6c..d4bd34d8590 100644 --- a/usr.bin/file/magdir/convex +++ b/usr.bin/file/magdir/convex @@ -1,4 +1,4 @@ -# $OpenBSD: convex,v 1.3 2001/01/29 01:57:57 niklas Exp $ +# $OpenBSD: convex,v 1.4 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ # convex: file(1) magic for Convex boxes diff --git a/usr.bin/file/magdir/ctags b/usr.bin/file/magdir/ctags new file mode 100644 index 00000000000..f32a3e420ae --- /dev/null +++ b/usr.bin/file/magdir/ctags @@ -0,0 +1,6 @@ +# $OpenBSD: ctags,v 1.1 2004/06/03 03:14:19 tedu Exp $ + +# ---------------------------------------------------------------------------- +# ctags: file (1) magic for Exuberant Ctags files +# From: Alexander Mai <mai@migdal.ikp.physik.tu-darmstadt.de> +0 string !_TAG Exuberant Ctags tag file text diff --git a/usr.bin/file/magdir/dact b/usr.bin/file/magdir/dact new file mode 100644 index 00000000000..721aaae03b7 --- /dev/null +++ b/usr.bin/file/magdir/dact @@ -0,0 +1,11 @@ +# $OpenBSD: dact,v 1.1 2004/06/03 03:14:19 tedu Exp $ + +#------------------------------------------------------------------------------ +# dact: file(1) magic for DACT compressed files +# +0 long 0x444354C3 DACT compressed data +>4 byte >-1 (version %i. +>5 byte >-1 $BS%i. +>6 byte >-1 $BS%i) +>7 long >0 $BS, original size: %i bytes +>15 long >30 $BS, block size: %i bytes diff --git a/usr.bin/file/magdir/database b/usr.bin/file/magdir/database index 146c3108e1e..f5545ece640 100644 --- a/usr.bin/file/magdir/database +++ b/usr.bin/file/magdir/database @@ -1,3 +1,4 @@ +# $OpenBSD: database,v 1.4 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ # database: file(1) magic for various databases @@ -12,27 +13,192 @@ 0 lelong 0x13579ace GNU dbm 1.x or ndbm database, little endian 0 string GDBM GNU dbm 2.x database # -0 belong 0x061561 Berkeley DB Hash file ->4 belong >0 (Version %d, ->8 belong 1234 Little Endian, ->8 belong 4321 Big Endian, ->12 belong x Bucket Size %d, ->16 belong x Bucket Shift %d, ->20 belong x Directory Size %d, ->24 belong x Segment Size %d, ->28 belong x Segment Shift %d, ->32 belong x Overflow Point %d, ->36 belong x Last Freed %d, ->40 belong x Max Bucket %d, ->44 belong x High Mask 0x%x, ->48 belong x Low Mask 0x%x, ->52 belong x Fill Factor %d, ->56 belong x Number of Keys %d) -# -# -0 belong 0x053162 Berkeley DB Btree file ->4 belong >0 (Version %d, ->8 belong x Page Size %d, ->12 belong x Free Page %d, ->16 belong x Number of Records %d, ->20 belong x Flags 0x%x) +# Berkeley DB +# +# Ian Darwin's file /etc/magic files: big/little-endian version. +# +# Hash 1.85/1.86 databases store metadata in network byte order. +# Btree 1.85/1.86 databases store the metadata in host byte order. +# Hash and Btree 2.X and later databases store the metadata in host byte order. + +0 long 0x00061561 Berkeley DB +>8 belong 4321 +>>4 belong >2 1.86 +>>4 belong <3 1.85 +>>4 belong >0 (Hash, version %d, native byte-order) +>8 belong 1234 +>>4 belong >2 1.86 +>>4 belong <3 1.85 +>>4 belong >0 (Hash, version %d, little-endian) + +0 belong 0x00061561 Berkeley DB +>8 belong 4321 +>>4 belong >2 1.86 +>>4 belong <3 1.85 +>>4 belong >0 (Hash, version %d, big-endian) +>8 belong 1234 +>>4 belong >2 1.86 +>>4 belong <3 1.85 +>>4 belong >0 (Hash, version %d, native byte-order) + +0 long 0x00053162 Berkeley DB 1.85/1.86 +>4 long >0 (Btree, version %d, native byte-order) +0 belong 0x00053162 Berkeley DB 1.85/1.86 +>4 belong >0 (Btree, version %d, big-endian) +0 lelong 0x00053162 Berkeley DB 1.85/1.86 +>4 lelong >0 (Btree, version %d, little-endian) + +12 long 0x00061561 Berkeley DB +>16 long >0 (Hash, version %d, native byte-order) +12 belong 0x00061561 Berkeley DB +>16 belong >0 (Hash, version %d, big-endian) +12 lelong 0x00061561 Berkeley DB +>16 lelong >0 (Hash, version %d, little-endian) + +12 long 0x00053162 Berkeley DB +>16 long >0 (Btree, version %d, native byte-order) +12 belong 0x00053162 Berkeley DB +>16 belong >0 (Btree, version %d, big-endian) +12 lelong 0x00053162 Berkeley DB +>16 lelong >0 (Btree, version %d, little-endian) + +12 long 0x00042253 Berkeley DB +>16 long >0 (Queue, version %d, native byte-order) +12 belong 0x00042253 Berkeley DB +>16 belong >0 (Queue, version %d, big-endian) +12 lelong 0x00042253 Berkeley DB +>16 lelong >0 (Queue, version %d, little-endian) +# +# +# 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) + +# XXX: Weak magic. +# Alex Ott <ott@jet.msk.su> +## Paradox file formats +#2 leshort 0x0800 Paradox +#>0x39 byte 3 v. 3.0 +#>0x39 byte 4 v. 3.5 +#>0x39 byte 9 v. 4.x +#>0x39 byte 10 v. 5.x +#>0x39 byte 11 v. 5.x +#>0x39 byte 12 v. 7.x +#>>0x04 byte 0 indexed .DB data file +#>>0x04 byte 1 primary index .PX file +#>>0x04 byte 2 non-indexed .DB data file +#>>0x04 byte 3 non-incrementing secondary index .Xnn file +#>>0x04 byte 4 secondary index .Ynn file +#>>0x04 byte 5 incrementing secondary index .Xnn file +#>>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 +#>>>0x04 lelong 0 (no records) +#>>>0x04 lelong >0 (%ld records) +# +#0 byte 0x03 +#>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 +#>8 leshort >0 +#>>12 leshort 0 dBASE IV no memo file +#>>>0x04 lelong 0 (no records) +#>>>0x04 lelong >0 (%ld records) +# +#0 byte 0x05 +#>8 leshort >0 +#>>12 leshort 0 dBASE V no memo file +#>>>0x04 lelong 0 (no records) +#>>>0x04 lelong >0 (%ld records) +# +#0 byte 0x30 +#>8 leshort >0 +#>>12 leshort 0 Visual FoxPro +#>>>0x04 lelong 0 (no records) +#>>>0x04 lelong >0 (%ld records) +# +#0 byte 0x43 +#>8 leshort >0 +#>>12 leshort 0 FlagShip with memo var size +#>>>0x04 lelong 0 (no records) +#>>>0x04 lelong >0 (%ld records) +# +#0 byte 0x7b +#>8 leshort >0 +#>>12 leshort 0 dBASEIV with memo +#>>>0x04 lelong 0 (no records) +#>>>0x04 lelong >0 (%ld records) +# +#0 byte 0x83 +#>8 leshort >0 +#>>12 leshort 0 FoxBase+, dBaseIII+ with memo +#>>>0x04 lelong 0 (no records) +#>>>0x04 lelong >0 (%ld records) +# +#0 byte 0x8b +#>8 leshort >0 +#>>12 leshort 0 dBaseIV with memo +#>>>0x04 lelong 0 (no records) +#>>>0x04 lelong >0 (%ld records) +# +#0 byte 0x8e +#>8 leshort >0 +#>>12 leshort 0 dBaseIV with SQL Table +#>>>0x04 lelong 0 (no records) +#>>>0x04 lelong >0 (%ld records) +# +#0 byte 0xb3 +#>8 leshort >0 +#>>12 leshort 0 FlagShip with .dbt memo +#>>>0x04 lelong 0 (no records) +#>>>0x04 lelong >0 (%ld records) +# +#0 byte 0xf5 +#>8 leshort >0 +#>>12 leshort 0 FoxPro with memo +#>>>0x04 lelong 0 (no records) +#>>>0x04 lelong >0 (%ld records) +# +#0 leshort 0x0006 DBase 3 index file + +# MS Access database +4 string Standard\ Jet\ DB Microsoft Access Database + +# TDB database from Samba et al - Martin Pool <mbp@samba.org> +0 string TDB\ file TDB database +>32 lelong 0x2601196D version 6, little-endian +>>36 lelong x hash size %d bytes + +# 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 + +# ICE authority file data (Wolfram Kleff) +2 string ICE ICE authority data + +# X11 Xauthority file (Wolfram Kleff) +10 string MIT-MAGIC-COOKIE-1 X11 Xauthority data +11 string MIT-MAGIC-COOKIE-1 X11 Xauthority data +12 string MIT-MAGIC-COOKIE-1 X11 Xauthority data +13 string MIT-MAGIC-COOKIE-1 X11 Xauthority data +14 string MIT-MAGIC-COOKIE-1 X11 Xauthority data +15 string MIT-MAGIC-COOKIE-1 X11 Xauthority data +16 string MIT-MAGIC-COOKIE-1 X11 Xauthority data +17 string MIT-MAGIC-COOKIE-1 X11 Xauthority data +18 string MIT-MAGIC-COOKIE-1 X11 Xauthority data diff --git a/usr.bin/file/magdir/diamond b/usr.bin/file/magdir/diamond index 1abd01e0300..8dddb846385 100644 --- a/usr.bin/file/magdir/diamond +++ b/usr.bin/file/magdir/diamond @@ -1,3 +1,4 @@ +# $OpenBSD: diamond,v 1.2 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ # diamond: file(1) magic for Diamond system diff --git a/usr.bin/file/magdir/diff b/usr.bin/file/magdir/diff index 9e651465efd..61c4359ce95 100644 --- a/usr.bin/file/magdir/diff +++ b/usr.bin/file/magdir/diff @@ -1,3 +1,4 @@ +# $OpenBSD: diff,v 1.2 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ # diff: file(1) magic for diff(1) output diff --git a/usr.bin/file/magdir/digital b/usr.bin/file/magdir/digital index ce1da4c824d..3686aaf163d 100644 --- a/usr.bin/file/magdir/digital +++ b/usr.bin/file/magdir/digital @@ -1,4 +1,4 @@ -# $OpenBSD: digital,v 1.2 2001/01/29 01:57:57 niklas Exp $ +# $OpenBSD: digital,v 1.3 2004/06/03 03:14:19 tedu Exp $ # Digital UNIX - Info # diff --git a/usr.bin/file/magdir/dolby b/usr.bin/file/magdir/dolby new file mode 100644 index 00000000000..1ed9e4ed737 --- /dev/null +++ b/usr.bin/file/magdir/dolby @@ -0,0 +1,59 @@ +# $OpenBSD: dolby,v 1.1 2004/06/03 03:14:19 tedu Exp $ + +# 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/usr.bin/file/magdir/dump b/usr.bin/file/magdir/dump index 628ead86c61..763007c4551 100644 --- a/usr.bin/file/magdir/dump +++ b/usr.bin/file/magdir/dump @@ -1,3 +1,4 @@ +# $OpenBSD: dump,v 1.3 2004/06/03 03:14:19 tedu Exp $ #------------------------------------------------------------------------------ # dump: file(1) magic for dump file format--for new and old dump filesystems diff --git a/usr.bin/file/magdir/dyadic b/usr.bin/file/magdir/dyadic new file mode 100644 index 00000000000..f73c7a35238 --- /dev/null +++ b/usr.bin/file/magdir/dyadic @@ -0,0 +1,13 @@ +# $OpenBSD: dyadic,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# Dyadic: file(1) magic for Dyalog APL. +# +0 byte 0xaa +>1 byte <4 Dyalog APL +>>1 byte 0x00 incomplete workspace +>>1 byte 0x01 component file +>>1 byte 0x02 external variable +>>1 byte 0x03 workspace +>>2 byte x version %d +>>3 byte x .%d diff --git a/usr.bin/file/magdir/editors b/usr.bin/file/magdir/editors new file mode 100644 index 00000000000..21b23f09204 --- /dev/null +++ b/usr.bin/file/magdir/editors @@ -0,0 +1,14 @@ +# $OpenBSD: editors,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# T602 editor documents +# by David Necas <yeti@physics.muni.cz> +0 string @CT\ T602 document data, +>4 string 0 Kamenicky +>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/usr.bin/file/magdir/elf b/usr.bin/file/magdir/elf index a87cce1c9d2..5f2200f4850 100644 --- a/usr.bin/file/magdir/elf +++ b/usr.bin/file/magdir/elf @@ -1,3 +1,4 @@ +# $OpenBSD: elf,v 1.10 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # elf: file(1) magic for ELF executables diff --git a/usr.bin/file/magdir/encore b/usr.bin/file/magdir/encore index 63cb5d4f9f4..8186e36f634 100644 --- a/usr.bin/file/magdir/encore +++ b/usr.bin/file/magdir/encore @@ -1,3 +1,4 @@ +# $OpenBSD: encore,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # encore: file(1) magic for Encore machines diff --git a/usr.bin/file/magdir/epoc b/usr.bin/file/magdir/epoc new file mode 100644 index 00000000000..a9ed74d2eed --- /dev/null +++ b/usr.bin/file/magdir/epoc @@ -0,0 +1,11 @@ +# $OpenBSD: epoc,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# Epoc 32 : file(1) magic for Epoc Documents [psion/osaris +# Stefan Praszalowicz (hpicollo@worldnet.fr) +#0 lelong 0x10000037 Epoc32 +>4 lelong 0x1000006D +>>8 lelong 0x1000007F Word +>>8 lelong 0x10000088 Sheet +>>8 lelong 0x1000007D Sketch +>>8 lelong 0x10000085 TextEd diff --git a/usr.bin/file/magdir/fcs b/usr.bin/file/magdir/fcs new file mode 100644 index 00000000000..e83f403037b --- /dev/null +++ b/usr.bin/file/magdir/fcs @@ -0,0 +1,9 @@ +# $OpenBSD: fcs,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# fcs: file(1) magic for FCS (Flow Cytometry Standard) data files +# From Roger Leigh <roger@whinlatter.uklinux.net> +0 string FCS1.0 Flow Cytometry Standard (FCS) data, version 1.0 +0 string FCS2.0 Flow Cytometry Standard (FCS) data, version 2.0 +0 string FCS3.0 Flow Cytometry Standard (FCS) data, version 3.0 + diff --git a/usr.bin/file/magdir/filesystems b/usr.bin/file/magdir/filesystems index 125250d9b6d..41ecbb09100 100644 --- a/usr.bin/file/magdir/filesystems +++ b/usr.bin/file/magdir/filesystems @@ -1,6 +1,338 @@ +# $OpenBSD: filesystems,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # filesystems: file(1) magic for different filesystems # -0x438 leshort 0xEF53 Linux/i386 ext2 filesystem 0 string \366\366\366\366 PC formatted floppy with no filesystem +# Sun disk labels +# From /usr/include/sun/dklabel.h: +0774 beshort 0xdabe Sun disk label +>0 string x '%s +>>31 string >\0 \b%s +>>>63 string >\0 \b%s +>>>>95 string >\0 \b%s +>0 string x \b' +>0734 short >0 %d rpm, +>0736 short >0 %d phys cys, +>0740 short >0 %d alts/cyl, +>0746 short >0 %d interleave, +>0750 short >0 %d data cyls, +>0752 short >0 %d alt cyls, +>0754 short >0 %d heads/partition, +>0756 short >0 %d sectors/track, +>0764 long >0 start cyl %ld, +>0770 long x %ld blocks +# Is there a boot block written 1 sector in? +>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.jenderek@gmx.net> +>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 +# JuMP short bootcodeoffset NOP assembler instructions will usually be EB xx 90 +# older drives may use E9 xx xx +>0 lelong&0x009000EB 0x009000EB +>0 lelong&0x000000E9 0x000000E9 +>>1 ubyte >37 \b, code offset 0x%x +# mtools-3.9.8/msdos.h +# usual values are marked with comments to get only informations of strange FAT systems +# valid sectorsize are from 32 to 2048 +>>>11 uleshort <2049 +>>>>11 uleshort >31 +>>>>>3 string >\0 \b, OEM-ID "%8.8s" +>>>>>11 uleshort >512 \b, Bytes/sector %u +#>>>>>11 uleshort =512 \b, Bytes/sector %u=512 (usual) +>>>>>11 uleshort <512 \b, Bytes/sector %u +>>>>>13 ubyte >1 \b, sectors/cluster %u +#>>>>>13 ubyte =1 \b, sectors/cluster %u (usual on Floppies) +>>>>>14 uleshort >32 \b, reserved sectors %u +#>>>>>14 uleshort =32 \b, reserved sectors %u (usual Fat32) +#>>>>>14 uleshort >1 \b, reserved sectors %u +#>>>>>14 uleshort =1 \b, reserved sectors %u (usual FAT12,FAT16) +>>>>>14 uleshort <1 \b, reserved sectors %u +>>>>>16 ubyte >2 \b, FATs %u +#>>>>>16 ubyte =2 \b, FATs %u (usual) +>>>>>16 ubyte =1 \b, FAT %u +>>>>>16 ubyte >0 +>>>>>17 uleshort >0 \b, root entries %u +#>>>>>17 uleshort =0 \b, root entries %u=0 (usual Fat32) +>>>>>19 uleshort >0 \b, sectors %u (volumes <=32 MB) +#>>>>>19 uleshort =0 \b, sectors %u=0 (usual Fat32) +>>>>>21 ubyte >0xF0 \b, Media descriptor 0x%x +#>>>>>21 ubyte =0xF0 \b, Media descriptor 0x%x (usual floppy) +>>>>>21 ubyte <0xF0 \b, Media descriptor 0x%x +>>>>>22 uleshort >0 \b, sectors/FAT %u +#>>>>>22 uleshort =0 \b, sectors/FAT %u=0 (usual Fat32) +>>>>>26 ubyte >2 \b, heads %u +#>>>>>26 ubyte =2 \b, heads %u (usual floppy) +>>>>>26 ubyte =1 \b, heads %u +>>>>>28 ulelong >0 \b, hidden sectors %u +#>>>>>28 ulelong =0 \b, hidden sectors %u (usual floppy) +>>>>>32 ulelong >0 \b, sectors %u (volumes > 32 MB) +#>>>>>32 ulelong =0 \b, sectors %u (volumes > 32 MB) +# FAT<32 specific +# NOT le FAT3=NOT 3TAF=0xCCABBEB9 +>>>>>82 ulelong&0xCCABBEB9 >0 +>>>>>>36 ubyte >0x80 \b, physical drive 0x%x +#>>>>>>36 ubyte =0x80 \b, physical drive 0x%x=0x80 (usual harddisk) +>>>>>>36 ubyte&0x7F >0 \b, physical drive 0x%x +#>>>>>>36 ubyte =0 \b, physical drive 0x%x=0 (usual floppy) +>>>>>>37 ubyte >0 \b, reserved 0x%x +#>>>>>>37 ubyte =0 \b, reserved 0x%x +>>>>>>38 ubyte >0x29 \b, dos < 4.0 BootSector (0x%x) +>>>>>>38 ubyte <0x29 \b, dos < 4.0 BootSector (0x%x) +>>>>>>38 ubyte =0x29 +>>>>>>>39 ulelong x \b, serial number 0x%x +>>>>>>>43 string <NO\ NAME \b, label: "%11.11s" +>>>>>>>43 string >NO\ NAME \b, label: "%11.11s" +>>>>>>>43 string =NO\ NAME \b, unlabeled +>>>>>>54 string FAT1 \b, FAT +>>>>>>>54 string FAT12 \b (12 bit) +>>>>>>>54 string FAT16 \b (16 bit) +# FAT32 specific +>>>>>82 string FAT32 \b, FAT (32 bit) +>>>>>>36 ulelong x \b, sectors/FAT %u +>>>>>>40 uleshort >0 \b, extension flags %u +#>>>>>>40 uleshort =0 \b, extension flags %u +>>>>>>42 uleshort >0 \b, fsVersion %u +#>>>>>>42 uleshort =0 \b, fsVersion %u (usual) +>>>>>>44 ulelong >2 \b, rootdir cluster %u +#>>>>>>44 ulelong =2 \b, rootdir cluster %u +#>>>>>>44 ulelong =1 \b, rootdir cluster %u +>>>>>>48 uleshort >1 \b, infoSector %u +#>>>>>>48 uleshort =1 \b, infoSector %u (usual) +>>>>>>48 uleshort <1 \b, infoSector %u +>>>>>>50 uleshort >6 \b, Backup boot sector %u +#>>>>>>50 uleshort =6 \b, Backup boot sector %u (usual) +>>>>>>50 uleshort <6 \b, Backup boot sector %u +>>>>>>54 ulelong >0 \b, reserved1 0x%x +>>>>>>58 ulelong >0 \b, reserved2 0x%x +>>>>>>62 ulelong >0 \b, reserved3 0x%x +# same structure as FAT1X +>>>>>>64 ubyte >0x80 \b, physical drive 0x%x +#>>>>>>64 ubyte =0x80 \b, physical drive 0x%x=80 (usual harddisk) +>>>>>>64 ubyte&0x7F >0 \b, physical drive 0x%x +#>>>>>>64 ubyte =0 \b, physical drive 0x%x=0 (usual floppy) +>>>>>>65 ubyte >0 \b, reserved 0x%x +>>>>>>66 ubyte >0x29 \b, dos < 4.0 BootSector (0x%x) +>>>>>>66 ubyte <0x29 \b, dos < 4.0 BootSector (0x%x) +>>>>>>66 ubyte =0x29 +>>>>>>>67 ulelong x \b, serial number 0x%x +>>>>>>>71 string <NO\ NAME \b, label: "%11.11s" +>>>>>>71 string >NO\ NAME \b, label: "%11.11s" +>>>>>>71 string =NO\ NAME \b, unlabeled +### FATs end +>0x200 lelong 0x82564557 \b, BSD disklabel + +# 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 + +# romfs filesystems - Juan Cespedes <cespedes@debian.org> +0 string -rom1fs-\0 romfs filesystem, version 1 +>8 belong x %d bytes, +>16 string x named %s. + +# netboot image - Juan Cespedes <cespedes@debian.org> +0 lelong 0x1b031336L Netboot image, +>4 lelong&0xFFFFFF00 0 +>>4 lelong&0x100 0x000 mode 2 +>>4 lelong&0x100 0x100 mode 3 +>4 lelong&0xFFFFFF00 !0 unknown mode + +0x18b string OS/2 OS/2 Boot Manager + +9564 lelong 0x00011954 Unix Fast File system (little-endian), +>8404 string x last mounted on %s, +#>9504 ledate x last checked at %s, +>8224 ledate x last written at %s, +>8401 byte x clean flag %d, +>8228 lelong x number of blocks %d, +>8232 lelong x number of data blocks %d, +>8236 lelong x number of cylinder groups %d, +>8240 lelong x block size %d, +>8244 lelong x fragment size %d, +>8252 lelong x minimum percentage of free blocks %d, +>8256 lelong x rotational delay %dms, +>8260 lelong x disk rotational speed %drps, +>8320 lelong 0 TIME optimization +>8320 lelong 1 SPACE optimization + +9564 belong 0x00011954 Unix Fast File system (big-endian), +>7168 long 0x4c41424c Apple UFS Volume +>>7186 string x named %s, +>>7176 belong x volume label version %d, +>>7180 bedate x created on %s, +>8404 string x last mounted on %s, +#>9504 bedate x last checked at %s, +>8224 bedate x last written at %s, +>8401 byte x clean flag %d, +>8228 belong x number of blocks %d, +>8232 belong x number of data blocks %d, +>8236 belong x number of cylinder groups %d, +>8240 belong x block size %d, +>8244 belong x fragment size %d, +>8252 belong x minimum percentage of free blocks %d, +>8256 belong x rotational delay %dms, +>8260 belong x disk rotational speed %drps, +>8320 belong 0 TIME optimization +>8320 belong 1 SPACE optimization + +# ext2/ext3 filesystems - Andreas Dilger <adilger@turbolabs.com> +0x438 leshort 0xEF53 Linux +>0x44c lelong x rev %d +>0x43e leshort x \b.%d +>0x45c lelong ^0x0000004 ext2 filesystem data +>>0x43a leshort ^0x0000001 (mounted or unclean) +>0x45c lelong &0x0000004 ext3 filesystem data +>>0x460 lelong &0x0000004 (needs journal recovery) +>0x43a leshort &0x0000002 (errors) +>0x460 lelong &0x0000001 (compressed) +#>0x460 lelong &0x0000002 (filetype) +#>0x464 lelong &0x0000001 (sparse_super) +>0x464 lelong &0x0000002 (large files) + +# SGI disk labels - Nathan Scott <nathans@debian.org> +0 belong 0x0BE5A941 SGI disk label (volume header) + +# SGI XFS filesystem - Nathan Scott <nathans@debian.org> +0 belong 0x58465342 SGI XFS filesystem data +>0x4 belong x (blksz %d, +>0x68 beshort x inosz %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 +# "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 + +# cramfs filesystem - russell@coker.com.au +0 lelong 0x28cd3d45 Linux Compressed ROM File System data, little endian +>4 lelong x size %d +>8 lelong &1 version #2 +>8 lelong &2 sorted_dirs +>8 lelong &4 hole_support +>32 lelong x CRC 0x%x, +>36 lelong x edition %d, +>40 lelong x %d blocks, +>44 lelong x %d files + +0 belong 0x28cd3d45 Linux Compressed ROM File System data, big endian +>4 belong x size %d +>8 belong &1 version #2 +>8 belong &2 sorted_dirs +>8 belong &4 hole_support +>32 belong x CRC 0x%x, +>36 belong x edition %d, +>40 belong x %d blocks, +>44 belong x %d files + +# reiserfs - russell@coker.com.au +0x10034 string ReIsErFs ReiserFS V3.5 +0x10034 string ReIsEr2Fs ReiserFS V3.6 +>0x1002c leshort x block size %d +>0x10032 leshort &2 (mounted or unclean) +>0x10000 lelong x num blocks %d +>0x10040 lelong 1 tea hash +>0x10040 lelong 2 yura hash +>0x10040 lelong 3 r5 hash + +# JFFS - russell@coker.com.au +0 lelong 0x34383931 Linux Journalled Flash File system, little endian +0 belong 0x34383931 Linux Journalled Flash File system, big endian + +# EST flat binary format (which isn't, but anyway) +# From: Mark Brown <broonie@sirena.org.uk> +0 string ESTFBINR EST flat binary + +# Aculab VoIP firmware +# From: Mark Brown <broonie@sirena.org.uk> +0 string VoIP\ Startup\ and Aculab VoIP firmware +>35 string x format %s + +# PPCBoot image file +# From: Mark Brown <broonie@sirena.org.uk> +0 belong 0x27051956 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 diff --git a/usr.bin/file/magdir/flash b/usr.bin/file/magdir/flash new file mode 100644 index 00000000000..7d76df55110 --- /dev/null +++ b/usr.bin/file/magdir/flash @@ -0,0 +1,16 @@ +# $OpenBSD: flash,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# flash: file(1) magic for Macromedia Flash file format +# +# See +# +# http://www.macromedia.com/software/flash/open/ +# +0 string FWS Macromedia Flash data, +>3 byte x version %d +0 string CWS Macromedia Flash data (compressed), +>3 byte x version %d +# +# From Dave Wilson +0 string AGD4\xbe\xb8\xbb\xcb\x00 Macromedia Freehand 9 Document diff --git a/usr.bin/file/magdir/fonts b/usr.bin/file/magdir/fonts index dd7907f812b..f38e5f93ccf 100644 --- a/usr.bin/file/magdir/fonts +++ b/usr.bin/file/magdir/fonts @@ -1,3 +1,4 @@ +# $OpenBSD: fonts,v 1.3 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # fonts: file(1) magic for font data @@ -7,9 +8,9 @@ 0 short 017001 byte-swapped Berkeley vfont data # PostScript fonts (must precede "printer" entries), quinlan@yggdrasil.com -0 string %!PS-AdobeFont-1.0 PostScript Type 1 font text +0 string %!PS-AdobeFont-1. PostScript Type 1 font text >20 string >\0 (%s) -6 string %!PS-AdobeFont-1.0 PostScript Type 1 font program data +6 string %!PS-AdobeFont-1. PostScript Type 1 font program data # X11 font files in SNF (Server Natural Format) format 0 belong 00000004 X11 SNF font data, MSB first @@ -24,3 +25,38 @@ >12 byte 0x02 \b, LSB first >12 byte 0x0a \b, MSB first 0 string D1.0\015 X11 Speedo font data + +#------------------------------------------------------------------------------ +# FIGlet fonts and controlfiles +# From figmagic supplied with Figlet version 2.2 +# "David E. O'Brien" <obrien@FreeBSD.ORG> +0 string flf FIGlet font +>3 string >2a version %-2.2s +0 string flc FIGlet controlfile +>3 string >2a version %-2.2s + +# libGrx graphics lib fonts, from Albert Cahalan (acahalan@cs.uml.edu) +# Used with djgpp (DOS Gnu C++), sometimes Linux or Turbo C++ +0 belong 0x14025919 libGrx font data, +>8 leshort x %dx +>10 leshort x \b%d +>40 string x %s +# Misc. DOS VGA fonts, from Albert Cahalan (acahalan@cs.uml.edu) +0 belong 0xff464f4e DOS code page font data collection +7 belong 0x00454741 DOS code page font data +7 belong 0x00564944 DOS code page font data (from Linux?) +4098 string DOSFONT DOSFONT2 encrypted font data + +# downloadable fonts for browser (prints type) anthon@mnt.org +0 string PFR1 PFR1 font +>102 string >0 \b: %s + +# True Type fonts +0 string \000\001\000\000\000 TrueType font data + +0 string \007\001\001\000Copyright\ (c)\ 199 Adobe Multiple Master font +0 string \012\001\001\000Copyright\ (c)\ 199 Adobe Multiple Master font + +# Opentype font data from Avi Bercovich +0 string OTTO OpenType font data + diff --git a/usr.bin/file/magdir/frame b/usr.bin/file/magdir/frame index 47e48979d54..4b3405a3657 100644 --- a/usr.bin/file/magdir/frame +++ b/usr.bin/file/magdir/frame @@ -1,3 +1,4 @@ +# $OpenBSD: frame,v 1.3 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # frame: file(1) magic for FrameMaker files @@ -6,6 +7,8 @@ # copyright, but this file is "published" as witness the following: # 0 string \<MakerFile FrameMaker document +>11 string 5.5 (5.5 +>11 string 5.0 (5.0 >11 string 4.0 (4.0 >11 string 3.0 (3.0 >11 string 2.0 (2.0 diff --git a/usr.bin/file/magdir/freebsd b/usr.bin/file/magdir/freebsd index 2370c257841..eab028b6e56 100644 --- a/usr.bin/file/magdir/freebsd +++ b/usr.bin/file/magdir/freebsd @@ -1,3 +1,4 @@ +# $OpenBSD: freebsd,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # freebsd: file(1) magic for FreeBSD objects @@ -126,5 +127,18 @@ # /var/run/ld.so.hints # What are you laughing about? -0 lelong 011421044151 ld.so hints file ->4 lelong >0 (version %d) +0 lelong 011421044151 ld.so hints file (Little Endian +>4 lelong >0 \b, version %d) +>4 belong <=0 \b) +0 belong 011421044151 ld.so hints file (Big Endian +>4 belong >0 \b, version %d) +>4 belong <=0 \b) + +# +# Files generated by FreeBSD scrshot(1)/vidcontrol(1) utilities +# +0 string SCRSHOT_ scrshot(1) screenshot, +>8 byte x version %d, +>9 byte 2 %d bytes in header, +>>10 byte x %d chars wide by +>>11 byte x %d chars high diff --git a/usr.bin/file/magdir/fsav b/usr.bin/file/magdir/fsav new file mode 100644 index 00000000000..92eb5e078e1 --- /dev/null +++ b/usr.bin/file/magdir/fsav @@ -0,0 +1,28 @@ +# $OpenBSD: fsav,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# fsav: file(1) magic for datafellows fsav virus definition files +# Anthon van der Neut (anthon@mnt.org) +0 beshort 0x1575 fsav (linux) macro virus +>8 leshort >0 (%d- +>11 byte >0 \b%02d- +>10 byte >0 \b%02d) + +# comment this out for now because it regognizes every file where +# the eighth character is \n +#8 byte 0x0a +#>12 byte 0x07 +#>11 leshort >0 fsav (linux) virus (%d- +#>10 byte 0 \b01- +#>10 byte 1 \b02- +#>10 byte 2 \b03- +#>10 byte 3 \b04- +#>10 byte 4 \b05- +#>10 byte 5 \b06- +#>10 byte 6 \b07- +#>10 byte 7 \b08- +#>10 byte 8 \b08- +#>10 byte 9 \b10- +#>10 byte 10 \b11- +#>10 byte 11 \b12- +#>9 byte >0 \b%02d) diff --git a/usr.bin/file/magdir/games b/usr.bin/file/magdir/games new file mode 100644 index 00000000000..aff8cef4c9e --- /dev/null +++ b/usr.bin/file/magdir/games @@ -0,0 +1,159 @@ +# $OpenBSD: games,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# games: file(1) for games + +# Thomas M. Ott (ThMO) +1 string =WAD DOOM data, +>0 string =I main wad +>0 string =P patch wad +>0 byte x unknown junk + +# Fabio Bonelli <fabiobonelli@libero.it> +# Quake II - III data files +0 string IDP2 Quake II 3D Model file, +>20 long x %lu skin(s), +>8 long x (%lu x +>12 long x %lu), +>40 long x %lu frame(s), +>16 long x Frame size %lu bytes, +>24 long x %lu vertices/frame, +>28 long x %lu texture coordinates, +>32 long x %lu triangles/frame + +0 string IBSP Quake +>4 long 0x26 II Map file (BSP) +>4 long 0x2E III Map file (BSP) + +0 string IDS2 Quake II SP2 sprite file + +#--------------------------------------------------------------------------- +# Doom and Quake +# submitted by Nicolas Patrois + +# DOOM + +0 string IWAD DOOM or DOOM ][ world +0 string PWAD DOOM or DOOM ][ extension world + +0 string \xcb\x1dBoom\xe6\xff\x03\x01 Boom or linuxdoom demo +# some doom lmp files don't match, I've got one beginning with \x6d\x02\x01\x01 + +24 string LxD\ 203 Linuxdoom save +>0 string x , name=%s +>44 string x , world=%s + +# Quake + +0 string PACK Quake I or II world or extension + +#0 string -1\x0a Quake I demo +#>30 string x version %.4s +#>61 string x level %s + +#0 string 5\x0a Quake I save + +# The levels + +# Quake 1 + +0 string 5\x0aIntroduction Quake I save: start Introduction +0 string 5\x0athe_Slipgate_Complex Quake I save: e1m1 The slipgate complex +0 string 5\x0aCastle_of_the_Damned Quake I save: e1m2 Castle of the damned +0 string 5\x0athe_Necropolis Quake I save: e1m3 The necropolis +0 string 5\x0athe_Grisly_Grotto Quake I save: e1m4 The grisly grotto +0 string 5\x0aZiggurat_Vertigo Quake I save: e1m8 Ziggurat vertigo (secret) +0 string 5\x0aGloom_Keep Quake I save: e1m5 Gloom keep +0 string 5\x0aThe_Door_To_Chthon Quake I save: e1m6 The door to Chthon +0 string 5\x0aThe_House_of_Chthon Quake I save: e1m7 The house of Chthon +0 string 5\x0athe_Installation Quake I save: e2m1 The installation +0 string 5\x0athe_Ogre_Citadel Quake I save: e2m2 The ogre citadel +0 string 5\x0athe_Crypt_of_Decay Quake I save: e2m3 The crypt of decay (dopefish lives!) +0 string 5\x0aUnderearth Quake I save: e2m7 Underearth (secret) +0 string 5\x0athe_Ebon_Fortress Quake I save: e2m4 The ebon fortress +0 string 5\x0athe_Wizard's_Manse Quake I save: e2m5 The wizard's manse +0 string 5\x0athe_Dismal_Oubliette Quake I save: e2m6 The dismal oubliette +0 string 5\x0aTermination_Central Quake I save: e3m1 Termination central +0 string 5\x0aVaults_of_Zin Quake I save: e3m2 Vaults of Zin +0 string 5\x0athe_Tomb_of_Terror Quake I save: e3m3 The tomb of terror +0 string 5\x0aSatan's_Dark_Delight Quake I save: e3m4 Satan's dark delight +0 string 5\x0athe_Haunted_Halls Quake I save: e3m7 The haunted halls (secret) +0 string 5\x0aWind_Tunnels Quake I save: e3m5 Wind tunnels +0 string 5\x0aChambers_of_Torment Quake I save: e3m6 Chambers of torment +0 string 5\x0athe_Sewage_System Quake I save: e4m1 The sewage system +0 string 5\x0aThe_Tower_of_Despair Quake I save: e4m2 The tower of despair +0 string 5\x0aThe_Elder_God_Shrine Quake I save: e4m3 The elder god shrine +0 string 5\x0athe_Palace_of_Hate Quake I save: e4m4 The palace of hate +0 string 5\x0aHell's_Atrium Quake I save: e4m5 Hell's atrium +0 string 5\x0athe_Nameless_City Quake I save: e4m8 The nameless city (secret) +0 string 5\x0aThe_Pain_Maze Quake I save: e4m6 The pain maze +0 string 5\x0aAzure_Agony Quake I save: e4m7 Azure agony +0 string 5\x0aShub-Niggurath's_Pit Quake I save: end Shub-Niggurath's pit + +# Quake DeathMatch levels + +0 string 5\x0aPlace_of_Two_Deaths Quake I save: dm1 Place of two deaths +0 string 5\x0aClaustrophobopolis Quake I save: dm2 Claustrophobopolis +0 string 5\x0aThe_Abandoned_Base Quake I save: dm3 The abandoned base +0 string 5\x0aThe_Bad_Place Quake I save: dm4 The bad place +0 string 5\x0aThe_Cistern Quake I save: dm5 The cistern +0 string 5\x0aThe_Dark_Zone Quake I save: dm6 The dark zone + +# Scourge of Armagon + +0 string 5\x0aCommand_HQ Quake I save: start Command HQ +0 string 5\x0aThe_Pumping_Station Quake I save: hip1m1 The pumping station +0 string 5\x0aStorage_Facility Quake I save: hip1m2 Storage facility +0 string 5\x0aMilitary_Complex Quake I save: hip1m5 Military complex (secret) +0 string 5\x0athe_Lost_Mine Quake I save: hip1m3 The lost mine +0 string 5\x0aResearch_Facility Quake I save: hip1m4 Research facility +0 string 5\x0aAncient_Realms Quake I save: hip2m1 Ancient realms +0 string 5\x0aThe_Gremlin's_Domain Quake I save: hip2m6 The gremlin's domain (secret) +0 string 5\x0aThe_Black_Cathedral Quake I save: hip2m2 The black cathedral +0 string 5\x0aThe_Catacombs Quake I save: hip2m3 The catacombs +0 string 5\x0athe_Crypt__ Quake I save: hip2m4 The crypt +0 string 5\x0aMortum's_Keep Quake I save: hip2m5 Mortum's keep +0 string 5\x0aTur_Torment Quake I save: hip3m1 Tur torment +0 string 5\x0aPandemonium Quake I save: hip3m2 Pandemonium +0 string 5\x0aLimbo Quake I save: hip3m3 Limbo +0 string 5\x0athe_Edge_of_Oblivion Quake I save: hipdm1 The edge of oblivion (secret) +0 string 5\x0aThe_Gauntlet Quake I save: hip3m4 The gauntlet +0 string 5\x0aArmagon's_Lair Quake I save: hipend Armagon's lair + +# Malice + +0 string 5\x0aThe_Academy Quake I save: start The academy +0 string 5\x0aThe_Lab Quake I save: d1 The lab +0 string 5\x0aArea_33 Quake I save: d1b Area 33 +0 string 5\x0aSECRET_MISSIONS Quake I save: d3b Secret missions +0 string 5\x0aThe_Hospital Quake I save: d10 The hospital (secret) +0 string 5\x0aThe_Genetics_Lab Quake I save: d11 The genetics lab (secret) +0 string 5\x0aBACK_2_MALICE Quake I save: d4b Back to Malice +0 string 5\x0aArea44 Quake I save: d1c Area 44 +0 string 5\x0aTakahiro_Towers Quake I save: d2 Takahiro towers +0 string 5\x0aA_Rat's_Life Quake I save: d3 A rat's life +0 string 5\x0aInto_The_Flood Quake I save: d4 Into the flood +0 string 5\x0aThe_Flood Quake I save: d5 The flood +0 string 5\x0aNuclear_Plant Quake I save: d6 Nuclear plant +0 string 5\x0aThe_Incinerator_Plant Quake I save: d7 The incinerator plant +0 string 5\x0aThe_Foundry Quake I save: d7b The foundry +0 string 5\x0aThe_Underwater_Base Quake I save: d8 The underwater base +0 string 5\x0aTakahiro_Base Quake I save: d9 Takahiro base +0 string 5\x0aTakahiro_Laboratories Quake I save: d12 Takahiro laboratories +0 string 5\x0aStayin'_Alive Quake I save: d13 Stayin' alive +0 string 5\x0aB.O.S.S._HQ Quake I save: d14 B.O.S.S. HQ +0 string 5\x0aSHOWDOWN! Quake I save: d15 Showdown! + +# Malice DeathMatch levels + +0 string 5\x0aThe_Seventh_Precinct Quake I save: ddm1 The seventh precinct +0 string 5\x0aSub_Station Quake I save: ddm2 Sub station +0 string 5\x0aCrazy_Eights! Quake I save: ddm3 Crazy eights! +0 string 5\x0aEast_Side_Invertationa Quake I save: ddm4 East side invertationa +0 string 5\x0aSlaughterhouse Quake I save: ddm5 Slaughterhouse +0 string 5\x0aDOMINO Quake I save: ddm6 Domino +0 string 5\x0aSANDRA'S_LADDER Quake I save: ddm7 Sandra's ladder + + +0 string MComprHD MAME CHD compressed hard disk image, +>12 belong x version %lu diff --git a/usr.bin/file/magdir/gcc b/usr.bin/file/magdir/gcc new file mode 100644 index 00000000000..f2c72541200 --- /dev/null +++ b/usr.bin/file/magdir/gcc @@ -0,0 +1,17 @@ +# $OpenBSD: gcc,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# gcc: file(1) magic for GCC special files +# +0 string gpch GCC precompiled header + +# The version field is annoying. It's 3 characters, not zero-terminated. +>5 byte x (version %c +>6 byte x \b%c +>7 byte x \b%c) + +# 67 = 'C', 111 = 'o', 43 = '+', 79 = 'O' +>4 byte 67 for C +>4 byte 111 for Objective C +>4 byte 43 for C++ +>4 byte 79 for Objective C++ diff --git a/usr.bin/file/magdir/gimp b/usr.bin/file/magdir/gimp new file mode 100644 index 00000000000..a9b7a58d54c --- /dev/null +++ b/usr.bin/file/magdir/gimp @@ -0,0 +1,38 @@ +# $OpenBSD: gimp,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# GIMP Gradient: file(1) magic for the GIMP's gradient data files +# by Federico Mena <federico@nuclecu.unam.mx> + +0 string GIMP\ Gradient GIMP gradient data + +#------------------------------------------------------------------------------ +# XCF: file(1) magic for the XCF image format used in the GIMP developed +# by Spencer Kimball and Peter Mattis +# ('Bucky' LaDieu, nega@vt.edu) + +0 string gimp\ xcf GIMP XCF image data, +>9 string file version 0, +>9 string v version +>>10 string >\0 %s, +>14 belong x %lu x +>18 belong x %lu, +>22 belong 0 RGB Color +>22 belong 1 Greyscale +>22 belong 2 Indexed Color +>22 belong >2 Unknown Image Type. + +#------------------------------------------------------------------------------ +# XCF: file(1) magic for the patterns used in the GIMP, developed +# by Spencer Kimball and Peter Mattis +# ('Bucky' LaDieu, nega@vt.edu) + +20 string GPAT GIMP pattern data, +>24 string x %s + +#------------------------------------------------------------------------------ +# XCF: file(1) magic for the brushes used in the GIMP, developed +# by Spencer Kimball and Peter Mattis +# ('Bucky' LaDieu, nega@vt.edu) + +20 string GIMP GIMP brush data diff --git a/usr.bin/file/magdir/gnu b/usr.bin/file/magdir/gnu new file mode 100644 index 00000000000..e7a19e3101c --- /dev/null +++ b/usr.bin/file/magdir/gnu @@ -0,0 +1,44 @@ +# $OpenBSD: gnu,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +# +# GNU nlsutils message catalog file format +# +0 string \336\22\4\225 GNU message catalog (little endian), +>4 lelong x revision %d, +>8 lelong x %d messages +0 string \225\4\22\336 GNU message catalog (big endian), +>4 belong x revision %d, +>8 belong x %d messages +# message catalogs, from Mitchum DSouza <m.dsouza@mrc-apu.cam.ac.uk> +0 string *nazgul* Nazgul style compiled message catalog +>8 lelong >0 \b, version %ld +# GnuPG +# The format is very similar to pgp +0 string \001gpg GPG key trust database +>4 byte x version %d +0 beshort 0x9901 GPG key public ring +# This magic is not particularly good, as the keyrings don't have true +# magic. Nevertheless, it covers many keyrings. + +# Gnumeric spreadsheet +# This entry is only semi-helpful, as Gnumeric compresses its files, so +# they will ordinarily reported as "compressed", but at least -z helps +39 string =<gmr:Workbook Gnumeric spreadsheet + +#------------------------------------------------------------------------------ +# gcc: file(1) magic for GCC special files +# +0 string gpch GCC precompiled header + +# The version field is annoying. It's 3 characters, not zero-terminated. +>5 byte x (version %c +>6 byte x \b%c +>7 byte x \b%c) + +# 67 = 'C', 111 = 'o', 43 = '+', 79 = 'O' +>4 byte 67 for C +>4 byte 111 for Objective C +>4 byte 43 for C++ +>4 byte 79 for Objective C++ + + diff --git a/usr.bin/file/magdir/grace b/usr.bin/file/magdir/grace new file mode 100644 index 00000000000..3d5a6774deb --- /dev/null +++ b/usr.bin/file/magdir/grace @@ -0,0 +1,21 @@ +# $OpenBSD: grace,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# ACE/gr and Grace type files - PLEASE DO NOT REMOVE THIS LINE +# +# ACE/gr binary +0 string \000\000\0001\000\000\0000\000\000\0000\000\000\0002\000\000\0000\000\000\0000\000\000\0003 old ACE/gr binary file +>39 byte >0 - version %c +# ACE/gr ascii +0 string #\ xvgr\ parameter\ file ACE/gr ascii file +0 string #\ xmgr\ parameter\ file ACE/gr ascii file +0 string #\ ACE/gr\ parameter\ file ACE/gr ascii file +# Grace projects +0 string #\ Grace\ project\ file Grace project file +>23 string @version\ (version +>>32 byte >0 %c +>>33 string >\0 \b.%.2s +>>35 string >\0 \b.%.2s) +# ACE/gr fit description files +0 string #\ ACE/gr\ fit\ description\ ACE/gr fit description file +# end of ACE/gr and Grace type files - PLEASE DO NOT REMOVE THIS LINE diff --git a/usr.bin/file/magdir/gringotts b/usr.bin/file/magdir/gringotts new file mode 100644 index 00000000000..17da9a7765d --- /dev/null +++ b/usr.bin/file/magdir/gringotts @@ -0,0 +1,48 @@ +# $OpenBSD: gringotts,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# gringotts: file(1) magic for Gringotts +# http://devel.pluto.linux.it/projects/Gringotts/ +# author: Germano Rizzo <mano@pluto.linux.it> +#GRG3????Y +0 string GRG Gringotts data file +#file format 1 +>3 string 1 v.1, MCRYPT S2K, SERPENT crypt, SHA-256 hash, ZLib lvl.9 +#file format 2 +>3 string 2 v.2, MCRYPT S2K, +>>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 +#file format 3 +>3 string 3 v.3, OpenPGP S2K, +>>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 +#file format >3 +>3 string >3 v.%.1s (unknown details) diff --git a/usr.bin/file/magdir/hdf b/usr.bin/file/magdir/hdf new file mode 100644 index 00000000000..d93cdf4296b --- /dev/null +++ b/usr.bin/file/magdir/hdf @@ -0,0 +1,8 @@ +# $OpenBSD: hdf,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# Hierarchical Data Format, used to facilitate scientific data exchange +# specifications at http://hdf.ncsa.uiuc.edu/ + +0 belong 0x0e031301 Hierarchical Data Format (version 4) data +0 string \211HDF\r\n\032 Hierarchical Data Format (version 5) data diff --git a/usr.bin/file/magdir/hitachi-sh b/usr.bin/file/magdir/hitachi-sh new file mode 100644 index 00000000000..d2176fedbeb --- /dev/null +++ b/usr.bin/file/magdir/hitachi-sh @@ -0,0 +1,19 @@ +# $OpenBSD: hitachi-sh,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# hitach-sh: file(1) magic for Hitachi Super-H +# +# Super-H COFF +# +0 beshort 0x0500 Hitachi SH big-endian COFF +>18 beshort&0x0002 =0x0000 object +>18 beshort&0x0002 =0x0002 executable +>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 =0x0008 \b, stripped +>18 leshort&0x0008 =0x0000 \b, not stripped + diff --git a/usr.bin/file/magdir/hp b/usr.bin/file/magdir/hp index 933f3dab38a..d5ab72db6a6 100644 --- a/usr.bin/file/magdir/hp +++ b/usr.bin/file/magdir/hp @@ -1,3 +1,4 @@ +# $OpenBSD: hp,v 1.5 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # hp: file(1) magic for Hewlett Packard machines (see also "printer") diff --git a/usr.bin/file/magdir/human68k b/usr.bin/file/magdir/human68k new file mode 100644 index 00000000000..e74a0411d0c --- /dev/null +++ b/usr.bin/file/magdir/human68k @@ -0,0 +1,26 @@ +# $OpenBSD: human68k,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# human68k: file(1) magic for Human68k (X680x0 DOS) binary formats +# Magic too short! +#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/usr.bin/file/magdir/ibm370 b/usr.bin/file/magdir/ibm370 index 8cd9da27ae6..c160ef642ca 100644 --- a/usr.bin/file/magdir/ibm370 +++ b/usr.bin/file/magdir/ibm370 @@ -1,3 +1,4 @@ +# $OpenBSD: ibm370,v 1.4 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # ibm370: file(1) magic for IBM 370 and compatibles. diff --git a/usr.bin/file/magdir/ibm6000 b/usr.bin/file/magdir/ibm6000 index 8e1077b9b8c..44680226cea 100644 --- a/usr.bin/file/magdir/ibm6000 +++ b/usr.bin/file/magdir/ibm6000 @@ -1,3 +1,4 @@ +# $OpenBSD: ibm6000,v 1.4 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # ibm6000: file(1) magic for RS/6000 and the RT PC. @@ -15,3 +16,5 @@ 0 string 0xabcdef AIX message catalog 0 belong 0x000001f9 AIX compiled message catalog 0 string \<aiaff> archive +0 string \<bigaf> archive (big format) + diff --git a/usr.bin/file/magdir/iff b/usr.bin/file/magdir/iff index 68d1b79bd86..ec9f60c8f4f 100644 --- a/usr.bin/file/magdir/iff +++ b/usr.bin/file/magdir/iff @@ -1,3 +1,4 @@ +# $OpenBSD: iff,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # iff: file(1) magic for Interchange File Format (see also "audio" & "images") @@ -16,6 +17,8 @@ >8 string AIFC \b, AIFF-C compressed audio >8 string 8SVX \b, 8SVX 8-bit sampled sound voice >8 string SAMP \b, SAMP sampled audio +>8 string DTYP \b, DTYP datatype description +>8 string PTCH \b, PTCH binary patch # image formats >8 string ILBMBMHD \b, ILBM interleaved image >>20 beshort x \b, %d x diff --git a/usr.bin/file/magdir/images b/usr.bin/file/magdir/images index bb5d98f9d3d..7c580803c3f 100644 --- a/usr.bin/file/magdir/images +++ b/usr.bin/file/magdir/images @@ -1,3 +1,4 @@ +# $OpenBSD: images,v 1.7 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # images: file(1) magic for image formats (see also "iff") @@ -17,10 +18,16 @@ # `tgatoppm' recognizes a superset (Index may be anything) 1 belong&0xfff7ffff 0x01010000 Targa image data - Map >2 byte&8 8 - RLE +>12 leshort >0 %hd x +>14 leshort >0 %hd 1 belong&0xfff7ffff 0x00020000 Targa image data - RGB >2 byte&8 8 - RLE +>12 leshort >0 %hd x +>14 leshort >0 %hd 1 belong&0xfff7ffff 0x00030000 Targa image data - Mono >2 byte&8 8 - RLE +>12 leshort >0 %hd x +>14 leshort >0 %hd # PBMPLUS images # The next byte following the magic is always whitespace. @@ -158,10 +165,11 @@ >>18 lelong x \b, %d x >>22 lelong x %d x >>28 leshort x %d -0 string IC PC icon data -0 string PI PC pointer image data -0 string CI PC color icon data -0 string CP PC color pointer image data +# Too simple - MPi +#0 string IC PC icon data +#0 string PI PC pointer image data +#0 string CI PC color icon data +#0 string CP PC color pointer image data # Conflicts with other entries [BABYL] #0 string BA PC bitmap array data @@ -207,9 +215,10 @@ #>28 belong >0 colormap is %d bytes long # SGI image file format, from Daniel Quinlan (quinlan@yggdrasil.com) -# See: +# +# See # http://reality.sgi.com/grafica/sgiimage.html -# ftp://ftp.sgi.com/graphics/SGIIMAGESPEC +# 0 beshort 474 SGI image data #>2 byte 0 \b, verbatim >2 byte 1 \b, RLE @@ -268,11 +277,11 @@ # DICOM medical imaging data 128 string DICM DICOM medical imaging data -# XWD - X-Windows Dump file. +# XWD - X Window Dump file. # As described in /usr/X11R6/include/X11/XWDFile.h # used by the xwd program. # Bradford Castalia, idaeim, 1/01 -4 belong 7 XWD X-Windows Dump image data +4 belong 7 XWD X Window Dump image data >100 string >\0 \b, "%s" >16 belong x \b, %dx >20 belong x \b%dx @@ -358,3 +367,151 @@ >>14 leshort x %hd dpi, >2 byte 0 uncompressed >2 byte 1 RLE compressed + +# Adobe Photoshop +0 string 8BPS Adobe Photoshop Image + +# XV thumbnail indicator (ThMO) +0 string P7\ 332 XV thumbnail image data + +# NITF is defined by United States MIL-STD-2500A +0 string NITF National Imagery Transmission Format +>25 string >\0 dated %.14s + +# GEM Image: Version 1, Headerlen 8 (Wolfram Kleff) +0 belong 0x00010008 GEM Image data +>12 beshort x %d x +>14 beshort x %d, +>4 beshort x %d planes, +>8 beshort x %d x +>10 beshort x %d pixelsize + +# GEM Metafile (Wolfram Kleff) +0 lelong 0x0018FFFF GEM Metafile data +>4 leshort x version %d + +# +# SMJPEG. A custom Motion JPEG format used by Loki Entertainment +# Software Torbjorn Andersson <d91tan@Update.UU.SE>. +# +0 string \0\nSMJPEG SMJPEG +>8 belong x %d.x data +# According to the specification you could find any number of _TXT +# headers here, but I can't think of any way of handling that. None of +# the SMJPEG files I tried it on used this feature. Even if such a +# file is encountered the output should still be reasonable. +>16 string _SND \b, +>>24 beshort >0 %d Hz +>>26 byte 8 8-bit +>>26 byte 16 16-bit +>>28 string NONE uncompressed +# >>28 string APCM ADPCM compressed +>>27 byte 1 mono +>>28 byte 2 stereo +# Help! Isn't there any way to avoid writing this part twice? +>>32 string _VID \b, +# >>>48 string JFIF JPEG +>>>40 belong >0 %d frames +>>>44 beshort >0 (%d x +>>>46 beshort >0 %d) +>16 string _VID \b, +# >>32 string JFIF JPEG +>>24 belong >0 %d frames +>>28 beshort >0 (%d x +>>30 beshort >0 %d) + +0 string Paint\ Shop\ Pro\ Image\ File Paint Shop Pro Image File + +# "thumbnail file" (icon) +# descended from "xv", but in use by other applications as well (Wolfram Kleff) +0 string P7\ 332 XV "thumbnail file" (icon) data + +# taken from fkiss: (<yav@mte.biglobe.ne.jp> ?) +0 string KiSS KISS/GS +>4 byte 16 color +>>5 byte x %d bit +>>8 leshort x %d colors +>>10 leshort x %d groups +>4 byte 32 cell +>>5 byte x %d bit +>>8 leshort x %d x +>>10 leshort x %d +>>12 leshort x +%d +>>14 leshort x +%d + +# Webshots (www.webshots.com), by John Harrison +0 string C\253\221g\230\0\0\0 Webshots Desktop .wbz file + +# Hercules DASD image files +# From Jan Jaeger <jj@septa.nl> +0 string CKD_P370 Hercules CKD DASD image file +>8 long x \b, %d heads per cylinder +>12 long x \b, track size %d bytes +>16 byte x \b, device type 33%2.2X + +0 string CKD_C370 Hercules compressed CKD DASD image file +>8 long x \b, %d heads per cylinder +>12 long x \b, track size %d bytes +>16 byte x \b, device type 33%2.2X + +0 string CKD_S370 Hercules CKD DASD shadow file +>8 long x \b, %d heads per cylinder +>12 long x \b, track size %d bytes +>16 byte x \b, device type 33%2.2X + +# Squeak images and - etoffi@softhome.net +0 string \146\031\0\0 Squeak image data +0 string 'From\040Squeak Squeak program text + +# partimage: file(1) magic for PartImage files (experimental, incomplete) +# Author: Hans-Joachim Baader <hjb@pro-linux.de> +0 string PaRtImAgE-VoLuMe PartImage +>0x0020 string 0.6.1 file version %s +>>0x0060 lelong >-1 volume %ld +#>>0x0064 8 byte identifier +#>>0x007c reserved +>>0x0200 string >\0 type %s +>>0x1400 string >\0 device %s, +>>0x1600 string >\0 original filename %s, +# Some fields omitted +>>0x2744 lelong 0 not compressed +>>0x2744 lelong 1 gzip compressed +>>0x2744 lelong 2 bzip2 compressed +>>0x2744 lelong >2 compressed with unknown algorithm +>0x0020 string >0.6.1 file version %s +>0x0020 string <0.6.1 file version %s + +# DCX is multi-page PCX, using a simple header of up to 1024 +# offsets for the respective PCX components. +# From: Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de> +0 lelong 987654321 DCX multi-page PCX image data + +# Simon Walton <simonw@matteworld.com> +# Kodak Cineon format for scanned negatives +# http://www.kodak.com/US/en/motion/support/dlad/ +0 lelong 0xd75f2a80 Cineon image data +>200 belong >0 \b, %ld x +>204 belong >0 %ld + + +# Bio-Rad .PIC is an image format used by microscope control systems +# and related image processing software used by biologists. +# From: Vebjorn Ljosa <vebjorn@ljosa.com> +54 leshort 12345 Bio-Rad .PIC Image File +>0 leshort >0 %hd x +>2 leshort >0 %hd, +>4 leshort =1 1 image in file +>4 leshort >1 %hd images in file + +# From Jan "Yenya" Kasprzak <kas@fi.muni.cz> +# The description of *.mrw format can be found at +# http://www.dalibor.cz/minolta/raw_file_format.htm +0 string \000MRM Minolta Dimage camera raw image data + +# From: stephane.loeuillet@tiscali.f +# http://www.djvuzone.org/ +0 string AT&TFORM DjVu Image file + +# From: Jason Bacon <bacon@smithers.neuro.mcw.edu> +0 beshort 0x3020 character Computer Graphics Metafile + diff --git a/usr.bin/file/magdir/intel b/usr.bin/file/magdir/intel index d450e266169..d1fc1142228 100644 --- a/usr.bin/file/magdir/intel +++ b/usr.bin/file/magdir/intel @@ -1,3 +1,4 @@ +# $OpenBSD: intel,v 1.3 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # intel: file(1) magic for x86 Unix @@ -33,3 +34,15 @@ 0 leshort =0514 80386 COFF executable >12 lelong >0 not stripped >22 leshort >0 - version %ld + +# rom: file(1) magic for BIOS ROM Extensions found in intel machines +# mapped into memory between 0xC0000 and 0xFFFFF +# From Gürkan Sengün <gurkan@linuks.mine.nu>, www.linuks.mine.nu +0 beshort 0x55AA BIOS (ia32) ROM Ext. +>5 string USB USB +>7 string LDR UNDI image +>30 string IBM IBM comp. Video +>26 string Adaptec Adaptec +>28 string Adaptec Adaptec +>42 string PROMISE Promise +>2 byte x (%d*512) diff --git a/usr.bin/file/magdir/interleaf b/usr.bin/file/magdir/interleaf index 3eea3cff269..ea0eb5fca26 100644 --- a/usr.bin/file/magdir/interleaf +++ b/usr.bin/file/magdir/interleaf @@ -1,3 +1,4 @@ +# $OpenBSD: interleaf,v 1.3 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # interleaf: file(1) magic for InterLeaf TPS: diff --git a/usr.bin/file/magdir/island b/usr.bin/file/magdir/island new file mode 100644 index 00000000000..bbffa3bc3af --- /dev/null +++ b/usr.bin/file/magdir/island @@ -0,0 +1,10 @@ +# $OpenBSD: island,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# island: file(1) magic for IslandWite/IslandDraw, from SunOS 5.5.1 +# "/etc/magic": +# From: guy@netapp.com (Guy Harris) +# +4 string pgscriptver IslandWrite document +13 string DrawFile IslandDraw document + diff --git a/usr.bin/file/magdir/ispell b/usr.bin/file/magdir/ispell index 3c6bcdc883a..4ea8d5cb6d8 100644 --- a/usr.bin/file/magdir/ispell +++ b/usr.bin/file/magdir/ispell @@ -1,3 +1,4 @@ +# $OpenBSD: ispell,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # ispell: file(1) magic for ispell @@ -52,3 +53,11 @@ >2 beshort 0x0E 8-bit, capitalization, 256 flags >2 beshort 0x0F 7-bit, capitalization, 256 flags >4 beshort >0 and %d string characters +# ispell 4.0 hash files kromJx <kromJx@crosswinds.net> +# Ispell 4.0 +0 string ISPL ispell +>4 long x hash file version %d, +>8 long x lexletters %d, +>12 long x lexsize %d, +>16 long x hashsize %d, +>20 long x stblsize %d diff --git a/usr.bin/file/magdir/java b/usr.bin/file/magdir/java index 0b75e7cb720..125754196ba 100644 --- a/usr.bin/file/magdir/java +++ b/usr.bin/file/magdir/java @@ -1,7 +1,13 @@ -# $OpenBSD: java,v 1.2 2001/01/29 01:57:57 niklas Exp $ +# $OpenBSD: java,v 1.3 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------ # Java ByteCode # From Larry Schwimmer (schwim@cs.stanford.edu) -0 belong 0xcafebabe ->4 belong 0x0003002d Java bytecode +0 belong 0xcafebabe compiled Java class data, +>6 beshort x version %d. +>4 beshort x \b%d +#------------------------------------------------------------ +# Java serialization +# From Martin Pool (m.pool@pharos.com.au) +0 beshort 0xaced Java serialization data +>2 beshort >0x0004 \b, version %d diff --git a/usr.bin/file/magdir/jpeg b/usr.bin/file/magdir/jpeg index bedc6c99952..b4ce7676bb2 100644 --- a/usr.bin/file/magdir/jpeg +++ b/usr.bin/file/magdir/jpeg @@ -1,3 +1,4 @@ +# $OpenBSD: jpeg,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # JPEG images @@ -19,9 +20,9 @@ >11 byte x \b %d. >12 byte x \b%02d # Next, the resolution or aspect ratio of the image: ->13 byte 0 \b, aspect ratio ->13 byte 1 \b, resolution (DPI) ->13 byte 2 \b, resolution (DPCM) +#>13 byte 0 \b, aspect ratio +#>13 byte 1 \b, resolution (DPI) +#>13 byte 2 \b, resolution (DPCM) #>4 beshort x \b, segment length %d # Next, show thumbnail info, if it exists: >18 byte !0 \b, thumbnail %dx @@ -54,8 +55,8 @@ # I've commented-out quantisation table reporting. I doubt anyone cares yet. #>(4.S+5) byte 0xDB \b, quantisation table #>>(4.S+6) beshort x \b length=%d ->14 beshort x \b, %d x ->16 beshort x \b %d +#>14 beshort x \b, %d x +#>16 beshort x \b %d # HSI is Handmade Software's proprietary JPEG encoding scheme 0 string hsi1 JPEG image data, HSI proprietary diff --git a/usr.bin/file/magdir/karma b/usr.bin/file/magdir/karma index e256abfd05a..4a39844142b 100644 --- a/usr.bin/file/magdir/karma +++ b/usr.bin/file/magdir/karma @@ -1,3 +1,4 @@ +# $OpenBSD: karma,v 1.4 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # karma: file(1) magic for Karma data files @@ -5,4 +6,4 @@ # From <rgooch@atnf.csiro.au> 0 string KarmaRHD Version Karma Data Structure Version ->16 long x %lu +>16 belong x %lu diff --git a/usr.bin/file/magdir/lecter b/usr.bin/file/magdir/lecter new file mode 100644 index 00000000000..c5081d8e468 --- /dev/null +++ b/usr.bin/file/magdir/lecter @@ -0,0 +1,6 @@ +# $OpenBSD: lecter,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# DEC SRC Virtual Paper: Lectern files +# Karl M. Hegbloom <karlheg@inetarena.com> +0 string lect DEC SRC Virtual Paper Lectern file diff --git a/usr.bin/file/magdir/lex b/usr.bin/file/magdir/lex index 7b6d0f74a40..c881e1e2b71 100644 --- a/usr.bin/file/magdir/lex +++ b/usr.bin/file/magdir/lex @@ -1,3 +1,4 @@ +# $OpenBSD: lex,v 1.3 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # lex: file(1) magic for lex diff --git a/usr.bin/file/magdir/lif b/usr.bin/file/magdir/lif index 7b430a4c553..b8cc01c9013 100644 --- a/usr.bin/file/magdir/lif +++ b/usr.bin/file/magdir/lif @@ -1,7 +1,8 @@ +# $OpenBSD: lif,v 1.3 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # lif: file(1) magic for lif # -# XXX - byte order? (Probably beshort, Daniel Quinlan <quinlan@yggdrasil.com>) +# (Daniel Quinlan <quinlan@yggdrasil.com>) # 0 beshort 0x8000 lif file diff --git a/usr.bin/file/magdir/linux b/usr.bin/file/magdir/linux index 75a2a2b98b6..c69a9cce985 100644 --- a/usr.bin/file/magdir/linux +++ b/usr.bin/file/magdir/linux @@ -1,3 +1,4 @@ +# $OpenBSD: linux,v 1.4 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # linux: file(1) magic for Linux files @@ -23,9 +24,18 @@ # 0 string \007\001\000 Linux/i386 object file >20 lelong >0x1020 \b, DLL library -# message catalogs, from Mitchum DSouza <m.dsouza@mrc-apu.cam.ac.uk> -0 string *nazgul* Linux compiled message catalog ->8 lelong >0 \b, version %ld +# Linux-8086 stuff: +0 string \01\03\020\04 Linux-8086 impure executable +>28 long !0 not stripped +0 string \01\03\040\04 Linux-8086 executable +>28 long !0 not stripped +# +0 string \243\206\001\0 Linux-8086 object file +# +0 string \01\03\020\20 Minix-386 impure executable +>28 long !0 not stripped +0 string \01\03\040\20 Minix-386 executable +>28 long !0 not stripped # core dump file, from Bill Reynolds <bill@goshawk.lanl.gov> 216 lelong 0421 Linux/i386 core file >220 string >\0 of '%s' @@ -35,11 +45,6 @@ # this can be overridden by the DOS executable (COM) entry 2 string LILO Linux/i386 LILO boot/chain loader # -# Debian Packages, from Peter Tobias <tobias@server.et-inf.fho-emden.de> -0 string 0.9 ->8 byte 0x0a Debian Binary Package ->>3 byte >0 \b, created by dpkg 0.9%c ->>4 byte >0 pl%c # PSF fonts, from H. Peter Anvin <hpa@yggdrasil.com> 0 leshort 0x0436 Linux/i386 PC Screen Font data, >2 byte 0 256 characters, no directory, @@ -49,6 +54,10 @@ >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) +>0x400 long x %d (4K pages) +>0x404 long x size %d pages # ECOFF magic for OSF/1 and Linux (only tested under Linux though) # # from Erik Troan (ewt@redhat.com) examining od dumps, so this @@ -63,11 +72,104 @@ >8 long >0 not stripped >8 long 0 stripped >23 leshort >0 - version %ld. -# linux Kernel images version 1.3.80 - ? -# from Axel Kohlmeyer <akohlmey@rincewind.chemie.uni-ulm.de> -0 belong 0xb8c0078e Linux/x86 kernel image, ->0x048c byte 0x31 ->>0x048c string x version %s ->0x0493 byte 0x31 ->>0x0493 string x version %s # +# Linux kernel boot images, from Albert Cahalan <acahalan@cs.uml.edu> +# and others such as Axel Kohlmeyer <akohlmey@rincewind.chemie.uni-ulm.de> +# and Nicolás Lichtmaier <nick@debian.org> +# All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29 +# Linux kernel boot images (i386 arch) (Wolfram Kleff) +514 string HdrS Linux kernel +>510 leshort 0xAA55 x86 boot executable +>>518 leshort >=3D0x200 +>>529 byte 0 zImage, +>>>529 byte 1 bzImage, +>>>(526.s+0x200) string >\0 version %s, +>>498 leshort 1 RO-rootFS, +>>498 leshort 0 RW-rootFS, +>>508 leshort >0 root_dev 0x%X, +>>502 leshort >0 swap_dev 0x%X, +>>504 leshort >0 RAMdisksize %u KB, +>>506 leshort 0xFFFF Normal VGA +>>506 leshort 0xFFFE Extended VGA +>>506 leshort 0xFFFD Prompt for Videomode +>>506 leshort >0 Video mode %d +# This also matches new kernels, which were caught above by "HdrS". +0 belong 0xb8c0078e Linux kernel +>0x1e3 string Loading version 1.3.79 or older +>0x1e9 string Loading from prehistoric times + +# System.map files - Nicolás Lichtmaier <nick@debian.org> +8 string \ A\ _text Linux kernel symbol map text + +# LSM entries - Nicolás Lichtmaier <nick@debian.org> +0 string Begin3 Linux Software Map entry text +0 string Begin4 Linux Software Map entry text (new format) + +# From Matt Zimmerman +0 belong 0x4f4f4f4d User-mode Linux COW file +>4 belong x \b, version %d +>8 string >\0 \b, backing file %s + +############################################################################ +# 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/usr.bin/file/magdir/lisp b/usr.bin/file/magdir/lisp index 736e327297e..e4eb5805cfb 100644 --- a/usr.bin/file/magdir/lisp +++ b/usr.bin/file/magdir/lisp @@ -1,14 +1,33 @@ +# $OpenBSD: lisp,v 1.3 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # 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 -# Emacs 19 -0 string ;ELC\023\000\000\000 byte-compiled Emacs-Lisp program data -# clisp types, from Jim Wise (jimw@fornost.turner.com) +0 string \012( Emacs v18 byte-compiled Lisp data +# 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 <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 +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 + +#.com and .bin for MIT scheme +0 string \372\372\372\372 MIT scheme (library?) + +# From: David Allouche <david@allouche.net> +0 string \<TeXmacs| TeXmacs document text diff --git a/usr.bin/file/magdir/mach b/usr.bin/file/magdir/mach index 0c55fdabf00..2d671c0570c 100644 --- a/usr.bin/file/magdir/mach +++ b/usr.bin/file/magdir/mach @@ -1,20 +1,23 @@ -# $OpenBSD: mach,v 1.2 2001/01/29 01:57:57 niklas Exp $ +# $OpenBSD: mach,v 1.3 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # mach file description # -0 belong 0xcafebabe mach-o fat file +0 belong 0xcafebabe Mach-O fat file >4 belong 1 with 1 architecture >4 belong >1 >>4 belong x with %ld architectures # -0 belong 0xfeedface mach-o +0 belong 0xfeedface Mach-O >12 belong 1 object >12 belong 2 executable >12 belong 3 shared library >12 belong 4 core >12 belong 5 preload executable ->12 belong >5 +>12 belong 6 dynamically linked shared library +>12 belong 7 dynamic linker +>12 belong 8 bundle +>12 belong >8 >>12 belong x filetype=%ld >4 belong <0 >>4 belong x architecture=%ld @@ -24,6 +27,11 @@ >4 belong 4 ns32032 >4 belong 5 ns32332 >4 belong 6 for m68k architecture +# from NeXTstep 3.0 <mach/machine.h> +# i.e. mc680x0_all, ignore +# >>8 belong 1 (mc68030) +>>8 belong 2 (mc68040) +>>8 belong 3 (mc68030 only) >4 belong 7 i386 >4 belong 8 mips >4 belong 9 ns32532 @@ -35,6 +43,6 @@ >4 belong 15 i860-big >4 belong 16 i860 >4 belong 17 rs6000 ->4 belong 18 powerPC +>4 belong 18 ppc >4 belong >18 >>4 belong x architecture=%ld diff --git a/usr.bin/file/magdir/macintosh b/usr.bin/file/magdir/macintosh index d2503831bad..e021398d791 100644 --- a/usr.bin/file/magdir/macintosh +++ b/usr.bin/file/magdir/macintosh @@ -1,3 +1,4 @@ +# $OpenBSD: macintosh,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # macintosh: file(1) magic for Apple Macintosh file formats diff --git a/usr.bin/file/magdir/magic b/usr.bin/file/magdir/magic index 4a639c6579c..9818e522b9a 100644 --- a/usr.bin/file/magdir/magic +++ b/usr.bin/file/magdir/magic @@ -1,3 +1,4 @@ +# $OpenBSD: magic,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # magic: file(1) magic for magic files diff --git a/usr.bin/file/magdir/mail.news b/usr.bin/file/magdir/mail.news index bd3fd2de43a..8ac7cbfff69 100644 --- a/usr.bin/file/magdir/mail.news +++ b/usr.bin/file/magdir/mail.news @@ -1,3 +1,4 @@ +# $OpenBSD: mail.news,v 1.4 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # mail.news: file(1) magic for mail and news @@ -18,4 +19,23 @@ 0 string BABYL Emacs RMAIL text 0 string Received: RFC 822 mail text 0 string MIME-Version: MIME entity text -0 string Content- MIME entity text +#0 string Content- MIME entity text + +# TNEF files... +0 lelong 0x223E9F78 Transport Neutral Encapsulation Format + +# From: Kevin Sullivan <ksulliva@psc.edu> +0 string *mbx* MBX mail folder + +# From: Simon Matter <simon.matter@invoca.ch> +0 string \241\002\213\015skiplist\ file\0\0\0 Cyrus skiplist DB + +# JAM(mbp) Fidonet message area databases +# JHR file +0 string JAM\0 JAM message area header file +>12 leshort >0 (%d messages) + +# Squish Fidonet message area databases +# SQD file (requires at least one message in the area) +256 leshort 0xAFAE4453 Squish message area data file +>4 leshort >0 (%d messages) diff --git a/usr.bin/file/magdir/maple b/usr.bin/file/magdir/maple new file mode 100644 index 00000000000..7290c27035f --- /dev/null +++ b/usr.bin/file/magdir/maple @@ -0,0 +1,58 @@ +# $OpenBSD: maple,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# maple: file(1) magic for maple files +# "H. Nanosecond" <aldomel@ix.netcom.com> +# Maple V release 4, a multi-purpose math program +# + +# maple library .lib +0 string \000MVR4\nI MapleVr4 library + +# .ind +# no magic for these :-( +# they are compiled indexes for maple files + +# .hdb +0 string \000\004\000\000 Maple help database + +# .mhp +# this has the form <PACKAGE=name> +0 string \<PACKAGE= Maple help file +0 string \<HELP\ NAME= Maple help file +0 string \n\<HELP\ NAME= Maple help file with extra carriage return at start (yuck) +#0 string #\ Newton Maple help file, old style +0 string #\ daub Maple help file, old style +#0 string #=========== Maple help file, old style + +# .mws +0 string \000\000\001\044\000\221 Maple worksheet +#this is anomalous +0 string WriteNow\000\002\000\001\000\000\000\000\100\000\000\000\000\000 Maple worksheet, but weird +# this has the form {VERSION 2 3 "IBM INTEL NT" "2.3" }\n +# that is {VERSION major_version miunor_version computer_type version_string} +0 string {VERSION\ Maple worksheet +>9 string >\0 version %.1s. +>>10 string +>>>11 string >\0 %.1s + +# .mps +0 string \0\0\001$ Maple something +# from byte 4 it is either 'nul E' or 'soh R' +# I think 'nul E' means a file that was saved as a different name +# a sort of revision marking +# 'soh R' means new +>4 string \000\105 An old revision +>4 string \001\122 The latest save + +# .mpl +# some of these are the same as .mps above +#0000000 000 000 001 044 000 105 same as .mps +#0000000 000 000 001 044 001 122 same as .mps + +0 string #\n##\ <SHAREFILE= Maple something +0 string \n#\n##\ <SHAREFILE= Maple something +0 string ##\ <SHAREFILE= Maple something +0 string #\r##\ <SHAREFILE= Maple something +0 string \r#\r##\ <SHAREFILE= Maple something +0 string #\ \r##\ <DESCRIBE> Maple something anomalous. diff --git a/usr.bin/file/magdir/mathematica b/usr.bin/file/magdir/mathematica new file mode 100644 index 00000000000..8cf58d2cfff --- /dev/null +++ b/usr.bin/file/magdir/mathematica @@ -0,0 +1,69 @@ +# $OpenBSD: mathematica,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# mathematica: file(1) magic for mathematica files +# "H. Nanosecond" <aldomel@ix.netcom.com> +# Mathematica a multi-purpose math program +# versions 2.2 and 3.0 + +#mathematica .mb +0 string \064\024\012\000\035\000\000\000 Mathematica version 2 notebook +0 string \064\024\011\000\035\000\000\000 Mathematica version 2 notebook + +# .ma +# multiple possibilites: + +0 string (*^\n\n::[\011frontEndVersion\ =\ Mathematica notebook +#>41 string >\0 %s + +#0 string (*^\n\n::[\011palette Mathematica notebook version 2.x + +#0 string (*^\n\n::[\011Information Mathematica notebook version 2.x +#>675 string >\0 %s #doesn't work well + +# there may be 'cr' instread of 'nl' in some does this matter? + +# generic: +0 string (*^\r\r::[\011 Mathematica notebook version 2.x +0 string \(\*\^\r\n\r\n\:\:\[\011 Mathematica notebook version 2.x +0 string (*^\015 Mathematica notebook version 2.x +0 string (*^\n\r\n\r::[\011 Mathematica notebook version 2.x +0 string (*^\r::[\011 Mathematica notebook version 2.x +0 string (*^\r\n::[\011 Mathematica notebook version 2.x +0 string (*^\n\n::[\011 Mathematica notebook version 2.x +0 string (*^\n::[\011 Mathematica notebook version 2.x + + +# Mathematica .mx files + +#0 string (*This\ is\ a\ Mathematica\ binary\ dump\ file.\ It\ can\ be\ loaded\ with\ Get.*) Mathematica binary file +0 string (*This\ is\ a\ Mathematica\ binary\ Mathematica binary file +#>71 string \000\010\010\010\010\000\000\000\000\000\000\010\100\010\000\000\000 +# >71... is optional +>88 string >\0 from %s + + +# Mathematica files PBF: +# 115 115 101 120 102 106 000 001 000 000 000 203 000 001 000 +0 string MMAPBF\000\001\000\000\000\203\000\001\000 Mathematica PBF (fonts I think) + +# .ml files These are menu resources I think +# these start with "[0-9][0-9][0-9]\ A~[0-9][0-9][0-9]\ +# how to put that into a magic rule? +4 string \ A~ MAthematica .ml file + +# .nb files +#too long 0 string (***********************************************************************\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Mathematica-Compatible Notebook Mathematica 3.0 notebook +0 string (*********************** Mathematica 3.0 notebook + +# other (* matches it is a comment start in these langs +0 string (* Mathematica, or Pascal, Modula-2 or 3 code text + +######################### +# MatLab v5 +0 string MATLAB Matlab v5 mat-file +>126 short 0x494d (big endian) +>>124 beshort x version 0x%04x +>126 short 0x4d49 (little endian) +>>124 leshort x version 0x%04x + diff --git a/usr.bin/file/magdir/mcrypt b/usr.bin/file/magdir/mcrypt new file mode 100644 index 00000000000..963798a27c1 --- /dev/null +++ b/usr.bin/file/magdir/mcrypt @@ -0,0 +1,38 @@ +# $OpenBSD: mcrypt,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# Mavroyanopoulos Nikos <nmav@hellug.gr> +# mcrypt: file(1) magic for mcrypt 2.2.x; +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/usr.bin/file/magdir/mime b/usr.bin/file/magdir/mime new file mode 100644 index 00000000000..3a082c4e052 --- /dev/null +++ b/usr.bin/file/magdir/mime @@ -0,0 +1,9 @@ +# $OpenBSD: mime,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# mime: file(1) magic for MIME encoded files +# +0 string Content-Type:\ +>14 string >\0 %s +0 string Content-Type: +>13 string >\0 %s diff --git a/usr.bin/file/magdir/mirage b/usr.bin/file/magdir/mirage index 73c3747bb7f..14887dd470a 100644 --- a/usr.bin/file/magdir/mirage +++ b/usr.bin/file/magdir/mirage @@ -1,3 +1,4 @@ +# $OpenBSD: mirage,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # mirage: file(1) magic for Mirage executables diff --git a/usr.bin/file/magdir/misctools b/usr.bin/file/magdir/misctools new file mode 100644 index 00000000000..f72ed5cf768 --- /dev/null +++ b/usr.bin/file/magdir/misctools @@ -0,0 +1,7 @@ +# $OpenBSD: misctools,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#----------------------------------------------------------------------------- +# misctools: file(1) magic for miscelanous UNIX tools. +# +0 string %%!! X-Post-It-Note text +0 string BEGIN:VCALENDAR vCalendar calendar file diff --git a/usr.bin/file/magdir/mkid b/usr.bin/file/magdir/mkid index dfb2d93f438..d6a4219988e 100644 --- a/usr.bin/file/magdir/mkid +++ b/usr.bin/file/magdir/mkid @@ -1,3 +1,4 @@ +# $OpenBSD: mkid,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # mkid: file(1) magic for mkid(1) databases diff --git a/usr.bin/file/magdir/mlssa b/usr.bin/file/magdir/mlssa new file mode 100644 index 00000000000..1355c010c8b --- /dev/null +++ b/usr.bin/file/magdir/mlssa @@ -0,0 +1,8 @@ +# $OpenBSD: mlssa,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# 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/usr.bin/file/magdir/mmdf b/usr.bin/file/magdir/mmdf index 72cd9f32581..165e20ded31 100644 --- a/usr.bin/file/magdir/mmdf +++ b/usr.bin/file/magdir/mmdf @@ -1,3 +1,4 @@ +# $OpenBSD: mmdf,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # mmdf: file(1) magic for MMDF mail files diff --git a/usr.bin/file/magdir/modem b/usr.bin/file/magdir/modem new file mode 100644 index 00000000000..0905d9a9ce6 --- /dev/null +++ b/usr.bin/file/magdir/modem @@ -0,0 +1,35 @@ +# $OpenBSD: modem,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# modem: file(1) magic for modem programs +# +# From: Florian La Roche <florian@knorke.saar.de> +4 string Research, Digifax-G3-File +>29 byte 1 , fine resolution +>29 byte 0 , normal resolution + +0 short 0x0100 raw G3 data, byte-padded +0 short 0x1400 raw G3 data +# +# Magic data for vgetty voice formats +# (Martin Seine & Marc Eberhard) + +# +# raw modem data version 1 +# +0 string RMD1 raw modem data +>4 string >\0 (%s / +>20 short >0 compression type 0x%04x) + +# +# portable voice format 1 +# +0 string PVF1\n portable voice format +>5 string >\0 (binary %s) + +# +# portable voice format 2 +# +0 string PVF2\n portable voice format +>5 string >\0 (ascii %s) + diff --git a/usr.bin/file/magdir/motorola b/usr.bin/file/magdir/motorola index efed159746e..28b9c33a0a3 100644 --- a/usr.bin/file/magdir/motorola +++ b/usr.bin/file/magdir/motorola @@ -1,3 +1,4 @@ +# $OpenBSD: motorola,v 1.3 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # motorola: file(1) magic for Motorola 68K and 88K binaries @@ -30,3 +31,41 @@ # # Motorola S-Records, from Gerd Truschinski <gt@freebsd.first.gmd.de> 0 string S0 Motorola S-Record; binary data in text format + +# ATARI ST relocatable PRG +# +# from Oskar Schirmer <schirmer@scara.com> Feb 3, 2001 +# (according to Roland Waldi, Oct 21, 1987) +# besides the magic 0x601a, the text segment size is checked to be +# not larger than 1 MB (which is a lot on ST). +# The additional 0x601b distinction I took from Doug Lee's magic. +0 belong&0xFFFFFFF0 0x601A0000 Atari ST M68K contiguous executable +>2 belong x (txt=%ld, +>6 belong x dat=%ld, +>10 belong x bss=%ld, +>14 belong x sym=%ld) +0 belong&0xFFFFFFF0 0x601B0000 Atari ST M68K non-contig executable +>2 belong x (txt=%ld, +>6 belong x dat=%ld, +>10 belong x bss=%ld, +>14 belong x sym=%ld) + +# Atari ST/TT... program format (sent by Wolfram Kleff <kleff@cs.uni-bonn.de>) +0 beshort 0x601A Atari 68xxx executable, +>2 belong x text len %lu, +>6 belong x data len %lu, +>10 belong x BSS len %lu, +>14 belong x symboltab len %lu, +>18 belong 0 +>22 belong &0x01 fastload flag, +>22 belong &0x02 may be loaded to alternate RAM, +>22 belong &0x04 malloc may be from alternate RAM, +>22 belong x flags: 0x%lX, +>26 beshort 0 no relocation tab +>26 beshort !0 + relocation tab +>30 string SFX [Self-Extracting LZH SFX archive] +>38 string SFX [Self-Extracting LZH SFX archive] +>44 string ZIP! [Self-Extracting ZIP SFX archive] + +0 beshort 0x0064 Atari 68xxx CPX file +>8 beshort x (version %04lx) diff --git a/usr.bin/file/magdir/msdos b/usr.bin/file/magdir/msdos index db2c03edfe0..9f57979e958 100644 --- a/usr.bin/file/magdir/msdos +++ b/usr.bin/file/magdir/msdos @@ -1,3 +1,4 @@ +# $OpenBSD: msdos,v 1.3 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # msdos: file(1) magic for MS-DOS files diff --git a/usr.bin/file/magdir/msvc b/usr.bin/file/magdir/msvc new file mode 100644 index 00000000000..c2e8f0b98f7 --- /dev/null +++ b/usr.bin/file/magdir/msvc @@ -0,0 +1,45 @@ +# $OpenBSD: msvc,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# msvc: file(1) magic for msvc +# "H. Nanosecond" <aldomel@ix.netcom.com> +# Microsoft visual C +# +# I have version 1.0 + +# .aps +0 string HWB\000\377\001\000\000\000 Microsoft Visual C .APS file + +# .ide +#too long 0 string \102\157\162\154\141\156\144\040\103\053\053\040\120\162\157\152\145\143\164\040\106\151\154\145\012\000\032\000\002\000\262\000\272\276\372\316 MSVC .ide +0 string \102\157\162\154\141\156\144\040\103\053\053\040\120\162\157 MSVC .ide + +# .res +0 string \000\000\000\000\040\000\000\000\377 MSVC .res +0 string \377\003\000\377\001\000\020\020\350 MSVC .res +0 string \377\003\000\377\001\000\060\020\350 MSVC .res + +#.lib +0 string \360\015\000\000 Microsoft Visual C library +0 string \360\075\000\000 Microsoft Visual C library +0 string \360\175\000\000 Microsoft Visual C library + +#.pch +0 string DTJPCH0\000\022\103\006\200 Microsoft Visual C .pch + +# .pdb +# too long 0 string Microsoft\ C/C++\ program\ database\ +0 string Microsoft\ C/C++\ MSVC program database +>18 string program\ database\ +>33 string >\0 ver %s + +#.sbr +0 string \000\002\000\007\000 MSVC .sbr +>5 string >\0 %s + +#.bsc +0 string \002\000\002\001 MSVC .bsc + +#.wsp +0 string 1.00\ .0000.0000\000\003 MSVC .wsp version 1.0000.0000 +# these seem to start with the version and contain menus diff --git a/usr.bin/file/magdir/natinst b/usr.bin/file/magdir/natinst new file mode 100644 index 00000000000..913b332d9a1 --- /dev/null +++ b/usr.bin/file/magdir/natinst @@ -0,0 +1,24 @@ +# $OpenBSD: natinst,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#----------------------------------------------------------------------------- +# natinst: file(1) magic for National Instruments Code Files + +# +# From <egamez@fcfm.buap.mx> Enrique Gámez-Flores +# version 1 +# Many formats still missing, we use, for the moment LabVIEW +# We guess VXI format file. VISA, LabWindowsCVI, BridgeVIEW, etc, are missing +# +0 string RSRC National Instruments, +# Check if it's a LabVIEW File +>8 string LV LabVIEW File, +# Check wich kind of file is +>>10 string SB Code Resource File, data +>>10 string IN Virtual Instrument Program, data +>>10 string AR VI Library, data +# This is for Menu Libraries +>8 string LMNULBVW Portable File Names, data +# This is for General Resources +>8 string rsc Resources File, data +# This is for VXI Package +0 string VMAP National Instruments, VXI File, data diff --git a/usr.bin/file/magdir/ncr b/usr.bin/file/magdir/ncr index 987c94e4a84..1c2117a03af 100644 --- a/usr.bin/file/magdir/ncr +++ b/usr.bin/file/magdir/ncr @@ -1,3 +1,4 @@ +# $OpenBSD: ncr,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # ncr: file(1) magic for NCR Tower objects diff --git a/usr.bin/file/magdir/netscape b/usr.bin/file/magdir/netscape new file mode 100644 index 00000000000..5d7e77f9642 --- /dev/null +++ b/usr.bin/file/magdir/netscape @@ -0,0 +1,25 @@ +# $OpenBSD: netscape,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# netscape: file(1) magic for Netscape files +# "H. Nanosecond" <aldomel@ix.netcom.com> +# version 3 and 4 I think +# + +# Netscape Address book .nab +0 string \000\017\102\104\000\000\000\000\000\000\001\000\000\000\000\002\000\000\000\002\000\000\004\000 Netscape Address book + +# Netscape Communicator address book +0 string \000\017\102\111 Netscape Communicator address book + +# .snm Caches +0 string #\ Netscape\ folder\ cache Netscape folder cache +0 string \000\036\204\220\000 Netscape folder cache +# .n2p +# Net 2 Phone +#0 string 123\130\071\066\061\071\071\071\060\070\061\060\061\063\060 +0 string SX961999 Net2phone + +# +#This is files ending in .art, FIXME add more rules +0 string JG\004\016\0\0\0\0 ART diff --git a/usr.bin/file/magdir/news b/usr.bin/file/magdir/news index 0ac4fa26974..95efd07f32c 100644 --- a/usr.bin/file/magdir/news +++ b/usr.bin/file/magdir/news @@ -1,3 +1,4 @@ +# $OpenBSD: news,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # news: file(1) magic for SunOS NeWS fonts (not "news" as in "netnews") diff --git a/usr.bin/file/magdir/nitpicker b/usr.bin/file/magdir/nitpicker new file mode 100644 index 00000000000..6e525fbc5e7 --- /dev/null +++ b/usr.bin/file/magdir/nitpicker @@ -0,0 +1,14 @@ +# $OpenBSD: nitpicker,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# 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/usr.bin/file/magdir/ocaml b/usr.bin/file/magdir/ocaml new file mode 100644 index 00000000000..9f135a1192d --- /dev/null +++ b/usr.bin/file/magdir/ocaml @@ -0,0 +1,14 @@ +# $OpenBSD: ocaml,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# ocaml: file(1) magic for Objective Caml files. +0 string Caml1999 Objective caml +>8 string X exec file +>8 string I interface file (.cmi) +>8 string O object file (.cmo) +>8 string A library file (.cma) +>8 string Y native object file (.cmx) +>8 string Z native library file (.cmxa) +>8 string M abstract syntax tree implementation file +>8 string N abstract syntax tree interface file +>9 string >\0 (Version %3.3s). diff --git a/usr.bin/file/magdir/octave b/usr.bin/file/magdir/octave new file mode 100644 index 00000000000..7037e9bc120 --- /dev/null +++ b/usr.bin/file/magdir/octave @@ -0,0 +1,6 @@ +# $OpenBSD: octave,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# octave binary data file(1) magic, from Dirk Eddelbuettel <edd@debian.org> +0 string Octave-1-L Octave binary data (little endian) +0 string Octave-1-B Octave binary data (big endian) diff --git a/usr.bin/file/magdir/olf b/usr.bin/file/magdir/olf index 0a9c2cc9ad1..b691ff3c38e 100644 --- a/usr.bin/file/magdir/olf +++ b/usr.bin/file/magdir/olf @@ -1,3 +1,4 @@ +# $OpenBSD: olf,v 1.6 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # olf: file(1) magic for OLF executables diff --git a/usr.bin/file/magdir/os2 b/usr.bin/file/magdir/os2 new file mode 100644 index 00000000000..f2a269050c1 --- /dev/null +++ b/usr.bin/file/magdir/os2 @@ -0,0 +1,48 @@ +# $OpenBSD: os2,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# os2: file(1) magic for OS/2 files +# + +# Provided 1998/08/22 by +# David Mediavilla <davidme.news@REMOVEIFNOTSPAMusa.net> +1 string InternetShortcut MS Windows 95 Internet shortcut text +>24 string >\ (URL=<%s>) + +# OS/2 URL objects +# Provided 1998/08/22 by +# David Mediavilla <davidme.news@REMOVEIFNOTSPAMusa.net> +#0 string http: OS/2 URL object text +#>5 string >\ (WWW) <http:%s> +#0 string mailto: OS/2 URL object text +#>7 string >\ (email) <%s> +#0 string news: OS/2 URL object text +#>5 string >\ (Usenet) <%s> +#0 string ftp: OS/2 URL object text +#>4 string >\ (FTP) <ftp:%s> +#0 string file: OS/2 URL object text +#>5 string >\ (Local file) <%s> + +# >>>>> OS/2 INF/HLP <<<<< (source: Daniel Dissett ddissett@netcom.com) +# Carl Hauser (chauser.parc@xerox.com) and +# Marcus Groeber (marcusg@ph-cip.uni-koeln.de) +# list the following header format in inf02a.doc: +# +# int16 ID; // ID magic word (5348h = "HS") +# int8 unknown1; // unknown purpose, could be third letter of ID +# int8 flags; // probably a flag word... +# // bit 0: set if INF style file +# // bit 4: set if HLP style file +# // patching this byte allows reading HLP files +# // using the VIEW command, while help files +# // seem to work with INF settings here as well. +# int16 hdrsize; // total size of header +# int16 unknown2; // unknown purpose +# +0 string HSP\x01\x9b\x00 OS/2 INF +>107 string >0 (%s) +0 string HSP\x10\x9b\x00 OS/2 HLP +>107 string >0 (%s) + +# OS/2 INI (this is a guess) +0 string \xff\xff\xff\xff\x14\0\0\0 OS/2 INI diff --git a/usr.bin/file/magdir/os9 b/usr.bin/file/magdir/os9 index b92a1cbb25b..8522babcfc9 100644 --- a/usr.bin/file/magdir/os9 +++ b/usr.bin/file/magdir/os9 @@ -1,5 +1,5 @@ -# -# $OpenBSD: os9,v 1.2 1996/06/26 05:33:04 deraadt Exp $ +# $OpenBSD: os9,v 1.3 2004/06/03 03:14:20 tedu Exp $ + # $NetBSD: os9,v 1.1 1996/05/06 18:24:01 is Exp $ # # Copyright (c) 1996 Ignatios Souvatzis. All rights reserved. diff --git a/usr.bin/file/magdir/parix b/usr.bin/file/magdir/parix new file mode 100644 index 00000000000..76dfb9e316b --- /dev/null +++ b/usr.bin/file/magdir/parix @@ -0,0 +1,13 @@ +# $OpenBSD: parix,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# +# Parix COFF executables +# From: Ignatios Souvatzis <ignatios@cs.uni-bonn.de> +# +0 beshort&0xfff 0xACE PARIX +>0 byte&0xf0 0x80 T800 +>0 byte&0xf0 0x90 T9000 +>19 byte&0x02 0x02 executable +>19 byte&0x02 0x00 object +>19 byte&0x0c 0x00 not stripped diff --git a/usr.bin/file/magdir/pbm b/usr.bin/file/magdir/pbm index 98c15f79485..1565aec58b6 100644 --- a/usr.bin/file/magdir/pbm +++ b/usr.bin/file/magdir/pbm @@ -1,3 +1,4 @@ +# $OpenBSD: pbm,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # pbm: file(1) magic for Portable Bitmap files diff --git a/usr.bin/file/magdir/pdp b/usr.bin/file/magdir/pdp index 201dede3551..06770630e25 100644 --- a/usr.bin/file/magdir/pdp +++ b/usr.bin/file/magdir/pdp @@ -1,3 +1,4 @@ +# $OpenBSD: pdp,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # pdp: file(1) magic for PDP-11 executable/object and APL workspace @@ -23,3 +24,13 @@ >15 byte >0 - version %ld 0 leshort 0437 PDP-11 kernel overlay + +# These last three are derived from 2.11BSD file(1) +0 leshort 0413 PDP-11 demand-paged pure executable +>8 leshort >0 not stripped + +0 leshort 0430 PDP-11 overlaid pure executable +>8 leshort >0 not stripped + +0 leshort 0431 PDP-11 overlaid separate executable +>8 leshort >0 not stripped diff --git a/usr.bin/file/magdir/pgp b/usr.bin/file/magdir/pgp index 038d098ee4a..e07fcdb4ced 100644 --- a/usr.bin/file/magdir/pgp +++ b/usr.bin/file/magdir/pgp @@ -1,3 +1,4 @@ +# $OpenBSD: pgp,v 1.4 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # pgp: file(1) magic for Pretty Good Privacy diff --git a/usr.bin/file/magdir/pkgadd b/usr.bin/file/magdir/pkgadd index dc8ef5d93ab..cd029422b70 100644 --- a/usr.bin/file/magdir/pkgadd +++ b/usr.bin/file/magdir/pkgadd @@ -1,3 +1,4 @@ +# $OpenBSD: pkgadd,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # pkgadd: file(1) magic for SysV R4 PKG Datastreams diff --git a/usr.bin/file/magdir/plan9 b/usr.bin/file/magdir/plan9 new file mode 100644 index 00000000000..e77e9389593 --- /dev/null +++ b/usr.bin/file/magdir/plan9 @@ -0,0 +1,6 @@ +# $OpenBSD: plan9,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# plan9: file(1) magic for AT&T Bell Labs' Plan 9 executables +# +0 belong 0x000001EB Plan 9 executable diff --git a/usr.bin/file/magdir/plus5 b/usr.bin/file/magdir/plus5 index acf3bf4037b..689fa447bb4 100644 --- a/usr.bin/file/magdir/plus5 +++ b/usr.bin/file/magdir/plus5 @@ -1,3 +1,4 @@ +# $OpenBSD: plus5,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # plus5: file(1) magic for Plus Five's UNIX MUMPS diff --git a/usr.bin/file/magdir/printer b/usr.bin/file/magdir/printer index d03067e42ce..9d5b51c63dc 100644 --- a/usr.bin/file/magdir/printer +++ b/usr.bin/file/magdir/printer @@ -1,3 +1,4 @@ +# $OpenBSD: printer,v 1.5 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # printer: file(1) magic for printer-formatted files diff --git a/usr.bin/file/magdir/project b/usr.bin/file/magdir/project new file mode 100644 index 00000000000..73af7ffe584 --- /dev/null +++ b/usr.bin/file/magdir/project @@ -0,0 +1,10 @@ +# $OpenBSD: project,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# project: file(1) magic for Project management +# +# Magic strings for ftnchek project files. Alexander Mai +0 string FTNCHEK_\ P project file for ftnchek +>10 string 1 version 2.7 +>10 string 2 version 2.8 to 2.10 +>10 string 3 version 2.11 or later diff --git a/usr.bin/file/magdir/psdbms b/usr.bin/file/magdir/psdbms index f36121fcbcd..a06c0c574c3 100644 --- a/usr.bin/file/magdir/psdbms +++ b/usr.bin/file/magdir/psdbms @@ -1,3 +1,4 @@ +# $OpenBSD: psdbms,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # psdbms: file(1) magic for psdatabase diff --git a/usr.bin/file/magdir/psion b/usr.bin/file/magdir/psion new file mode 100644 index 00000000000..01e5509a42d --- /dev/null +++ b/usr.bin/file/magdir/psion @@ -0,0 +1,44 @@ +# $OpenBSD: psion,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# psion: file(1) magic for Psion handhelds data +# from: Peter Breitenlohner <peb@mppmu.mpg.de> +# +0 lelong 0x10000037 Psion Series 5 +>4 lelong 0x10000039 font file +>4 lelong 0x1000003A printer driver +>4 lelong 0x1000003B clipboard +>4 lelong 0x10000042 multi-bitmap image +>4 lelong 0x1000006A application infomation file +>4 lelong 0x1000006D +>>8 lelong 0x1000007D sketch image +>>8 lelong 0x1000007E voice note +>>8 lelong 0x1000007F word file +>>8 lelong 0x10000085 OPL program +>>8 lelong 0x10000088 sheet file +>>8 lelong 0x100001C4 EasyFax initialisation file +>4 lelong 0x10000073 OPO module +>4 lelong 0x10000074 OPL application +>4 lelong 0x1000008A exported multi-bitmap image + +0 lelong 0x10000041 Psion Series 5 ROM multi-bitmap image + +0 lelong 0x10000050 Psion Series 5 +>4 lelong 0x1000006D database +>4 lelong 0x100000E4 ini file + +0 lelong 0x10000079 Psion Series 5 binary: +>4 lelong 0x00000000 DLL +>4 lelong 0x10000049 comms hardware library +>4 lelong 0x1000004A comms protocol library +>4 lelong 0x1000005D OPX +>4 lelong 0x1000006C application +>4 lelong 0x1000008D DLL +>4 lelong 0x100000AC logical device driver +>4 lelong 0x100000AD physical device driver +>4 lelong 0x100000E5 file transfer protocol +>4 lelong 0x100000E5 file transfer protocol +>4 lelong 0x10000140 printer defintion +>4 lelong 0x10000141 printer defintion + +0 lelong 0x1000007A Psion Series 5 executable diff --git a/usr.bin/file/magdir/pulsar b/usr.bin/file/magdir/pulsar new file mode 100644 index 00000000000..94eaa98e623 --- /dev/null +++ b/usr.bin/file/magdir/pulsar @@ -0,0 +1,13 @@ +# $OpenBSD: pulsar,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# 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/usr.bin/file/magdir/pyramid b/usr.bin/file/magdir/pyramid index fe16608436b..7dcc927ab6c 100644 --- a/usr.bin/file/magdir/pyramid +++ b/usr.bin/file/magdir/pyramid @@ -1,3 +1,4 @@ +# $OpenBSD: pyramid,v 1.3 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # pyramid: file(1) magic for Pyramids diff --git a/usr.bin/file/magdir/python b/usr.bin/file/magdir/python new file mode 100644 index 00000000000..129309a4ef2 --- /dev/null +++ b/usr.bin/file/magdir/python @@ -0,0 +1,15 @@ +# $OpenBSD: python,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# python: file(1) magic for python +# +# From: David Necas <yeti@physics.muni.cz> +# often the module starts with a multiline string +0 string """ a python script text executable +# MAGIC as specified in Python/import.c (1.5 to 2.3.0a) +# 20121 ( YEAR - 1995 ) + MONTH + DAY (little endian followed by "\r\n" +0 belong 0x994e0d0a python 1.5/1.6 byte-compiled +0 belong 0x87c60d0a python 2.0 byte-compiled +0 belong 0x2aeb0d0a python 2.1 byte-compiled +0 belong 0x2ded0d0a python 2.2 byte-compiled +0 belong 0x3bf20d0a python 2.3 byte-compiled diff --git a/usr.bin/file/magdir/revision b/usr.bin/file/magdir/revision new file mode 100644 index 00000000000..0333c8ef7ab --- /dev/null +++ b/usr.bin/file/magdir/revision @@ -0,0 +1,6 @@ +# $OpenBSD: revision,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# file(1) magic for revision control files +# From Hendrik Scholz <hendrik@scholz.net> +0 string /1\ :pserver: cvs password text file diff --git a/usr.bin/file/magdir/rpm b/usr.bin/file/magdir/rpm index 94d6343be6f..eb87b23ea48 100644 --- a/usr.bin/file/magdir/rpm +++ b/usr.bin/file/magdir/rpm @@ -1,10 +1,10 @@ -# $OpenBSD: rpm,v 1.4 2001/01/29 01:57:58 niklas Exp $ +# $OpenBSD: rpm,v 1.5 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # # RPM: file(1) magic for Red Hat Packages Erik Troan (ewt@redhat.com) # -0 beshort 0xedab +0 beshort 0xedab >2 beshort 0xeedb RPM >>4 byte x v%d >>6 beshort 0 bin @@ -15,5 +15,10 @@ >>8 beshort 4 MIPS >>8 beshort 5 PowerPC >>8 beshort 6 68000 ->>8 beshort 7 SGI +>>8 beshort 7 SGI +>>8 beshort 8 RS6000 +>>8 beshort 9 IA64 +>>8 beshort 10 Sparc64 +>>8 beshort 11 MIPSel +>>8 beshort 12 ARM >>10 string x %s diff --git a/usr.bin/file/magdir/rtf b/usr.bin/file/magdir/rtf index 8e2d4166fa5..d4c4014cea3 100644 --- a/usr.bin/file/magdir/rtf +++ b/usr.bin/file/magdir/rtf @@ -1,3 +1,4 @@ +# $OpenBSD: rtf,v 1.3 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # rtf: file(1) magic for Rich Text Format (RTF) diff --git a/usr.bin/file/magdir/sc b/usr.bin/file/magdir/sc index 98599f26478..23b0f710a7c 100644 --- a/usr.bin/file/magdir/sc +++ b/usr.bin/file/magdir/sc @@ -1,3 +1,4 @@ +# $OpenBSD: sc,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # sc: file(1) magic for "sc" spreadsheet diff --git a/usr.bin/file/magdir/sccs b/usr.bin/file/magdir/sccs index 11d50b23c00..c810a950c60 100644 --- a/usr.bin/file/magdir/sccs +++ b/usr.bin/file/magdir/sccs @@ -1,3 +1,4 @@ +# $OpenBSD: sccs,v 1.3 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # sccs: file(1) magic for SCCS archives diff --git a/usr.bin/file/magdir/sendmail b/usr.bin/file/magdir/sendmail index 503ef8967ad..500a1ef79ff 100644 --- a/usr.bin/file/magdir/sendmail +++ b/usr.bin/file/magdir/sendmail @@ -1,3 +1,4 @@ +# $OpenBSD: sendmail,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # sendmail: file(1) magic for sendmail config files @@ -8,3 +9,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/usr.bin/file/magdir/sequent b/usr.bin/file/magdir/sequent index e6f7b52aacb..9ef4012e5a6 100644 --- a/usr.bin/file/magdir/sequent +++ b/usr.bin/file/magdir/sequent @@ -1,3 +1,4 @@ +# $OpenBSD: sequent,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # sequent: file(1) magic for Sequent machines diff --git a/usr.bin/file/magdir/sgi b/usr.bin/file/magdir/sgi index ce9dbc8b274..2d7780e7063 100644 --- a/usr.bin/file/magdir/sgi +++ b/usr.bin/file/magdir/sgi @@ -1,3 +1,4 @@ +# $OpenBSD: sgi,v 1.3 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # sgi: file(1) magic for Silicon Graphics (MIPS, IRIS, IRIX, etc.) diff --git a/usr.bin/file/magdir/sgml b/usr.bin/file/magdir/sgml index 985bbeca21e..de91e2ec1fb 100644 --- a/usr.bin/file/magdir/sgml +++ b/usr.bin/file/magdir/sgml @@ -1,21 +1,35 @@ +# $OpenBSD: sgml,v 1.3 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # sgml: file(1) magic for Standard Generalized Markup Language - # HyperText Markup Language (HTML) is an SGML document type, # from Daniel Quinlan (quinlan@yggdrasil.com) -0 string \<!DOCTYPE\ HTML HTML document text -0 string \<!doctype\ html HTML document text -0 string \<HEAD HTML document text -0 string \<head HTML document text -0 string \<TITLE HTML document text -0 string \<title HTML document text -0 string \<html HTML document text -0 string \<HTML HTML document text +# adapted to string extenstions by Anthon van der Neut <anthon@mnt.org) +0 string/cB \<!DOCTYPE\ html HTML document text +0 string/cb \<head HTML document text +0 string/cb \<title HTML document text +0 string/cb \<html HTML document text + +# Extensible markup language (XML), a subset of SGML +# from Marc Prud'hommeaux (marc@apocalypse.org) +0 string/cb \<?xml XML document text +0 string \<?xml\ version " XML +0 string \<?xml\ version=" XML +>15 string >\0 %.3s document text +>>23 string \<xsl:stylesheet (XSL stylesheet) +>>24 string \<xsl:stylesheet (XSL stylesheet) +0 string/b \<?xml XML document text +0 string/cb \<?xml broken XML document text + # SGML, mostly from rph@sq -0 string \<!DOCTYPE exported SGML document text -0 string \<!doctype exported SGML document text -0 string \<!SUBDOC exported SGML subdocument text -0 string \<!subdoc exported SGML subdocument text -0 string \<!-- exported SGML document text +0 string/cb \<!doctype exported SGML document text +0 string/cb \<!subdoc exported SGML subdocument text +0 string/cb \<!-- exported SGML document text + +# Web browser cookie files +# (Mozilla, Galeon, Netscape 4, Konqueror..) +# Ulf Harnhammar <ulfh@update.uu.se> +0 string #\ HTTP\ Cookie\ File Web browser cookie text +0 string #\ Netscape\ HTTP\ Cookie\ File Netscape cookie text +0 string #\ KDE\ Cookie\ File Konqueror cookie text diff --git a/usr.bin/file/magdir/sharc b/usr.bin/file/magdir/sharc new file mode 100644 index 00000000000..6ffe807a553 --- /dev/null +++ b/usr.bin/file/magdir/sharc @@ -0,0 +1,23 @@ +# $OpenBSD: sharc,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------ +# file(1) magic for sharc files +# +# SHARC DSP, MIDI SysEx and RiscOS filetype definitions added by +# FutureGroove Music (dsp@futuregroove.de) + +#------------------------------------------------------------------------ +0 string Draw RiscOS Drawfile +0 string PACK RiscOS PackdDir archive + +#------------------------------------------------------------------------ +# SHARC DSP stuff (based on the FGM SHARC DSP SDK) + +0 string ! Assembler source +0 string Analog ADi asm listing file +0 string .SYSTEM SHARC architecture file +0 string .system SHARC architecture file + +0 leshort 0x521C SHARC COFF binary +>2 leshort >1 , %hd sections +>>12 lelong >0 , not stripped diff --git a/usr.bin/file/magdir/sinclair b/usr.bin/file/magdir/sinclair new file mode 100644 index 00000000000..6eb92e0b8ef --- /dev/null +++ b/usr.bin/file/magdir/sinclair @@ -0,0 +1,127 @@ +# $OpenBSD: sinclair,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# sinclair: file(1) sinclair QL + +# additions to /etc/magic by Thomas M. Ott (ThMO) + +# Sinclair QL floppy disk formats (ThMO) +0 string =QL5 QL disk dump data, +>3 string =A 720 KB, +>3 string =B 1.44 MB, +>3 string =C 3.2 MB, +>4 string >\0 label:%.10s + +# Sinclair QL OS dump (ThMO) +# (NOTE: if `file' would be able to use indirect references in a endian format +# differing from the natural host format, this could be written more +# reliably and faster...) +# +# we *can't* lookup QL OS code dumps, because `file' is UNABLE to read more +# than the first 8K of a file... #-( +# +#0 belong =0x30000 +#>49124 belong <47104 +#>>49128 belong <47104 +#>>>49132 belong <47104 +#>>>>49136 belong <47104 QL OS dump data, +#>>>>>49148 string >\0 type %.3s, +#>>>>>49142 string >\0 version %.4s + +# Sinclair QL firmware executables (ThMO) +0 string NqNqNq`\004 QL firmware executable (BCPL) + +# Sinclair QL libraries (ThMO) +0 beshort =0xFB01 QL library archive data + +# Sinclair QL executbables (ThMO) +6 beshort =0x4AFB QL executable, +>10 string =\0 un-named +>8 beshort =1 +>>10 string >\0 named: %.1s +>8 beshort =2 +>>10 string >\0 named: %.2s +>8 beshort =3 +>>10 string >\0 named: %.3s +>8 beshort =4 +>>10 string >\0 named: %.4s +>8 beshort =5 +>>10 string >\0 named: %.5s +>8 beshort =6 +>>10 string >\0 named: %.6s +>8 beshort =7 +>>10 string >\0 named: %.7s +>8 beshort =8 +>>10 string >\0 named: %.8s +>8 beshort =9 +>>10 string >\0 named: %.9s +>8 beshort =10 +>>10 string >\0 named: %.10s +>8 beshort =11 +>>10 string >\0 named: %.11s +>8 beshort =12 +>>10 string >\0 named: %.12s +>8 beshort =13 +>>10 string >\0 named: %.13s +>8 beshort =14 +>>10 string >\0 named: %.14s +>8 beshort =15 +>>10 string >\0 named: %.15s +>8 beshort =16 +>>10 string >\0 named: %.16s +>8 beshort =17 +>>10 string >\0 named: %.17s +>8 beshort =18 +>>10 string >\0 named: %.18s +>8 beshort =19 +>>10 string >\0 named: %.19s +>8 beshort =20 +>>10 string >\0 named: %.20s +>8 beshort >20 +>>10 string >\0 (truncated) named: %.20s + +# Sinclair QL rom (ThMO) +0 belong =0x4AFB0001 QL plugin-ROM data, +>10 string =\0 un-named +>8 beshort =1 +>>10 string >\0 named: %.1s +>8 beshort =2 +>>10 string >\0 named: %.2s +>8 beshort =3 +>>10 string >\0 named: %.3s +>8 beshort =4 +>>10 string >\0 named: %.4s +>8 beshort =5 +>>10 string >\0 named: %.5s +>8 beshort =6 +>>10 string >\0 named: %.6s +>8 beshort =7 +>>10 string >\0 named: %.7s +>8 beshort =8 +>>10 string >\0 named: %.8s +>8 beshort =9 +>>10 string >\0 named: %.9s +>8 beshort =10 +>>10 string >\0 named: %.10s +>8 beshort =11 +>>10 string >\0 named: %.11s +>8 beshort =12 +>>10 string >\0 named: %.12s +>8 beshort =13 +>>10 string >\0 named: %.13s +>8 beshort =14 +>>10 string >\0 named: %.14s +>8 beshort =15 +>>10 string >\0 named: %.15s +>8 beshort =16 +>>10 string >\0 named: %.16s +>8 beshort =17 +>>10 string >\0 named: %.17s +>8 beshort =18 +>>10 string >\0 named: %.18s +>8 beshort =19 +>>10 string >\0 named: %.19s +>8 beshort =20 +>>10 string >\0 named: %.20s +>8 beshort >20 +>>10 string >\0 (truncated) named: %.20s diff --git a/usr.bin/file/magdir/sketch b/usr.bin/file/magdir/sketch new file mode 100644 index 00000000000..6addb7fa046 --- /dev/null +++ b/usr.bin/file/magdir/sketch @@ -0,0 +1,6 @@ +# $OpenBSD: sketch,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# Sketch Drawings: http://sketch.sourceforge.net/ +# From: Edwin Mons <e@ik.nu> +0 string ##Sketch Sketch document text diff --git a/usr.bin/file/magdir/smalltalk b/usr.bin/file/magdir/smalltalk new file mode 100644 index 00000000000..1d360197adf --- /dev/null +++ b/usr.bin/file/magdir/smalltalk @@ -0,0 +1,25 @@ +# $OpenBSD: smalltalk,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#----------------------------------------------- +# GNU Smalltalk image, starting at version 1.6.2 +# From: catull_us@yahoo.com +# +0 string GSTIm\0\0 GNU SmallTalk +# little-endian +>7 byte&1 =0 LE image version +>>10 byte x %d. +>>9 byte x \b%d. +>>8 byte x \b%d +#>>12 lelong x , data: %ld +#>>16 lelong x , table: %ld +#>>20 lelong x , memory: %ld +# big-endian +>7 byte&1 =1 BE image version +>>8 byte x %d. +>>9 byte x \b%d. +>>10 byte x \b%d +#>>12 belong x , data: %ld +#>>16 belong x , table: %ld +#>>20 belong x , memory: %ld + + diff --git a/usr.bin/file/magdir/sniffer b/usr.bin/file/magdir/sniffer index b1958d2a9ee..de9599c76b3 100644 --- a/usr.bin/file/magdir/sniffer +++ b/usr.bin/file/magdir/sniffer @@ -1,33 +1,75 @@ +# $OpenBSD: sniffer,v 1.3 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ -# sniffer: file(1) magic for packet captured files +# sniffer: file(1) magic for packet capture files # -# From: guy@netapp.com (Guy Harris) +# From: guy@alum.mit.edu (Guy Harris) # -# Microsoft NetMon (packet capture/display program) capture files. + +# +# Microsoft Network Monitor 1.x capture files. # 0 string RTSS NetMon capture file ->4 byte x - version %d ->5 byte x \b.%d +>5 byte x - version %d +>4 byte x \b.%d +>6 leshort 0 (Unknown) +>6 leshort 1 (Ethernet) +>6 leshort 2 (Token Ring) +>6 leshort 3 (FDDI) +>6 leshort 4 (ATM) + +# +# Microsoft Network Monitor 2.x capture files. +# +0 string GMBU NetMon capture file +>5 byte x - version %d +>4 byte x \b.%d +>6 leshort 0 (Unknown) +>6 leshort 1 (Ethernet) +>6 leshort 2 (Token Ring) +>6 leshort 3 (FDDI) +>6 leshort 4 (ATM) + # # Network General Sniffer capture files. +# Sorry, make that "Network Associates Sniffer capture files." # 0 string TRSNIFF\ data\ \ \ \ \032 Sniffer capture file +>33 byte 2 (compressed) >23 leshort x - version %d >25 leshort x \b.%d ->33 byte x (Format %d, ->32 byte 0 Token ring) ->32 byte 1 Ethernet) ->32 byte 2 ARCnet) ->32 byte 3 StarLAN) ->32 byte 4 PC Network broadband) ->32 byte 5 LocalTalk) ->32 byte 6 Znet) +>32 byte 0 (Token Ring) +>32 byte 1 (Ethernet) +>32 byte 2 (ARCNET) +>32 byte 3 (StarLAN) +>32 byte 4 (PC Network broadband) +>32 byte 5 (LocalTalk) +>32 byte 6 (Znet) +>32 byte 7 (Internetwork Analyzer) +>32 byte 9 (FDDI) +>32 byte 10 (ATM) + +# +# Cinco Networks NetXRay capture files. +# Sorry, make that "Network General Sniffer Basic capture files." +# Sorry, make that "Network Associates Sniffer Basic capture files." +# Sorry, make that "Network Associates Sniffer Basic, and Windows +# Sniffer Pro", capture files." +# +0 string XCP\0 NetXRay capture file +>4 string >\0 - version %s +>44 leshort 0 (Ethernet) +>44 leshort 1 (Token Ring) +>44 leshort 2 (FDDI) +>44 leshort 3 (WAN) +>44 leshort 8 (ATM) +>44 leshort 9 (802.11) + # # "libpcap" capture files. # (We call them "tcpdump capture file(s)" for now, as "tcpdump" is -# the main program that uses that format, but there's also "tcpview", -# and there may be others in the future.) +# the main program that uses that format, but there are other programs +# that use "libpcap", or that use the same capture file format.) # 0 ubelong 0xa1b2c3d4 tcpdump capture file (big-endian) >4 beshort x - version %d @@ -36,23 +78,41 @@ >20 belong 1 (Ethernet >20 belong 2 (3Mb Ethernet >20 belong 3 (AX.25 ->20 belong 4 (ProNet ->20 belong 5 (Chaos ->20 belong 6 (IEEE 802.x network ->20 belong 7 (ARCnet +>20 belong 4 (ProNET +>20 belong 5 (CHAOS +>20 belong 6 (Token Ring +>20 belong 7 (BSD ARCNET >20 belong 8 (SLIP >20 belong 9 (PPP >20 belong 10 (FDDI >20 belong 11 (RFC 1483 ATM ->20 belong 12 (Loopback ->20 belong 13 (IPSec Enc ->20 belong 14 (Raw IP ->20 belong 15 (BSD/OS SLIP ->20 belong 16 (BSD/OS PPP ->20 belong 17 (Old PF Log ->20 belong 18 (PFSync ->20 belong 105 (IEEE 802.11 wireless ->20 belong 117 (PF Log +>20 belong 12 (raw IP +>20 belong 13 (BSD/OS SLIP +>20 belong 14 (BSD/OS PPP +>20 belong 50 (PPP or Cisco HDLC +>20 belong 51 (PPP-over-Ethernet +>20 belong 100 (RFC 1483 ATM +>20 belong 101 (raw IP +>20 belong 102 (BSD/OS SLIP +>20 belong 103 (BSD/OS PPP +>20 belong 104 (BSD/OS Cisco HDLC +>20 belong 105 (802.11 +>20 belong 106 (Linux Classical IP over ATM +>20 belong 107 (Frame Relay +>20 belong 108 (OpenBSD loopback +>20 belong 109 (OpenBSD IPsec encrypted +>20 belong 112 (Cisco HDLC +>20 belong 113 (Linux "cooked" +>20 belong 114 (LocalTalk +>20 belong 117 (OpenBSD PFLOG +>20 belong 119 (802.11 with Prism header +>20 belong 123 (SunATM +>20 belong 127 (802.11 with radiotap header +>20 belong 129 (Linux ARCNET +>20 belong 140 (MTP2 +>20 belong 141 (MTP3 +>20 belong 143 (DOCSIS +>20 belong 144 (IrDA >16 belong x \b, capture length %d) 0 ulelong 0xa1b2c3d4 tcpdump capture file (little-endian) >4 leshort x - version %d @@ -61,21 +121,114 @@ >20 lelong 1 (Ethernet >20 lelong 2 (3Mb Ethernet >20 lelong 3 (AX.25 ->20 lelong 4 (ProNet ->20 lelong 5 (Chaos ->20 lelong 6 (IEEE 802.x network ->20 lelong 7 (ARCnet +>20 lelong 4 (ProNET +>20 lelong 5 (CHAOS +>20 lelong 6 (Token Ring +>20 lelong 7 (ARCNET >20 lelong 8 (SLIP >20 lelong 9 (PPP >20 lelong 10 (FDDI >20 lelong 11 (RFC 1483 ATM ->20 lelong 12 (Loopback ->20 lelong 13 (IPSec Enc ->20 lelong 14 (Raw IP ->20 lelong 15 (BSD/OS SLIP ->20 lelong 16 (BSD/OS PPP ->20 lelong 17 (Old PF Log ->20 lelong 18 (PFSync ->20 lelong 105 (IEEE 802.11 wireless ->20 lelong 117 (PF Log +>20 lelong 12 (raw IP +>20 lelong 13 (BSD/OS SLIP +>20 lelong 14 (BSD/OS PPP +>20 lelong 50 (PPP or Cisco HDLC +>20 lelong 51 (PPP-over-Ethernet +>20 lelong 100 (RFC 1483 ATM +>20 lelong 101 (raw IP +>20 lelong 102 (BSD/OS SLIP +>20 lelong 103 (BSD/OS PPP +>20 lelong 104 (BSD/OS Cisco HDLC +>20 lelong 105 (802.11 +>20 lelong 106 (Linux Classical IP over ATM +>20 lelong 107 (Frame Relay +>20 lelong 108 (OpenBSD loopback +>20 lelong 109 (OpenBSD IPSEC encrypted +>20 lelong 112 (Cisco HDLC +>20 lelong 113 (Linux "cooked" +>20 lelong 114 (LocalTalk +>20 lelong 117 (OpenBSD PFLOG +>20 lelong 119 (802.11 with Prism header +>20 lelong 123 (SunATM +>20 lelong 127 (802.11 with radiotap header +>20 lelong 129 (Linux ARCNET +>20 lelong 140 (MTP2 +>20 lelong 141 (MTP3 +>20 lelong 143 (DOCSIS +>20 lelong 144 (IrDA >16 lelong x \b, capture length %d) + +# +# "libpcap"-with-Alexey-Kuznetsov's-patches capture files. +# (We call them "tcpdump capture file(s)" for now, as "tcpdump" is +# the main program that uses that format, but there are other programs +# that use "libpcap", or that use the same capture file format.) +# +0 ubelong 0xa1b2cd34 extended tcpdump capture file (big-endian) +>4 beshort x - version %d +>6 beshort x \b.%d +>20 belong 0 (No link-layer encapsulation +>20 belong 1 (Ethernet +>20 belong 2 (3Mb Ethernet +>20 belong 3 (AX.25 +>20 belong 4 (ProNET +>20 belong 5 (CHAOS +>20 belong 6 (Token Ring +>20 belong 7 (ARCNET +>20 belong 8 (SLIP +>20 belong 9 (PPP +>20 belong 10 (FDDI +>20 belong 11 (RFC 1483 ATM +>20 belong 12 (raw IP +>20 belong 13 (BSD/OS SLIP +>20 belong 14 (BSD/OS PPP +>16 belong x \b, capture length %d) +0 ulelong 0xa1b2cd34 extended tcpdump capture file (little-endian) +>4 leshort x - version %d +>6 leshort x \b.%d +>20 lelong 0 (No link-layer encapsulation +>20 lelong 1 (Ethernet +>20 lelong 2 (3Mb Ethernet +>20 lelong 3 (AX.25 +>20 lelong 4 (ProNET +>20 lelong 5 (CHAOS +>20 lelong 6 (Token Ring +>20 lelong 7 (ARCNET +>20 lelong 8 (SLIP +>20 lelong 9 (PPP +>20 lelong 10 (FDDI +>20 lelong 11 (RFC 1483 ATM +>20 lelong 12 (raw IP +>20 lelong 13 (BSD/OS SLIP +>20 lelong 14 (BSD/OS PPP +>16 lelong x \b, capture length %d) + +# +# AIX "iptrace" capture files. +# +0 string iptrace\ 1.0 "iptrace" capture file +0 string iptrace\ 2.0 "iptrace" capture file + +# +# Novell LANalyzer capture files. +# +0 leshort 0x1001 LANalyzer capture file +0 leshort 0x1007 LANalyzer capture file + +# +# HP-UX "nettl" capture files. +# +0 string \x54\x52\x00\x64\x00 "nettl" capture file + +# +# RADCOM WAN/LAN Analyzer capture files. +# +0 string \x42\xd2\x00\x34\x12\x66\x22\x88 RADCOM WAN/LAN Analyzer capture file + +# +# NetStumbler log files. Not really packets, per se, but about as +# close as you can get. These are log files from NetStumbler, a +# Windows program, that scans for 802.11b networks. +# +0 string NetS NetStumbler log file +>8 lelong x \b, %d stations found diff --git a/usr.bin/file/magdir/softquad b/usr.bin/file/magdir/softquad index bbb6661e6b5..76e0b31a1e5 100644 --- a/usr.bin/file/magdir/softquad +++ b/usr.bin/file/magdir/softquad @@ -1,4 +1,4 @@ -# $OpenBSD: softquad,v 1.3 1996/06/26 05:33:05 deraadt Exp $ +# $OpenBSD: softquad,v 1.4 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # softquad: file(1) magic for SoftQuad Publishing Software diff --git a/usr.bin/file/magdir/spectrum b/usr.bin/file/magdir/spectrum new file mode 100644 index 00000000000..1b27ca24c43 --- /dev/null +++ b/usr.bin/file/magdir/spectrum @@ -0,0 +1,45 @@ +# $OpenBSD: spectrum,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# spectrum: file(1) magic for Spectrum emulator files. +# +# John Elliott <jce@seasip.demon.co.uk> + +# +# Spectrum +3DOS header +# +0 string PLUS3DOS\032 Spectrum +3 data +>15 byte 0 - BASIC program +>15 byte 1 - number array +>15 byte 2 - character array +>15 byte 3 - memory block +>>16 belong 0x001B0040 (screen) +>15 byte 4 - Tasword document +>15 string TAPEFILE - ZXT tapefile +# +# Tape file. This assumes the .TAP starts with a Spectrum-format header, +# which nearly all will. +# +0 string \023\000\000 Spectrum .TAP data +>4 string x "%-10.10s" +>3 byte 0 - BASIC program +>3 byte 1 - number array +>3 byte 2 - character array +>3 byte 3 - memory block +>>14 belong 0x001B0040 (screen) + +# The following three blocks are from pak21-spectrum@srcf.ucam.org +# TZX tape images +0 string ZXTape!\x1a Spectrum .TZX data +>8 byte x version %d +>9 byte x .%d + +# RZX input recording files +0 string RZX! Spectrum .RZX data +>4 byte x version %d +>5 byte x .%d + +# And three sorts of disk image +0 string MV\ -\ CPCEMU\ Disk-Fil Amstrad/Spectrum .DSK data +0 string MV\ -\ CPC\ format\ Dis Amstrad/Spectrum DU54 .DSK data +0 string EXTENDED\ CPC\ DSK\ Fil Amstrad/Spectrum Extended .DSK data diff --git a/usr.bin/file/magdir/sql b/usr.bin/file/magdir/sql new file mode 100644 index 00000000000..39126705895 --- /dev/null +++ b/usr.bin/file/magdir/sql @@ -0,0 +1,19 @@ +# $OpenBSD: sql,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# sql: file(1) magic for SQL files +# +# From: "Marty Leisner" <mleisner@eng.mc.xerox.com> +# Recognize some MySQL files. +# +0 beshort 0xfe01 MySQL table definition file +>2 byte x Version %d +0 belong&0xffffff00 0xfefe0300 MySQL MISAM index file +>3 byte x Version %d +0 belong&0xffffff00 0xfefe0700 MySQL MISAM compressed data file +>3 byte x Version %d +0 belong&0xffffff00 0xfefe0500 MySQL ISAM index file +>3 byte x Version %d +0 belong&0xffffff00 0xfefe0600 MySQL ISAM compressed data file +>3 byte x Version %d +0 string \376bin MySQL replication log diff --git a/usr.bin/file/magdir/sun b/usr.bin/file/magdir/sun index 2f0336a91b8..1e4b36c8fbd 100644 --- a/usr.bin/file/magdir/sun +++ b/usr.bin/file/magdir/sun @@ -1,3 +1,4 @@ +# $OpenBSD: sun,v 1.3 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # sun: file(1) magic for Sun machines @@ -87,24 +88,37 @@ # Sun SunPC 0 long 0xfa33c08e SunPC 4.0 Hard Disk 0 string #SUNPC_CONFIG SunPC 4.0 Properties Values -# Sun snoop -# -# XXX - are numbers stored in big-endian format, or in host byte order? -# They're the same on SPARC, but not the same on x86. +# Sun snoop (see RFC 1761, which describes the capture file format). # 0 string snoop Snoop capture file ->8 long >0 - version %ld ->12 long 0 (IEEE 802.3) ->12 long 1 (IEEE 802.4) ->12 long 2 (IEEE 802.5) ->12 long 3 (IEEE 802.6) ->12 long 4 (Ethernet) ->12 long 5 (HDLC) ->12 long 6 (Character synchronous) ->12 long 7 (IBM channel-to-channel adapter) ->12 long 8 (FDDI) ->12 long 9 (Unknown) +>8 belong >0 - version %ld +>12 belong 0 (IEEE 802.3) +>12 belong 1 (IEEE 802.4) +>12 belong 2 (IEEE 802.5) +>12 belong 3 (IEEE 802.6) +>12 belong 4 (Ethernet) +>12 belong 5 (HDLC) +>12 belong 6 (Character synchronous) +>12 belong 7 (IBM channel-to-channel adapter) +>12 belong 8 (FDDI) +>12 belong 9 (Unknown) + +# Microsoft ICM color profile +36 string acspMSFT Microsoft ICM Color Profile # Sun KCMS 36 string acsp Kodak Color Management System, ICC Profile +#--------------------------------------------------------------------------- +# The following entries have been tested by Duncan Laurie <duncan@sun.com> (a +# lead Sun/Cobalt developer) who agrees that they are good and worthy of +# inclusion. + +# Boot ROM images for Sun/Cobalt Linux server appliances +0 string Cobalt\ Networks\ Inc.\nFirmware\ v Paged COBALT boot rom +>38 string x V%.4s + +# New format for Sun/Cobalt boot ROMs is annoying, it stores the version code +# at the very end where file(1) can't get it. +0 string CRfs COBALT boot rom data (Flat boot rom or file system) + diff --git a/usr.bin/file/magdir/sysex b/usr.bin/file/magdir/sysex new file mode 100644 index 00000000000..27afebe38e1 --- /dev/null +++ b/usr.bin/file/magdir/sysex @@ -0,0 +1,195 @@ +# $OpenBSD: sysex,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------ +# sysex: file(1) magic for MIDI sysex files +# +# +0 byte 0xF0 SysEx File - + +# North American Group +>1 byte 0x01 Sequential +>1 byte 0x02 IDP +>1 byte 0x03 OctavePlateau +>1 byte 0x04 Moog +>1 byte 0x05 Passport +>1 byte 0x06 Lexicon +>1 byte 0x07 Kurzweil +>1 byte 0x08 Fender +>1 byte 0x09 Gulbransen +>1 byte 0x0a AKG +>1 byte 0x0b Voyce +>1 byte 0x0c Waveframe +>1 byte 0x0d ADA +>1 byte 0x0e Garfield +>1 byte 0x0f Ensoniq +>1 byte 0x10 Oberheim +>1 byte 0x11 Apple +>1 byte 0x12 GreyMatter +>1 byte 0x14 PalmTree +>1 byte 0x15 JLCooper +>1 byte 0x16 Lowrey +>1 byte 0x17 AdamsSmith +>1 byte 0x18 E-mu +>1 byte 0x19 Harmony +>1 byte 0x1a ART +>1 byte 0x1b Baldwin +>1 byte 0x1c Eventide +>1 byte 0x1d Inventronics +>1 byte 0x1f Clarity + +# European Group +>1 byte 0x21 SIEL +>1 byte 0x22 Synthaxe +>1 byte 0x24 Hohner +>1 byte 0x25 Twister +>1 byte 0x26 Solton +>1 byte 0x27 Jellinghaus +>1 byte 0x28 Southworth +>1 byte 0x29 PPG +>1 byte 0x2a JEN +>1 byte 0x2b SSL +>1 byte 0x2c AudioVertrieb + +>1 byte 0x2f ELKA +>>3 byte 0x09 EK-44 + +>1 byte 0x30 Dynacord +>1 byte 0x33 Clavia +>1 byte 0x39 Soundcraft + +>1 byte 0x3e Waldorf +>>3 byte 0x7f Microwave I + +# Japanese Group +>1 byte 0x40 Kawai +>>3 byte 0x20 K1 +>>3 byte 0x22 K4 + +>1 byte 0x41 Roland +>>3 byte 0x14 D-50 +>>3 byte 0x2b U-220 +>>3 byte 0x02 TR-707 + +>1 byte 0x42 Korg +>>3 byte 0x19 M1 + +>1 byte 0x43 Yamaha +>1 byte 0x44 Casio +>1 byte 0x46 Kamiya +>1 byte 0x47 Akai +>1 byte 0x48 Victor +>1 byte 0x49 Mesosha +>1 byte 0x4b Fujitsu +>1 byte 0x4c Sony +>1 byte 0x4e Teac +>1 byte 0x50 Matsushita +>1 byte 0x51 Fostex +>1 byte 0x52 Zoom +>1 byte 0x54 Matsushita +>1 byte 0x57 Acoustic tech. lab. + +>1 belong&0xffffff00 0x00007400 Ta Horng +>1 belong&0xffffff00 0x00007500 e-Tek +>1 belong&0xffffff00 0x00007600 E-Voice +>1 belong&0xffffff00 0x00007700 Midisoft +>1 belong&0xffffff00 0x00007800 Q-Sound +>1 belong&0xffffff00 0x00007900 Westrex +>1 belong&0xffffff00 0x00007a00 Nvidia* +>1 belong&0xffffff00 0x00007b00 ESS +>1 belong&0xffffff00 0x00007c00 Mediatrix +>1 belong&0xffffff00 0x00007d00 Brooktree +>1 belong&0xffffff00 0x00007e00 Otari +>1 belong&0xffffff00 0x00007f00 Key Electronics +>1 belong&0xffffff00 0x00010000 Shure +>1 belong&0xffffff00 0x00010100 AuraSound +>1 belong&0xffffff00 0x00010200 Crystal +>1 belong&0xffffff00 0x00010300 Rockwell +>1 belong&0xffffff00 0x00010400 Silicon Graphics +>1 belong&0xffffff00 0x00010500 Midiman +>1 belong&0xffffff00 0x00010600 PreSonus +>1 belong&0xffffff00 0x00010800 Topaz +>1 belong&0xffffff00 0x00010900 Cast Lightning +>1 belong&0xffffff00 0x00010a00 Microsoft +>1 belong&0xffffff00 0x00010b00 Sonic Foundry +>1 belong&0xffffff00 0x00010c00 Line 6 +>1 belong&0xffffff00 0x00010d00 Beatnik Inc. +>1 belong&0xffffff00 0x00010e00 Van Koerving +>1 belong&0xffffff00 0x00010f00 Altech Systems +>1 belong&0xffffff00 0x00011000 S & S Research +>1 belong&0xffffff00 0x00011100 VLSI Technology +>1 belong&0xffffff00 0x00011200 Chromatic +>1 belong&0xffffff00 0x00011300 Sapphire +>1 belong&0xffffff00 0x00011400 IDRC +>1 belong&0xffffff00 0x00011500 Justonic Tuning +>1 belong&0xffffff00 0x00011600 TorComp +>1 belong&0xffffff00 0x00011700 Newtek Inc. +>1 belong&0xffffff00 0x00011800 Sound Sculpture +>1 belong&0xffffff00 0x00011900 Walker Technical +>1 belong&0xffffff00 0x00011a00 Digital Harmony +>1 belong&0xffffff00 0x00011b00 InVision +>1 belong&0xffffff00 0x00011c00 T-Square +>1 belong&0xffffff00 0x00011d00 Nemesys +>1 belong&0xffffff00 0x00011e00 DBX +>1 belong&0xffffff00 0x00011f00 Syndyne +>1 belong&0xffffff00 0x00012000 Bitheadz +>1 belong&0xffffff00 0x00012100 Cakewalk +>1 belong&0xffffff00 0x00012200 Staccato +>1 belong&0xffffff00 0x00012300 National Semicon. +>1 belong&0xffffff00 0x00012400 Boom Theory +>1 belong&0xffffff00 0x00012500 Virtual DSP Corp +>1 belong&0xffffff00 0x00012600 Antares +>1 belong&0xffffff00 0x00012700 Angel Software +>1 belong&0xffffff00 0x00012800 St Louis Music +>1 belong&0xffffff00 0x00012900 Lyrrus dba G-VOX +>1 belong&0xffffff00 0x00012a00 Ashley Audio +>1 belong&0xffffff00 0x00012b00 Vari-Lite +>1 belong&0xffffff00 0x00012c00 Summit Audio +>1 belong&0xffffff00 0x00012d00 Aureal Semicon. +>1 belong&0xffffff00 0x00012e00 SeaSound +>1 belong&0xffffff00 0x00012f00 U.S. Robotics +>1 belong&0xffffff00 0x00013000 Aurisis +>1 belong&0xffffff00 0x00013100 Nearfield Multimedia +>1 belong&0xffffff00 0x00013200 FM7 Inc. +>1 belong&0xffffff00 0x00013300 Swivel Systems +>1 belong&0xffffff00 0x00013400 Hyperactive +>1 belong&0xffffff00 0x00013500 MidiLite +>1 belong&0xffffff00 0x00013600 Radical +>1 belong&0xffffff00 0x00013700 Roger Linn +>1 belong&0xffffff00 0x00013800 Helicon +>1 belong&0xffffff00 0x00013900 Event +>1 belong&0xffffff00 0x00013a00 Sonic Network +>1 belong&0xffffff00 0x00013b00 Realtime Music +>1 belong&0xffffff00 0x00013c00 Apogee Digital + +>1 belong&0xffffff00 0x00202b00 Medeli Electronics +>1 belong&0xffffff00 0x00202c00 Charlie Lab +>1 belong&0xffffff00 0x00202d00 Blue Chip Music +>1 belong&0xffffff00 0x00202e00 BEE OH Corp +>1 belong&0xffffff00 0x00202f00 LG Semicon America +>1 belong&0xffffff00 0x00203000 TESI +>1 belong&0xffffff00 0x00203100 EMAGIC +>1 belong&0xffffff00 0x00203200 Behringer +>1 belong&0xffffff00 0x00203300 Access Music +>1 belong&0xffffff00 0x00203400 Synoptic +>1 belong&0xffffff00 0x00203500 Hanmesoft Corp +>1 belong&0xffffff00 0x00203600 Terratec +>1 belong&0xffffff00 0x00203700 Proel SpA +>1 belong&0xffffff00 0x00203800 IBK MIDI +>1 belong&0xffffff00 0x00203900 IRCAM +>1 belong&0xffffff00 0x00203a00 Propellerhead Software +>1 belong&0xffffff00 0x00203b00 Red Sound Systems +>1 belong&0xffffff00 0x00203c00 Electron ESI AB +>1 belong&0xffffff00 0x00203d00 Sintefex Audio +>1 belong&0xffffff00 0x00203e00 Music and More +>1 belong&0xffffff00 0x00203f00 Amsaro +>1 belong&0xffffff00 0x00204000 CDS Advanced Technology +>1 belong&0xffffff00 0x00204100 Touched by Sound +>1 belong&0xffffff00 0x00204200 DSP Arts +>1 belong&0xffffff00 0x00204300 Phil Rees Music +>1 belong&0xffffff00 0x00204400 Stamer Musikanlagen GmbH +>1 belong&0xffffff00 0x00204500 Soundart +>1 belong&0xffffff00 0x00204600 C-Mexx Software +>1 belong&0xffffff00 0x00204700 Klavis Tech. +>1 belong&0xffffff00 0x00204800 Noteheads AB + +0 string T707 Roland TR-707 Data diff --git a/usr.bin/file/magdir/teapot b/usr.bin/file/magdir/teapot new file mode 100644 index 00000000000..9ba9d0973c9 --- /dev/null +++ b/usr.bin/file/magdir/teapot @@ -0,0 +1,6 @@ +# $OpenBSD: teapot,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# teapot: file(1) magic for "teapot" spreadsheet +# +0 string #!teapot\012xdr teapot work sheet (XDR format) diff --git a/usr.bin/file/magdir/terminfo b/usr.bin/file/magdir/terminfo index 2226ce8cee5..ae5140343ea 100644 --- a/usr.bin/file/magdir/terminfo +++ b/usr.bin/file/magdir/terminfo @@ -1,3 +1,4 @@ +# $OpenBSD: terminfo,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # terminfo: file(1) magic for terminfo diff --git a/usr.bin/file/magdir/tex b/usr.bin/file/magdir/tex index 5126be8c800..c5af1069b5b 100644 --- a/usr.bin/file/magdir/tex +++ b/usr.bin/file/magdir/tex @@ -1,3 +1,4 @@ +# $OpenBSD: tex,v 1.3 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # tex: file(1) magic for TeX files @@ -34,3 +35,70 @@ 0 string \\setlength LaTeX document text 0 string \\documentstyle LaTeX document text 0 string \\chapter LaTeX document text +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 +0 string \\begin{theindex} LaTeX sorted index +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/usr.bin/file/magdir/ti-8x b/usr.bin/file/magdir/ti-8x new file mode 100644 index 00000000000..515b0021b9e --- /dev/null +++ b/usr.bin/file/magdir/ti-8x @@ -0,0 +1,239 @@ +# $OpenBSD: ti-8x,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +# ------------------------------------------------------------------------ +# ti-8x: file(1) magic for the TI-8x and TI-9x Graphing Calculators. +# +# From: Ryan McGuire (rmcguire@freenet.columbus.oh.us). +# +# Update: Romain Lievin (roms@lpg.ticalc.org). +# +# NOTE: This list is not complete. +# Files for the TI-80 and TI-81 are pretty rare. I'm not going to put the +# program/group magic numbers in here because I cannot find any. +0 string **TI80** TI-80 Graphing Calculator File. +0 string **TI81** TI-81 Graphing Calculator File. +# +# Magic Numbers for the TI-73 +# +0 string **TI73** TI-73 Graphing Calculator +>0x00003B byte 0x00 (real number) +>0x00003B byte 0x01 (list) +>0x00003B byte 0x02 (matrix) +>0x00003B byte 0x03 (equation) +>0x00003B byte 0x04 (string) +>0x00003B byte 0x05 (program) +>0x00003B byte 0x06 (assembly program) +>0x00003B byte 0x07 (picture) +>0x00003B byte 0x08 (gdb) +>0x00003B byte 0x0C (complex number) +>0x00003B byte 0x0F (window settings) +>0x00003B byte 0x10 (zoom) +>0x00003B byte 0x11 (table setup) +>0x00003B byte 0x13 (backup) + +# Magic Numbers for the TI-82 +# +0 string **TI82** TI-82 Graphing Calculator +>0x00003B byte 0x00 (real) +>0x00003B byte 0x01 (list) +>0x00003B byte 0x02 (matrix) +>0x00003B byte 0x03 (Y-variable) +>0x00003B byte 0x05 (program) +>0x00003B byte 0x06 (protected prgm) +>0x00003B byte 0x07 (picture) +>0x00003B byte 0x08 (gdb) +>0x00003B byte 0x0B (window settings) +>0x00003B byte 0x0C (window settings) +>0x00003B byte 0x0D (table setup) +>0x00003B byte 0x0E (screenshot) +>0x00003B byte 0x0F (backup) +# +# Magic Numbers for the TI-83 +# +0 string **TI83** TI-83 Graphing Calculator +>0x00003B byte 0x00 (real) +>0x00003B byte 0x01 (list) +>0x00003B byte 0x02 (matrix) +>0x00003B byte 0x03 (Y-variable) +>0x00003B byte 0x04 (string) +>0x00003B byte 0x05 (program) +>0x00003B byte 0x06 (protected prgm) +>0x00003B byte 0x07 (picture) +>0x00003B byte 0x08 (gdb) +>0x00003B byte 0x0B (window settings) +>0x00003B byte 0x0C (window settings) +>0x00003B byte 0x0D (table setup) +>0x00003B byte 0x0E (screenshot) +>0x00003B byte 0x13 (backup) +# +# Magic Numbers for the TI-83+ +# +0 string **TI83F* TI-83+ Graphing Calculator +>0x00003B byte 0x00 (real number) +>0x00003B byte 0x01 (list) +>0x00003B byte 0x02 (matrix) +>0x00003B byte 0x03 (equation) +>0x00003B byte 0x04 (string) +>0x00003B byte 0x05 (program) +>0x00003B byte 0x06 (assembly program) +>0x00003B byte 0x07 (picture) +>0x00003B byte 0x08 (gdb) +>0x00003B byte 0x0C (complex number) +>0x00003B byte 0x0F (window settings) +>0x00003B byte 0x10 (zoom) +>0x00003B byte 0x11 (table setup) +>0x00003B byte 0x13 (backup) +>0x00003B byte 0x15 (application variable) +>0x00003B byte 0x17 (group of variable) + +# +# Magic Numbers for the TI-85 +# +0 string **TI85** TI-85 Graphing Calculator +>0x00003B byte 0x00 (real number) +>0x00003B byte 0x01 (complex number) +>0x00003B byte 0x02 (real vector) +>0x00003B byte 0x03 (complex vector) +>0x00003B byte 0x04 (real list) +>0x00003B byte 0x05 (complex list) +>0x00003B byte 0x06 (real matrix) +>0x00003B byte 0x07 (complex matrix) +>0x00003B byte 0x08 (real constant) +>0x00003B byte 0x09 (complex constant) +>0x00003B byte 0x0A (equation) +>0x00003B byte 0x0C (string) +>0x00003B byte 0x0D (function GDB) +>0x00003B byte 0x0E (polar GDB) +>0x00003B byte 0x0F (parametric GDB) +>0x00003B byte 0x10 (diffeq GDB) +>0x00003B byte 0x11 (picture) +>0x00003B byte 0x12 (program) +>0x00003B byte 0x13 (range) +>0x00003B byte 0x17 (window settings) +>0x00003B byte 0x18 (window settings) +>0x00003B byte 0x19 (window settings) +>0x00003B byte 0x1A (window settings) +>0x00003B byte 0x1B (zoom) +>0x00003B byte 0x1D (backup) +>0x00003B byte 0x1E (unknown) +>0x00003B byte 0x2A (equation) +>0x000032 string ZS4 - ZShell Version 4 File. +>0x000032 string ZS3 - ZShell Version 3 File. +# +# Magic Numbers for the TI-86 +# +0 string **TI86** TI-86 Graphing Calculator +>0x00003B byte 0x00 (real number) +>0x00003B byte 0x01 (complex number) +>0x00003B byte 0x02 (real vector) +>0x00003B byte 0x03 (complex vector) +>0x00003B byte 0x04 (real list) +>0x00003B byte 0x05 (complex list) +>0x00003B byte 0x06 (real matrix) +>0x00003B byte 0x07 (complex matrix) +>0x00003B byte 0x08 (real constant) +>0x00003B byte 0x09 (complex constant) +>0x00003B byte 0x0A (equation) +>0x00003B byte 0x0C (string) +>0x00003B byte 0x0D (function GDB) +>0x00003B byte 0x0E (polar GDB) +>0x00003B byte 0x0F (parametric GDB) +>0x00003B byte 0x10 (diffeq GDB) +>0x00003B byte 0x11 (picture) +>0x00003B byte 0x12 (program) +>0x00003B byte 0x13 (range) +>0x00003B byte 0x17 (window settings) +>0x00003B byte 0x18 (window settings) +>0x00003B byte 0x19 (window settings) +>0x00003B byte 0x1A (window settings) +>0x00003B byte 0x1B (zoom) +>0x00003B byte 0x1D (backup) +>0x00003B byte 0x1E (unknown) +>0x00003B byte 0x2A (equation) +# +# Magic Numbers for the TI-89 +# +0 string **TI89** TI-89 Graphing Calculator +>0x000048 byte 0x00 (expression) +>0x000048 byte 0x04 (list) +>0x000048 byte 0x06 (matrix) +>0x000048 byte 0x0A (data) +>0x000048 byte 0x0B (text) +>0x000048 byte 0x0C (string) +>0x000048 byte 0x0D (graphic data base) +>0x000048 byte 0x0E (figure) +>0x000048 byte 0x10 (picture) +>0x000048 byte 0x12 (program) +>0x000048 byte 0x13 (function) +>0x000048 byte 0x14 (macro) +>0x000048 byte 0x1C (zipped) +>0x000048 byte 0x21 (assembler) +# +# Magic Numbers for the TI-92 +# +0 string **TI92** TI-92 Graphing Calculator +>0x000048 byte 0x00 (expression) +>0x000048 byte 0x04 (list) +>0x000048 byte 0x06 (matrix) +>0x000048 byte 0x0A (data) +>0x000048 byte 0x0B (text) +>0x000048 byte 0x0C (string) +>0x000048 byte 0x0D (graphic data base) +>0x000048 byte 0x0E (figure) +>0x000048 byte 0x10 (picture) +>0x000048 byte 0x12 (program) +>0x000048 byte 0x13 (function) +>0x000048 byte 0x14 (macro) +>0x000048 byte 0x1D (backup) +# +# Magic Numbers for the TI-92+/V200 +# +0 string **TI92P* TI-92+/V200 Graphing Calculator +>0x000048 byte 0x00 (expression) +>0x000048 byte 0x04 (list) +>0x000048 byte 0x06 (matrix) +>0x000048 byte 0x0A (data) +>0x000048 byte 0x0B (text) +>0x000048 byte 0x0C (string) +>0x000048 byte 0x0D (graphic data base) +>0x000048 byte 0x0E (figure) +>0x000048 byte 0x10 (picture) +>0x000048 byte 0x12 (program) +>0x000048 byte 0x13 (function) +>0x000048 byte 0x14 (macro) +>0x000048 byte 0x1C (zipped) +>0x000048 byte 0x21 (assembler) +# +# Magic Numbers for the TI-73/83+/89/92+/V200 FLASH upgrades +# +0x0000016 string Advanced TI-XX Graphing Calculator (FLASH) +0 string **TIFL** TI-XX Graphing Calculator (FLASH) +>8 byte >0 - Revision %d +>>9 byte x \b.%d, +>12 byte >0 Revision date %02x +>>13 byte x \b/%02x +>>14 beshort x \b/%04x, +>17 string >/0 name: '%s', +>48 byte 0x74 device: TI-73, +>48 byte 0x73 device: TI-83+, +>48 byte 0x98 device: TI-89, +>48 byte 0x88 device: TI-92+, +>49 byte 0x23 type: OS upgrade, +>49 byte 0x24 type: application, +>49 byte 0x25 type: certificate, +>49 byte 0x3e type: license, +>74 lelong >0 size: %ld bytes + +# VTi & TiEmu skins (TI Graphing Calculators). +# From: Romain Lievin (roms@lpg.ticalc.org). +# Magic Numbers for the VTi skins +0 string VTI Virtual TI skin +>3 string v - Version +>>4 byte >0 \b %c +>>6 byte x \b.%c +# Magic Numbers for the TiEmu skins +0 string TiEmu TiEmu skin +>6 string v - Version +>>7 byte >0 \b %c +>>9 byte x \b.%c +>>10 byte x \b%c diff --git a/usr.bin/file/magdir/timezone b/usr.bin/file/magdir/timezone index 63ab0f7c548..297fbfd1c86 100644 --- a/usr.bin/file/magdir/timezone +++ b/usr.bin/file/magdir/timezone @@ -1,14 +1,15 @@ +# $OpenBSD: timezone,v 1.4 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # timezone: file(1) magic for timezone data # -# zic -0 string TZif timezone information file # from Daniel Quinlan (quinlan@yggdrasil.com) # this should work on Linux, SunOS, and maybe others -0 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0 timezone data -0 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0 timezone data -0 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0 timezone data -0 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0 timezone data -0 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0 timezone data -0 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0 timezone data +# Added new official magic number for recent versions of the Olson code +0 string TZif timezone data +0 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0 old timezone data +0 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0 old timezone data +0 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0 old timezone data +0 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0 old timezone data +0 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0 old timezone data +0 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0 old timezone data diff --git a/usr.bin/file/magdir/troff b/usr.bin/file/magdir/troff index ea75e8516db..ddab8345c5d 100644 --- a/usr.bin/file/magdir/troff +++ b/usr.bin/file/magdir/troff @@ -1,3 +1,4 @@ +# $OpenBSD: troff,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # troff: file(1) magic for *roff diff --git a/usr.bin/file/magdir/tuxedo b/usr.bin/file/magdir/tuxedo new file mode 100644 index 00000000000..9d039925411 --- /dev/null +++ b/usr.bin/file/magdir/tuxedo @@ -0,0 +1,8 @@ +# $OpenBSD: tuxedo,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# tuxedo: file(1) magic for BEA TUXEDO data files +# +# from Ian Springer <ispringer@hotmail.com> +# +0 string \0\0\1\236\0\0\0\0\0\0\0\0\0\0\0\0 BEA TUXEDO DES mask data diff --git a/usr.bin/file/magdir/typeset b/usr.bin/file/magdir/typeset index 2eda7c3e413..8a9b91ed330 100644 --- a/usr.bin/file/magdir/typeset +++ b/usr.bin/file/magdir/typeset @@ -1,3 +1,4 @@ +# $OpenBSD: typeset,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # typeset: file(1) magic for other typesetting diff --git a/usr.bin/file/magdir/unknown b/usr.bin/file/magdir/unknown index 910cea48e07..86176e85033 100644 --- a/usr.bin/file/magdir/unknown +++ b/usr.bin/file/magdir/unknown @@ -1,3 +1,4 @@ +# $OpenBSD: unknown,v 1.3 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # unknown: file(1) magic for unknown machines diff --git a/usr.bin/file/magdir/uuencode b/usr.bin/file/magdir/uuencode index 7e88619d5ca..aab736b5ce7 100644 --- a/usr.bin/file/magdir/uuencode +++ b/usr.bin/file/magdir/uuencode @@ -1,3 +1,4 @@ +# $OpenBSD: uuencode,v 1.3 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # uuencode: file(1) magic for ASCII-encoded files diff --git a/usr.bin/file/magdir/varied.out b/usr.bin/file/magdir/varied.out index 9245cfcbcc3..14c74eeca38 100644 --- a/usr.bin/file/magdir/varied.out +++ b/usr.bin/file/magdir/varied.out @@ -1,3 +1,4 @@ +# $OpenBSD: varied.out,v 1.4 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # varied.out: file(1) magic for various USG systems @@ -15,4 +16,21 @@ 6 beshort 0407 unicos (cray) executable # Ultrix 4.3 596 string \130\337\377\377 Ultrix core file ->600 string >\0 '%s' +>600 string >\0 from '%s' +# BeOS and MAcOS PEF executables +# From: hplus@zilker.net (Jon Watte) +0 string Joy!peffpwpc header for PowerPC PEF executable +# +# ava assembler/linker Uros Platise <uros.platise@ijs.si> +0 string avaobj AVR assembler object code +>7 string >\0 version '%s' +# 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 + +# From: "Stefan A. Haubenthal" <polluks@web.de> +0 belong 0x000001EB Plan 9 executable diff --git a/usr.bin/file/magdir/vax b/usr.bin/file/magdir/vax index 7dd86ccf53e..c1df0a1b06e 100644 --- a/usr.bin/file/magdir/vax +++ b/usr.bin/file/magdir/vax @@ -1,3 +1,4 @@ +# $OpenBSD: vax,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # vax: file(1) magic for VAX executable/object and APL workspace diff --git a/usr.bin/file/magdir/visx b/usr.bin/file/magdir/visx index 49199642609..916e1931592 100644 --- a/usr.bin/file/magdir/visx +++ b/usr.bin/file/magdir/visx @@ -1,3 +1,4 @@ +# $OpenBSD: visx,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # visx: file(1) magic for Visx format files diff --git a/usr.bin/file/magdir/vms b/usr.bin/file/magdir/vms index c91186f68c3..292bac27200 100644 --- a/usr.bin/file/magdir/vms +++ b/usr.bin/file/magdir/vms @@ -1,3 +1,4 @@ +# $OpenBSD: vms,v 1.3 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # vms: file(1) magic for VMS executables (experimental) diff --git a/usr.bin/file/magdir/vmware b/usr.bin/file/magdir/vmware new file mode 100644 index 00000000000..72ec38ebfaa --- /dev/null +++ b/usr.bin/file/magdir/vmware @@ -0,0 +1,13 @@ +# $OpenBSD: vmware,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +# ----------------------------------------------------------- +# 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/usr.bin/file/magdir/vxl b/usr.bin/file/magdir/vxl new file mode 100644 index 00000000000..a3ca455aa09 --- /dev/null +++ b/usr.bin/file/magdir/vxl @@ -0,0 +1,14 @@ +# $OpenBSD: vxl,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# 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 diff --git a/usr.bin/file/magdir/xdelta b/usr.bin/file/magdir/xdelta new file mode 100644 index 00000000000..3146ace088b --- /dev/null +++ b/usr.bin/file/magdir/xdelta @@ -0,0 +1,11 @@ +# $OpenBSD: xdelta,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# file(1) magic(5) data for xdelta Josh MacDonald <jmacd@CS.Berkeley.EDU> +# +0 string %XDELTA% XDelta binary patch file 0.14 +0 string %XDZ000% XDelta binary patch file 0.18 +0 string %XDZ001% XDelta binary patch file 0.20 +0 string %XDZ002% XDelta binary patch file 1.0 +0 string %XDZ003% XDelta binary patch file 1.0.4 +0 string %XDZ004% XDelta binary patch file 1.1 diff --git a/usr.bin/file/magdir/xenix b/usr.bin/file/magdir/xenix index 1acadec62a0..debf2a2a824 100644 --- a/usr.bin/file/magdir/xenix +++ b/usr.bin/file/magdir/xenix @@ -1,3 +1,4 @@ +# $OpenBSD: xenix,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # xenix: file(1) magic for Microsoft Xenix diff --git a/usr.bin/file/magdir/xwindows b/usr.bin/file/magdir/xwindows new file mode 100644 index 00000000000..aae84e9ce33 --- /dev/null +++ b/usr.bin/file/magdir/xwindows @@ -0,0 +1,26 @@ +# $OpenBSD: xwindows,v 1.1 2004/06/03 03:14:20 tedu Exp $ + +#------------------------------------------------------------------------------ +# xwindows: file(1) magic for various X/Window system file formats. + +# Compiled X Keymap +# XKM (compiled X keymap) files (including version and byte ordering) +1 string mkx Compiled XKB Keymap: lsb, +>0 byte >0 version %d +>0 byte =0 obsolete +0 string xkm Compiled XKB Keymap: msb, +>3 byte >0 version %d +>0 byte =0 obsolete + +# xfsdump archive +0 string xFSdump0 xfsdump archive +>8 long x (version %d) + +# Jaleo XFS files +0 long 395726 Jaleo XFS file +>4 long x - version %ld +>8 long x - [%ld - +>20 long x %ldx +>24 long x %ldx +>28 long 1008 YUV422] +>28 long 1000 RGB24] diff --git a/usr.bin/file/magdir/zilog b/usr.bin/file/magdir/zilog index b746e204f5b..2964a81df73 100644 --- a/usr.bin/file/magdir/zilog +++ b/usr.bin/file/magdir/zilog @@ -1,3 +1,4 @@ +# $OpenBSD: zilog,v 1.4 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # zilog: file(1) magic for Zilog Z8000. diff --git a/usr.bin/file/magdir/zyxel b/usr.bin/file/magdir/zyxel index 12a6abd5de8..cd53515556e 100644 --- a/usr.bin/file/magdir/zyxel +++ b/usr.bin/file/magdir/zyxel @@ -1,3 +1,4 @@ +# $OpenBSD: zyxel,v 1.2 2004/06/03 03:14:20 tedu Exp $ #------------------------------------------------------------------------------ # zyxel: file(1) magic for ZyXEL modems |