[HN Gopher] GNU poke: The extensible editor for structured binar...
___________________________________________________________________
GNU poke: The extensible editor for structured binary data
Author : marcodiego
Score : 144 points
Date : 2023-03-01 18:12 UTC (4 hours ago)
(HTM) web link (jemarch.net)
(TXT) w3m dump (jemarch.net)
| still_grokking wrote:
| In my opinion the core on which poke was made is actually much
| more interesting than the tool as such.
|
| Poke is actually not only an editor, it's a domain specific
| language.
|
| This language is built on top of something called GNU Jitter.
|
| https://www.gnu.org/software/jitter/
|
| Jitter is a very interesting project! It's a kind of generic
| interpreter that is--as the name suggests--almost a JIT compiler.
| It's something more or less "in between". Technically it's more
| an interpreter + VM. But it uses all kinds of (I think novel)
| tricks to remove the overhead of interpretation, which makes the
| code at runtime almost look like what a JIT compiler would have
| produced.
|
| Some more internal info than on the GNU page on how this works
| can be found in the following slides:
|
| http://ageinghacker.net/talks/jitter-slides--saiu--ghm2017--...
| bogwog wrote:
| Haven't watched the full video, but this looks similar ImHex
| (https://imhex.werwolv.net/), which also includes a pattern
| language thing to describe the structure of data. I used it once
| for a project, and it was useful when it worked, although I ran
| into some limitations when trying to model container formats.
|
| Maybe it could do that and I just couldn't figure it out at the
| time, but if you have say a zip file with different file formats,
| you couldn't tell the language to switch between different
| structures based on like an index or a header that tells you the
| format of a subsection. It was a limitation of the pattern
| language.
|
| I wonder if GNU poke is more advanced in that regard? A tool like
| this would be super useful for debugging custom binary formats,
| but some formats can get pretty complex.
| babas wrote:
| It may not be ideal to praise commercial software in a GNU
| software thread, but I really enjoy using 010 Editor. It's one of
| the few programs I pay for. Its C-like template syntax (looks
| similar to GNU Poke syntax) makes reverse engineering binary
| formats easy and fun!
| nequo wrote:
| What are the pros and cons of 010 Editor compared with GNU
| poke?
| colejohnson66 wrote:
| Check out ImHex! It's a FOSS alternative to 010 Editor.
| AceJohnny2 wrote:
| Can anyone comment on how this compares to Hachoire?
|
| https://hachoir.readthedocs.io/en/latest/
| elevation wrote:
| I always liked Winhex for this type of thing. It could dissect a
| structure with a c-like syntax. I found it as shareware as a kid
| and have never used a hex editor I liked more.
|
| https://www.x-ways.net/winhex/
| sparkie wrote:
| wxHexEditor has a similar look and feel to WinHex, and
| similarly supports editing of extremely large files or raw
| devices. It's nowhere near as featureful but still very useful,
| and doesn't have the proprietary license.
|
| https://github.com/EUA/wxHexEditor /
| http://www.wxhexeditor.org/
| Andoryuuta wrote:
| Interesting! I've heard of winhex before, but I never knew it
| had a templating language.
|
| I've been using 010 Editor, which similarly lets you define
| templates with c-like syntax, run it against a file, and edit
| the fields from there.
|
| (Cross platform too, which is nice. It is a paid product
| though)
|
| https://www.sweetscape.com/010editor/
| tdiff wrote:
| Can it be taught to read serialized protobufs?
| klyrs wrote:
| I love/hate that "pickle" is defined through usage. Curious to
| know if that name has any meaning (e.g. python pickles are for
| long-term storage of ephemeral data), but not curious enough to
| watch a video just in case that's covered.
| hummus_bae wrote:
| [dead]
| upwardbound wrote:
| A pickle is a cucumber preserved in preservatives for long term
| storage, hence that name I think (and it start with P like
| python).
| Timon3 wrote:
| Just to expand on this:
|
| > Pickling is the process of preserving or extending the
| shelf life of food by either anaerobic fermentation in brine
| or immersion in vinegar.
|
| https://en.wikipedia.org/wiki/Pickling
| DvdGiessen wrote:
| * * *
| DannyB2 wrote:
| Not the same thing, but I am reminded of Rez, Derez and the
| Resource Editor of ancient Mac daze.
| salgernon wrote:
| Rez and DeRez still ship with xcode (or did the last time I
| checked)
| marssaxman wrote:
| How fun!
|
| Reminds me of ResEdit, from classic Mac OS, and its template
| resources.
| VLM wrote:
| That would be a fun CLI for retro/tiny computers. Imagine
| something like that for a Z80 or 68hc11 vs the typical boot rom.
| mdp2021 wrote:
| It was about time!
|
| The capabilities of hex editors on Linux is strongly
| underwhelming when compared to, say, WinHex almost 30 years ago!
| guidoism wrote:
| What a great name!
___________________________________________________________________
(page generated 2023-03-01 23:00 UTC)