diff options
Diffstat (limited to 'contrib/file/magic/Magdir/msooxml')
-rw-r--r-- | contrib/file/magic/Magdir/msooxml | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/contrib/file/magic/Magdir/msooxml b/contrib/file/magic/Magdir/msooxml index afbc95aca6e3..194cf53fe249 100644 --- a/contrib/file/magic/Magdir/msooxml +++ b/contrib/file/magic/Magdir/msooxml @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: msooxml,v 1.8 2018/05/24 18:11:17 christos Exp $ +# $File: msooxml,v 1.12 2019/04/19 00:42:27 christos Exp $ # msooxml: file(1) magic for Microsoft Office XML # From: Ralf Brown <ralf.brown@gmail.com> @@ -25,20 +25,21 @@ !:strength +10 # make sure the first file is correct >0x1E use msooxml ->0x1E regex \\[Content_Types\\]\\.xml|_rels/\\.rels +>0x1E regex \\[Content_Types\\]\\.xml|_rels/\\.rels|docProps # skip to the second local file header # since some documents include a 520-byte extra field following the file # header, we need to scan for the next header ->>(18.l+49) search/2000 PK\003\004 +>>(18.l+49) search/6000 PK\003\004 # now skip to the *third* local file header; again, we need to scan due to a # 520-byte extra field following the file header ->>>&26 search/1000 PK\003\004 +>>>&26 search/6000 PK\003\004 # and check the subdirectory name to determine which type of OOXML # file we have. Correct the mimetype with the registered ones: -# http://technet.microsoft.com/en-us/library/cc179224.aspx +# https://technet.microsoft.com/en-us/library/cc179224.aspx >>>>&26 use msooxml >>>>&26 default x # OpenOffice/Libreoffice orders ZIP entry differently, so check the 4th file ->>>>>&26 search/1000 PK\003\004 +>>>>>&26 search/6000 PK\003\004 >>>>>>&26 use msooxml >>>>>>&26 default x Microsoft OOXML +>>>>>&26 default x Microsoft OOXML |