Defining structures that are offset from the end of a file

0 votes
asked Jul 18, 2016 by msoto (120 points)
edited Jul 21, 2016 by msoto
A binary plist has a structure that always begins 32 bytes from the end of the file.  How do I define the structure in a grammer file?  

So far, when I create the structure it uses the offset from the beginning of the file.  If I try to use the grammer file with a larger plist the wrong area of the file is included in the structure.

1 Answer

0 votes
answered Jul 23, 2016 by andreas (2,180 points)
edited Aug 20, 2016 by andreas

A good example how to do this is the ZIP grammar. (see https://www.synalysis.net/formats.xml )

There a script element "JumpToEnd" continues parsing at the end of the file.

Actually I've just published a complete grammar for binary property lists on https://www.synalysis.net/formats.xml

...