Get the latest tech news

Visualizing binary files with ImHex's DSL, the "pattern language"


Viewing my binary file with ImHex. The pattern language pane, on the right,...

Before, my approach would have probably been to write some Python code to parse the format, following the spec carefully and see where it diverges. These cases are easy to write, since in the pattern language, you can reuse previous values, even if it's declared in the same structure: Thankfully, the pattern language has support for custom stop conditions, using a " loop sized array":

Get the Android app

Or read this on Hacker News

Read more on:

Photo of DSL

DSL

Photo of pattern language

pattern language

Photo of binary files

binary files

Related news:

News photo

A DSL for peephole transformation rules of integer operations in the PyPy JIT

News photo

Show HN: Bin-graph: Visualize binary files

News photo

Python GitHub Token Leak Shows Binary Files Can Burn Developers Too