EUA / wxHexEditor

wxHexEditor official GIT repo
http://www.wxhexeditor.org
GNU General Public License v2.0
555 stars 118 forks source link

Feature: File templates #20

Open vdun opened 8 years ago

vdun commented 8 years ago

Would be great to have the support of file templates/structure like :

This by making wxHexEditor able to read .bt or/and .osd files.

KillyMXI commented 7 years ago

By the date, Kaitai Struct is the fanciest tool for the task. It is available in form of runtime library and should be easier to support. There are plenty of structure descriptions available in form of .ksy files in the repo.

eadmaster commented 6 years ago

I second the request, another tool i've tried in the past is https://sourceforge.net/projects/ff-extractor/

KOLANICH commented 4 years ago

124 is an absolute prereq for implementing KS support.

IMHO for KS support it is needed to support dynamic plugins #132, add an API for generating tags, then take some embeddable interpreter, like https://bellard.org/quickjs/ , pass the API there and use it to interpret the KS-generated code.

BTW: https://gitlab.com/KOLANICH/kaitai2WxHexEditor.py

eadmaster commented 4 years ago

i've just found these Okteta Structure Definitions that would be nice to be supported.

EUA commented 4 years ago

I looked Okteta Strutcute Definitions and found that it's Java! Since it's not my favorite programming language, could execute a process to run it. How does it work? I don't know. If the definition just prepare tags for program, than it's easy to support Okteta Structure Definitions. I don't use Okteta, that much. Probably I just look it while I was searching huge file compatible Linux hex editors...

KillyMXI commented 4 years ago

Okteta was mentioned in the OP post, although the original link is no longer available.

I downloaded a couple of archives from the site. I got:

Okteta/Writing structure definitions wiki page seems to be a documentation for both types of definition.

JavaScript is not Java. JavaScript can be used as a pluggable scripting language much like Lua (and an example of embeddable interpreter was linked above).

I think Kaitai Struct more deserves to be a common language between binary exploration tools. But there might be a use for JavaScript for more tricky structures? - I'm not sure, haven't dig into any of these deep enough myself.

In terms of number of publicly available definitions for common structures and amount of community work around them, Kaitai Struct seems to be a healthier choice.

So I'm quite skeptical about reimplementing Okteta. But as a working model when making own design choice - worth to look at. Other hex editors with custom structure definitions:

And the task of supporting multiple different structure definition formats better be left for another time or another project, I think. (It seems reasonable to have a tool for conversion between formats and to have it as a separate project.)

Update. awesome-kaitai list contains more grammars in "Similar" section.

ghost commented 3 years ago

And the task of supporting multiple different structure definition formats better be left for another time or another project, I think. (It seems reasonable to have a tool for conversion between formats and to have it as a separate project.)

What about integrating binspector into wxHexEditor?

KillyMXI commented 3 years ago

Looks like yet another alternative to choose from.

But I can't see why you decided to quote that part of my comment. Binspector seems to bring it's own structure definition format (yet another one) and the quoted part was about a way to support definition formats from different tools.