[File] [PATCH] of Magdir/ole2compounddocs for SoftMaker documents

Christos Zoulas christos at zoulas.com
Sat Mar 28 23:13:15 UTC 2020


Committed, thanks! I wonder if these could also be handled in more detail by cdf.c

christos

> On Mar 25, 2020, at 11:10 PM, Jörg Jenderek <joerg.jen.der.ek at gmx.net> wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hello,
> some months ago i send patches to handle OLE 2 Compound Document.
> Some days ago i used SoftMaker Office. That suite can read/read
> Microsoft Office and OpenDocument files. It also has it own native
> formats. Some are based on OLE 2 Compound Document format.
> When running file command version 5.38 on such documents with -e cdf
> option i get an output like:
> 
> planmaker-pmd-2010.pmd:            OLE 2 Compound Document, v3.62,
> 	SecID 0x13 : UNKNOWN,
> 	clsid 0x9174088a6452d41195f600a0cc3cca14
> planmaker-pmd-2012.pmd:            OLE 2 Compound Document, v3.62,
> 	SecID 0x12 : UNKNOWN,
> 	clsid 0x9174088a6452d41195f600a0cc3cca14
> planmaker-pmv.pmv:                 OLE 2 Compound Document, v3.62,
> 	SecID 0x12 : UNKNOWN,
> 	clsid 0x9174088a6452d41195f600a0cc3cca14
> sm-presentation-pot.pot:           OLE 2 Compound Document,
> 	v3.62, SecID 0x2b : UNKNOWN
> sm-presentation-pps.pps:           OLE 2 Compound Document,
> 	v3.62, SecID 0x2b : UNKNOWN
> sm-presentation-ppt-2000-2003.ppt: OLE 2 Compound Document,
> 	v3.62, SecID 0x2b : UNKNOWN
> sm-presentation-ppt-97.ppt:        OLE 2 Compound Document,
> 	v3.62, SecID 0x2b : UNKNOWN
> sm-presentation-prd.prd:           OLE 2 Compound Document,
> 	v3.62, SecID 0x29 : UNKNOWN
> 
> Some information about Planmaker is found on Wikipedia. So i
> add to Magdir/ole2compounddocs a comment line like:
> # URL:	https://en.wikipedia.org/wiki/PlanMaker
> 
> For UNKNOWN examples where clsid is shown adding is easy. Because
> the clsid is a unique identifier, then in sub routine
> ole2-directory inside Magdir/ole2compounddocs lines must be added
> to check for specific id at offset 80 of directory stream and then
> print file description. This additional lines look like:
>>> 88 	ubequad	0x95f600a0cc3cca14	: PlanMaker
>>>> 80 	ubequad	0x9174088a6452d411	document or template
> Afterwards show mime type and file name extension for document or
> templates by lines like
> !:mime	application/vnd.softmaker.planmaker
> !:ext	pmd/pmv
> 
> For the other unknown files made by spreadsheet or presentation
> module of Softmaker Office suite clsid is zero. Some information
> about that office suite is found on Wikipedia. So i add a comment
> line to  Magdir/ole2compounddocs at the right position like:
> # URL:	https://en.wikipedia.org/wiki/PlanMaker
> So i look at directory name entries, which seem to have specific
> names (PowerPoint,SMNativeObjData,Current User), but i am not sure
> about this assumption. Especially the Microsoft PowerPoint
> generated format (PPT) samples look nearly the same as Softmaker
> own Presentations format (PRD) examples.
> 
> In the end i add magic lines like:
>>>>> 128   lestring16 Current\ User	: SoftMaker
>>>>>> 256  lestring16 SMNativeObjData
>>>>>>> 512 lestring16 PowerPoint PowerPoint presentation or template
> !:mime	application/vnd.ms-powerpoint
> !:ext	ppt/pps/pot
>>>>>> 384  lestring16 PowerPoint	Presentations or template
> !:mime	application/vnd.softmaker.presentations
> !:ext	prd/prv
>>>>> 256   lestring16 Current\ User	: SoftMaker
>>>>>> 512  lestring16 PowerPoint	Presentations or template
> !:mime	application/vnd.softmaker.presentations
> !:ext	prd/prv
> 
> Because i am still not able to recognize small StarOffice Gallery
> views (*.sdv), i also display additional information from header
> after SecID if values are unusual. This now looks like:
> 
>>>> 32	uleshort !6		\b, exponent of short stream %u
>>>> 44	ulelong  >1		\b, %u FAT sectors
>>>> 60	ulelong  !0xffFFffFE	\b, Mini FAT start sector 0x%x
>>>> 64	ulelong  !0		\b, %u Mini FAT sector
>>>>> 64	ulelong  >1		\bs
>>>> 68	ulelong  !0xffFFffFE	\b, DIFAT start sector 0x%x
>>>> 72	ulelong  >0		\b, %u DIFAT sectors
> 
> After applying the above mentioned modifications by patch
> file-5.38-ole2compounddocs-softmaker.diff then the above mentioned
> Softmaker examples are now identified like:
> 
> planmaker-pmd-2010.pmd:            OLE 2 Compound Document, v3.62,
> 	SecID 0x13, Mini FAT start sector 0x12 :
> 	PlanMaker document or template
> planmaker-pmd-2012.pmd:            OLE 2 Compound Document, v3.62,
> 	SecID 0x12, Mini FAT start sector 0x11 :
> 	PlanMaker document or template
> planmaker-pmv.pmv:                 OLE 2 Compound Document, v3.62,
> 	SecID 0x12, Mini FAT start sector 0x11 :
> 	PlanMaker document or template
> sm-presentation-pot.pot:           OLE 2 Compound Document, v3.62,
> 	SecID 0x2b, Mini FAT start sector 0x2a :
> 	SoftMaker PowerPoint presentation or template
> sm-presentation-pps.pps:           OLE 2 Compound Document, v3.62,
> 	SecID 0x2b, Mini FAT start sector 0x2a :
> 	SoftMaker PowerPoint presentation or template
> sm-presentation-ppt-2000-2003.ppt: OLE 2 Compound Document, v3.62,
> 	SecID 0x2b, Mini FAT start sector 0x2a :
> 	SoftMaker PowerPoint presentation or template
> sm-presentation-ppt-97.ppt:        OLE 2 Compound Document, v3.62,
> 	SecID 0x2b, Mini FAT start sector 0x2a :
> 	SoftMaker PowerPoint presentation or template
> sm-presentation-prd.prd:           OLE 2 Compound Document, v3.62,
> 	SecID 0x29, Mini FAT start sector 0x28 :
> 	SoftMaker Presentations or template
> sm-presentation-prv.prv:           OLE 2 Compound Document, v3.62,
> 	SecID 0x29, Mini FAT start sector 0x28 :
> 	SoftMaker Presentations or template
> 
> I hope that my diff file can be applied in future version of file
> utility.
> 
> With best wishes
> Jörg Jenderek
> - --
> Jörg Jenderek
> -----BEGIN PGP SIGNATURE-----
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
> 
> iF0EARECAB0WIQS5/qNWKD4ASGOJGL+v8rHJQhrU1gUCXnwc5AAKCRCv8rHJQhrU
> 1lPWAJsHqhGJc6NSCSsPMSHjIroqqu3bHgCgmtpYFMYd7f0cOAp2SA1G/ImJrc8=
> =3n6t
> -----END PGP SIGNATURE-----
> <file-5_38-ole2compounddocs-softmaker_diff.DEFANGED-187><file-5_38-ole2compounddocs-softmaker_diff_sig.DEFANGED-188>--
> File mailing list
> File at astron.com
> https://mailman.astron.com/mailman/listinfo/file
> <sanitizer.log>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <https://mailman.astron.com/pipermail/file/attachments/20200328/1dc123ca/attachment.asc>


More information about the File mailing list