From: Christos Zoulas Date: Sun, 31 Oct 1999 21:59:26 +0000 (+0000) Subject: various changes X-Git-Tag: FILE3_28~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=59c710ac860a97099c7330cae873302c7ded13a0;p=file various changes --- diff --git a/magic/Magdir/audio b/magic/Magdir/audio index 615b8b33..93ba1875 100644 --- a/magic/Magdir/audio +++ b/magic/Magdir/audio @@ -67,7 +67,8 @@ >83 byte 1 (song) # Real Audio (Magic .ra\0375) -0 belong 0x2e7261fd realaudio sound file +0 belong 0x2e7261fd RealAudio sound file +0 string .RMF RealMedia file # MTM/669/FAR/S3M/ULT/XM format checking [Aaron Eppert, aeppert@dialin.ind.net] # Oct 31, 1995 @@ -109,3 +110,9 @@ # TOC sound files -Trevor Johnson # 0 string TOC TOC sound file + +# sidfiles +0 string PSID PlaySID v2.2+ (AMIGA) sidtune, +0 string SIDPLAY\ INFOFILE Sidplay info file +>14 beshort =1 single song, +>14 beshort >1 %d songs, diff --git a/magic/Magdir/database b/magic/Magdir/database index a4c70619..071576c4 100644 --- a/magic/Magdir/database +++ b/magic/Magdir/database @@ -47,11 +47,49 @@ # # 12 belong 0x061561 Berkeley DB 2.X Hash/Big Endian ->16 belong >0 (Version %d) +>16 belong >0 (Version %d, +>0 belong x Logical sequence number: file - %d, +>4 belong x offset - %d, +>20 belong x Bucket Size %d, +>24 belong x Overflow Point %d, +>28 belong x Last Freed %d, +>32 belong x Max Bucket %d, +>36 belong x High Mask 0x%x, +>40 belong x Low Mask 0x%x, +>44 belong x Fill Factor %d, +>48 belong x Number of Keys %d) +# +# DB2.X formats from Khimenko Victor +# 12 lelong 0x061561 Berkeley DB 2.X Hash/Little Endian ->16 lelong >0 (Version %d) - +>16 lelong >0 (Version %d, +>0 lelong x Logical sequence number: file - %d, +>4 lelong x offset - %d, +>20 lelong x Bucket Size %d, +>24 lelong x Overflow Point %d, +>28 lelong x Last Freed %d, +>32 lelong x Max Bucket %d, +>36 lelong x High Mask 0x%x, +>40 lelong x Low Mask 0x%x, +>44 lelong x Fill Factor %d, +>48 lelong x Number of Keys %d) +# +# 12 belong 0x053162 Berkeley DB 2.X Btree/Big Endian ->16 belong >0 (Version %d) +>16 belong >0 (Version %d, +>0 belong x Logical sequence number: file - %d, +>4 belong x offset - %d, +>20 belong x Page Size %d, +>24 belong x Maxkey %d, +>28 belong x Minkey %d, +>32 belong x Free Page %d) +# +# 12 lelong 0x053162 Berkeley DB 2.X Btree/Little Endian ->16 lelong >0 (Version %d) +>16 lelong >0 (Version %d, +>0 lelong x Logical sequence number: file - %d, +>4 lelong x offset - %d, +>20 lelong x Page Size %d, +>24 lelong x Maxkey %d, +>28 lelong x Minkey %d, +>32 lelong x Free Page %d) diff --git a/magic/Magdir/gimp b/magic/Magdir/gimp index 286fa9c3..9a9d61e2 100644 --- a/magic/Magdir/gimp +++ b/magic/Magdir/gimp @@ -9,12 +9,16 @@ # by Spencer Kimball and Peter Mattis # ('Bucky' LaDieu, nega@vt.edu) -0 string gimp\ xcf\ file GIMP XCF image data, ->14 belong x %ld x ->18 belong x %ld, +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 diff --git a/magic/Magdir/grace b/magic/Magdir/grace new file mode 100644 index 00000000..a5f14335 --- /dev/null +++ b/magic/Magdir/grace @@ -0,0 +1,20 @@ + +#------------------------------------------------------------------------------ +# 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/magic/Magdir/images b/magic/Magdir/images index 9f3eb77a..0525ad39 100644 --- a/magic/Magdir/images +++ b/magic/Magdir/images @@ -7,7 +7,20 @@ # merging several one- and two-line files into here. # # little magic: PCX (first byte is 0x0a) -# no magic: Targa + +# Targa - matches `povray', `ppmtotga' and `xv' outputs +# by Philippe De Muyter +# at 2, byte ImgType must be 1, 2, 3, 9, 10 or 11 +# at 1, byte CoMapType must be 1 if ImgType is 1 or 9, 0 otherwise +# at 3, leshort Index is 0 for povray, ppmtotga and xv outputs +# `xv' recognizes only a subset of the following (RGB with pixelsize = 24) +# `tgatoppm' recognizes a superset (Index may be anything) +1 belong&0xfff7ffff 0x01010000 Targa image data - Map +>2 byte&8 8 - RLE +1 belong&0xfff7ffff 0x00020000 Targa image data - RGB +>2 byte&8 8 - RLE +1 belong&0xfff7ffff 0x00030000 Targa image data - Mono +>2 byte&8 8 - RLE # PBMPLUS images # The next byte following the magic is always whitespace. @@ -118,19 +131,6 @@ >29 byte 0 \b, normal resolution (204x98 DPI) >29 byte 1 \b, fine resolution (204x196 DPI) -# JPEG images -# SunOS 5.5.1 had -# -# 0 string \377\330\377\340 JPEG file -# 0 string \377\330\377\356 JPG file -# -# both of which turn into "JPEG image data" here. -# -0 beshort 0xffd8 JPEG image data ->6 string JFIF \b, JFIF standard -# HSI is Handmade Software's proprietary JPEG encoding scheme -0 string hsi1 JPEG image data, HSI proprietary - # PC bitmaps (OS/2, Windoze BMP files) (Greg Roelofs, newt@uchicago.edu) 0 string BM PC bitmap data >14 leshort 12 \b, OS/2 1.x format diff --git a/magic/Magdir/jpeg b/magic/Magdir/jpeg new file mode 100644 index 00000000..089405a6 --- /dev/null +++ b/magic/Magdir/jpeg @@ -0,0 +1,61 @@ + +#------------------------------------------------------------------------------ +# JPEG images +# SunOS 5.5.1 had +# +# 0 string \377\330\377\340 JPEG file +# 0 string \377\330\377\356 JPG file +# +# both of which turn into "JPEG image data" here. +# +0 beshort 0xffd8 JPEG image data +>6 string JFIF \b, JFIF standard + +# The following added by Erik Rossen 1999-09-06 +# in a vain attempt to add image size reporting for JFIF. Note that these +# tests are not fool-proof since some perfectly valid JPEGs are currently +# impossible to specify in magic(4) format. +# First, a little JFIF version info: +>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) +>14 beshort x \b X%d: +>16 beshort x \bY%d +#>4 beshort x \b, segment length %d +# Next, show thumbnail info, if it exists: +>18 byte !0 \b, thumbnail %dx +>>19 byte x \b%d +# Here things get sticky. We can do ONE MORE marker segment with +# indirect addressing, and that's all. It would be great if we could +# do pointer arithemetic like in an assembler language. Christos? +# And if there was some sort of looping construct to do searches, plus a few +# named accumulators, it would be even more effective... +# At least we can show a comment if no other segments got inserted before: +>(4.S+5) byte 0xFE +>>(4.S+8) string >\0 \b, "%s" +#>(4.S+5) byte 0xFE \b, comment +#>>(4.S+6) beshort x \b length=%d +#>>(4.S+8) string >\0 \b, "%s" +# Or, we can show the encoding type (I've included only the three most common) +# and image dimensions if we are lucky and the SOFn (image segment) is here: +>(4.S+5) byte 0xC0 \b, baseline +>>(4.S+6) byte x \b, precision %d +>>(4.S+7) beshort x \b, %dx +>>(4.S+9) beshort x \b%d +>(4.S+5) byte 0xC1 \b, extended sequential +>>(4.S+6) byte x \b, precision %d +>>(4.S+7) beshort x \b, %dx +>>(4.S+9) beshort x \b%d +>(4.S+5) byte 0xC2 \b, progressive +>>(4.S+6) byte x \b, precision %d +>>(4.S+7) beshort x \b, %dx +>>(4.S+9) beshort x \b%d +# 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 + +# HSI is Handmade Software's proprietary JPEG encoding scheme +0 string hsi1 JPEG image data, HSI proprietary diff --git a/magic/Magdir/mcrypt b/magic/Magdir/mcrypt new file mode 100644 index 00000000..6416104d --- /dev/null +++ b/magic/Magdir/mcrypt @@ -0,0 +1,31 @@ +#------------------------------------------------------------------------------ +# Mavroyanopoulos Nikos +# mcrypt: file(1) magic for mcrypt 2.2.x; +0 string \0m\2 mcrypt 2.2 encrypted data, +>3 byte 0 algorithm: blowfish-448, +>3 byte 1 algorithm: DES, +>3 byte 2 algorithm: 3DES, +>3 byte 3 algorithm: 3-WAY, +>3 byte 4 algorithm: GOST, +>3 byte 6 algorithm: SAFER-SK64, +>3 byte 7 algorithm: SAFER-SK128, +>3 byte 8 algorithm: CAST-128, +>3 byte 9 algorithm: xTEA, +>3 byte 10 algorithm: TWOFISH-128, +>3 byte 11 algorithm: RC2, +>3 byte 12 algorithm: TWOFISH-192, +>3 byte 13 algorithm: TWOFISH-256, +>3 byte 14 algorithm: blowfish-128, +>3 byte 15 algorithm: blowfish-192, +>3 byte 16 algorithm: blowfish-256, +>3 byte 100 algorithm: RC6, +>3 byte 101 algorithm: IDEA, +>4 byte 0 mode: CBC, +>4 byte 1 mode: ECB, +>4 byte 2 mode: CFB, +>4 byte 3 mode: OFB, +>4 byte 4 mode: nOFB, +>5 byte 0 keymode: 8bit +>5 byte 1 keymode: 4bit +>5 byte 2 keymode: SHA-1 hash +>5 byte 3 keymode: MD5 hash diff --git a/magic/Magdir/msdos b/magic/Magdir/msdos index dbafe96e..5293ef58 100644 --- a/magic/Magdir/msdos +++ b/magic/Magdir/msdos @@ -87,6 +87,7 @@ >24 string @ \b, OS/2 or MS Windows >>0xe7 string LH/2\ Self-Extract \b, %s >>0xe9 string PKSFX2 \b, %s +>>122 string Windows\ self-extracting\ ZIP \b, %s >0x1c string RJSX\xff\xff \b, ARJ SFX >0x1c string diet\xf9\x9c \b, diet compressed >0x1e string Copyright\ 1989-1990\ PKWARE\ Inc. \b, PKSFX @@ -149,11 +150,15 @@ 2080 string Microsoft\ Word\ 6.0\ Document %s 2080 string Documento\ Microsoft\ Word\ 6 Spanish Microsoft Word 6 document data # Pawel Wiecek (for polish Word) -2112 string MSWordDoc Microsoft Word document data +2112 string MSWordDoc Microsoft Word document data # -0 belong 0x31be0000 Microsoft Word Document +0 belong 0x31be0000 Microsoft Word Document # -0 string PO^Q` Microsoft Word 6.0 Document +0 string PO^Q` Microsoft Word 6.0 Document +# +0 string \376\067\0\043 Microsoft Office Document +0 string \320\317\021\340\241\261 Microsoft Office Document +0 string \333\245-\0\0\0 Microsoft Office Document # 2080 string Microsoft\ Excel\ 5.0\ Worksheet %s # @@ -176,3 +181,6 @@ # Help files 0 string ?_\3\0 MS Windows Help Data + +# Microsoft CAB distribution format Dale Worley +0 string MSCF\000\000\000\000 Microsoft CAB file diff --git a/magic/Magdir/sgml b/magic/Magdir/sgml index 985bbeca..359b83b2 100644 --- a/magic/Magdir/sgml +++ b/magic/Magdir/sgml @@ -1,21 +1,28 @@ #------------------------------------------------------------------------------ # 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 \ +0 string avaobj AVR assembler object code +>7 string >\0 version '%s'