Possible feature: Parse binary data using Kaitai Struct
Joshfindit opened this issue · comments
Parsing binary files has historically been a challenge for users who want access to the data contained within them, but I’ve recently come across (and successfully used) Kaitai Struct to do exactly that.
While of course HPI users can write their own binary parser, output JSON or some other human-friendly format, and then write an importer for that output, Kaitai has a library of parsable files already as well as a repo that accepts pull requests to add to that library.
Adding this as a suggestion, though it’s more of a way to open the discussion to HPI devs and community
Thanks, I've heard of Kaitai as well, but haven't had a chance to try it yet! Will keep it in mind.
Luckily 😅 I haven't had many binary formats that I had to handle yet, maybe the only exception is Kobo parser which has some interesting code... https://github.com/karlicoss/kobuddy/blob/6aeaf69a3fee1574a88b19ca28e3608b605a8827/src/kobuddy/__init__.py#L670-L683
Luckily 😅 I haven't had many binary formats that I had to handle yet, maybe the only exception is Kobo parser which has some interesting code...
Looks like me trying to reverse engineer binaries in the before times. if blob[pos:].startswith(wtf):
is very relatable 😂