[File] Finding magic at end of files?

Christos Zoulas christos at zoulas.com
Sat Sep 1 10:00:31 EDT 2018

On Aug 29, 11:33am, mew at mew.cx (Mike Weiblen) wrote:
-- Subject: [File] Finding magic at end of files?

| Reading the manpages, it appears the offset used to find magic is 
| assumed unsigned from the start of the file.
| Is it possible to find magic from the end of the file, using say a 
| negative offset?
| The DFU file format 
| (http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf appendix B 
| page 40) appends a suffix with its magic at the end of the file.

There is support for negative offsets starting with file 5.33...
(See magic/Magdir/zip)


More information about the File mailing list