From: Christos Zoulas Date: Tue, 18 Dec 2012 17:28:43 +0000 (+0000) Subject: PR/216: Reduce strength of x86 boot sector, bump pbm files adding width and X-Git-Tag: FILE5_12~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ffd831e9dc23a337ae20142b364ba081f456698d;p=file PR/216: Reduce strength of x86 boot sector, bump pbm files adding width and height printing (Jan Kaluza) --- diff --git a/magic/Magdir/filesystems b/magic/Magdir/filesystems index 27e67705..9172dcb4 100644 --- a/magic/Magdir/filesystems +++ b/magic/Magdir/filesystems @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: filesystems,v 1.67 2012/12/01 19:14:28 christos Exp $ +# $File: filesystems,v 1.68 2012/12/09 17:49:00 christos Exp $ # filesystems: file(1) magic for different filesystems # 0 string \366\366\366\366 PC formatted floppy with no filesystem @@ -61,7 +61,7 @@ # for any allowed sector sizes 30 search/481 \x55\xAA # to display x86 boot sector (40) before old one (strength=50), SYSLINUX MBR (?) and DOS BPB information (71) like in previous file version -!:strength +72 +!:strength +40 # for sector sizes < 512 Bytes >11 uleshort <512 >>(11.s-2) uleshort 0xAA55 x86 boot sector diff --git a/magic/Magdir/images b/magic/Magdir/images index 26cfdd28..740f23a8 100644 --- a/magic/Magdir/images +++ b/magic/Magdir/images @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: images,v 1.77 2012/10/14 22:53:42 christos Exp $ +# $File: images,v 1.78 2012/12/18 17:25:54 christos Exp $ # images: file(1) magic for image formats (see also "iff", and "c-lang" for # XPM bitmaps) # @@ -32,17 +32,42 @@ # PBMPLUS images # The next byte following the magic is always whitespace. -0 search/1 P1 Netpbm PBM image text +# strength is changed to try these patterns before "x86 boot sector" +0 search/1 P1 +>3 regex =[0-9]*\ [0-9]* Netpbm PBM image text +>3 regex =[0-9]+\ \b, size = %sx +>>3 regex =\ [0-9]+ \b%s +!:strength + 45 !:mime image/x-portable-bitmap -0 search/1 P2 Netpbm PGM image text +0 search/1 P2 +>3 regex =[0-9]*\ [0-9]* Netpbm PGM image text +>3 regex =[0-9]+\ \b, size = %sx +>>3 regex =\ [0-9]+ \b%s +!:strength + 45 !:mime image/x-portable-greymap 0 search/1 P3 Netpbm PPM image text +>3 regex =[0-9]*\ [0-9]* Netpbm PPM image text +>3 regex =[0-9]+\ \b, size = %sx +>>3 regex =\ [0-9]+ \b%s +!:strength + 45 !:mime image/x-portable-pixmap -0 string P4 Netpbm PBM "rawbits" image data +0 string P4 +>3 regex =[0-9]*\ [0-9]* Netpbm PBM "rawbits" image data +>3 regex =[0-9]+\ \b, size = %sx +>>3 regex =\ [0-9]+ \b%s +!:strength + 45 !:mime image/x-portable-bitmap -0 string P5 Netpbm PGM "rawbits" image data +0 string P5 +>3 regex =[0-9]*\ [0-9]* Netpbm PGM "rawbits" image data +>3 regex =[0-9]+\ \b, size = %sx +>>3 regex =\ [0-9]+ \b%s +!:strength + 45 !:mime image/x-portable-greymap -0 string P6 Netpbm PPM "rawbits" image data +0 string P6 +>3 regex =[0-9]*\ [0-9]* Netpbm PPM "rawbits" image data +>3 regex =[0-9]+\ \b, size = %sx +>>3 regex =\ [0-9]+ \b%s +!:strength + 45 !:mime image/x-portable-pixmap 0 string P7 Netpbm PAM image file !:mime image/x-portable-pixmap