[File] [PATCH] of Magdir/windows HyperTerminal profile not detected because wrong offset

Christos Zoulas christos at zoulas.com
Mon Apr 17 16:35:27 UTC 2023


Committed, thanks!

christos

> On Apr 14, 2023, at 5:41 PM, Jörg Jenderek <joerg.jen.der.ek at gmx.net> wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hello,
> 
> some days ago i send patch of Magdir/windows for MS Windows shortcut
> links. Before that entry were lines for MS Windows HyperTerminal
> profiles (*.ht).
> 
> So i look on my systems for such files. When running file command
> version 5.44 on such examples i get an output like:
> 
> MyHyperTerminal-6.ht: data
> MyHyperTerminal2.ht:  data
> MyHyperterminal1.ht:  data
> MyHyperterminal3.ht:  data
> MyHyperterminal5.ht:  data
> 
> Then of course with -i option only generic application/octet-stream
> is shown and with --extension 3 byte sequence ??? is displayed.
> 
> For comparison reason i run other utilities. The file identifier tool
> TrID  (see http://mark0.net/soft-trid-e.html) describes such
> examples as "HyperTerminal data file" by definition ht.trid.xml (see
> appended trid-v-ht.txt.gz).
> 
> DROID (Digital Record and Object Identification) is a software tool
> developed by The National Archives of UK to perform automated batch
> identification of file formats. See
> 	https://digital-preservation.github.io/droid/
> This does not recognize such samples.
> 
> Luckily with information given by the TrID tool i also found a
> page about HyperTerminal on Wikipedia and on manufacture page. That
> informations are expressed by comment lines inside Magdir/windows
> like:
> # URL:		https://en.wikipedia.org/wiki/HyperACCESS
> #		https://www.hilgraeve.com/hyperterminal/
> # Reference:	http://mark0.net/download/triddefs_xml.7z
> #		defs/h/ht.trid.xml
> There you can also download a trial with Version 7.1. I also grab
> samples created with older version dated about 1999.
> 
> In Magdir/windows it starts with lines like:
> 0   string	HyperTerminal\040
>> 15 string	1.0\ --\ HyperTerminal\ data\ file
> 		MS Windows HyperTerminal profile
> 
> When looking in my examples and TrID definition i saw that used
> offset 15 is wrong, because the beginning offset start with value
> 0. So the correct offset is 14. So these lines now becomes like:
> 0	string		HyperTerminal\040
>> 14	string		1.0\ --\ HyperTerminal\ data\ file
> 			MS Windows HyperTerminal profile
> !:mime	application/x-ms-ht
> !:ext	ht
> Instead of generic mime type application/octet-stream i show an user
> defined one. Also the correct name suffix HT is now shown.
> 
> After applying the above mentioned modifications by patch
> file-5.44-windows-ht.diff then the HyperTerminal samples are now
> recognized. So i get now an output like:
> 
> MyHyperTerminal-6.ht: MS Windows HyperTerminal profile
> MyHyperTerminal2.ht:  MS Windows HyperTerminal profile
> MyHyperterminal1.ht:  MS Windows HyperTerminal profile
> MyHyperterminal3.ht:  MS Windows HyperTerminal profile
> MyHyperterminal5.ht:  MS Windows HyperTerminal profile
> 
> I hope 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+v8rHJQhrU1gUCZDnIbQAKCRCv8rHJQhrU
> 1lXvAKCYcVskGOGf1Rq0RFABU1hX2JrLqwCgpxRhvzf+0Zbi+X+q61xb1wWUM5Y=
> =+rTt
> -----END PGP SIGNATURE-----
> <trid-v-ht.txt.gz><file-5_44-windows-ht_diff.DEFANGED-2><file-5_44-windows-ht_diff_sig.DEFANGED-3>--
> 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/20230417/c6455293/attachment.asc>


More information about the File mailing list