Beyond the dump

Templates and scripts

Reading a hex dump by hand means holding a specification in your head while you count. People used to print the pages and color them with pens: this range is the header, this range is a name, this range is the payload. It works. It does not survive the next file.

A grammar is the coloring, saved

A template — in Synalyze It! and Hexinator, a grammar — is that coloring written down. You describe the fields. A four-byte signature. A length. A string that runs for that many bytes. A list of records until the file ends. The editor paints the dump and lists the values with their names.

Open another file of the same type and the same grammar applies. You stop re-deriving the layout every time, and a field you named last month is still named.

What a grammar does not do

It does not discover the format for you. Someone still has to learn it, from a specification, from a comparison of two files, or from the program that writes them. The grammar is how that knowledge stays attached to the bytes, instead of living in a notebook.

It also does not change the file. Coloring is a view. Editing a labeled field writes the underlying bytes, which is the same edit you could have made in the hex column, with less counting.

Scripts

Some jobs are a step past parsing. Check a checksum. Pull one field out of a hundred files. Rewrite a value that the grammar can already find. A script does that. Both editors can be extended this way, including with Python, so the repetitive part does not have to be done from the keyboard.

macOS

Synalyze It!

A hex editor for the Mac. Read and change the bytes, then describe a file format once so the next file of that type is already labeled.

Visit Synalyze It!

Windows and Linux

Hexinator

The same kind of editor for Windows and Linux: the raw bytes, grammars for formats you see often, and scripts when a format needs a calculation.

Visit Hexinator