by carom · 5y ago · 0 comments
> Reading and writing binary formats is hard... Kaitai Struct tries to make this job easier...
Kaitai cannot write data back out. [1] This is a major limitation for me. It would be nice to use it as a mutation engine for fuzzing, but without being able to write it back out, it is mostly just beneficial for analysis.
And this paper https://dl.acm.org/doi/10.1145/1863523.1863525 "Invertible syntax descriptions: unifying parsing and pretty printing"
And this Haskell library https://hackage.haskell.org/package/roundtrip among others
I really wish though that there were more traction here, as I really believe that we should be quite prepared do deal with bits and not protobufs by default. nothing wrong with protobufs for quite a number of uses. I just don't know why people are so afraid of and/or biased against bit strings.
ASN.1 does more or less what I was hoping Kaitai can do. Where's the breakthrough?
I just want to be able to describe network protocols in some "language" and generate code that can serialize/deserialize it.
https://construct.readthedocs.io/en/latest/intro.html#exampl...
I’ve long searched for something better than Construct, but so far I have yet to find even an equal.
[1] https://github.com/wpietri/simpleais [2] https://gpsd.gitlab.io/gpsd/AIVDM.html
100% fix formats with no self reference or for example checksums that sits in front of the checksumd data (no streaming possible)...
>Kaitai: Describe the structure of data, not how you read or write it
I started working on an alternative that supported writing but didn't follow through since I didn't think many people were interested in Kaitai to begin with.