blog: Sequences in LaymansHex

I have spent some time thinking about handling sequences and in-file offsets with LaymansHex. I decided on two things:

  1. LaymansHex is not and should not be used as a “proper” binary parser. It is a quick-and-dirty tool to read and set some values.
  2. Binary sequences are implemented in multiple ways and adding every way to the file description format is tedious and makes the use complex.

Both points led me to believe, that it’s better to handle sequences and offsets with multiple calls to LaymansHex and variable byte field sizes in the format definition to allow for offsets and sliding windows. I implemented this in commit 279429d0bff0681d533b23c260249361078d0a78

I added a minimal example to the of the README.

Posted in hacking programming reversing
2020-04-27 19:43 UTC