2 ms·
Why is the lack of a schema indicator the biggest flaw of protobuf?
by orf 2y ago
Why is the lack of a schema indicator the biggest flaw of protobuf?
- ptspts 2y agoIf you parse a serialized protobuf byte array without having a .proto file, you have no way to dustinguish a byte string field from a nested message field. Thus you have no way to know how deep your parser should go.
- css 2y agoSemi-related, one of the `imessage-exporter` contributors provided a great write-up on reverse engineering the handwritten and digital touch message protobufs [0]. The reconstructed proto files are [1] [2]. [0]: https://github.com/trymoose/handwriting2svg/blob/0eb56cf458207bb1c2ceea48cf4b6b6510fa7b13/DISCOVERY.md https://github.com/trymoose/handwriting2svg/blob/0eb56cf4582... [1]: https://github.com/ReagentX/imessage-exporter/blob/beeb853b211b52d71bf5f8e6e241810b89bd93cc/imessage-database/src/message_types/handwriting/handwriting.proto https://github.com/ReagentX/imessage-exporter/blob/beeb853b2... [2]: https://github.com/ReagentX/imessage-exporter/blob/beeb853b211b52d71bf5f8e6e241810b89bd93cc/imessage-database/src/message_types/digital_touch/digital_touch.proto https://github.com/ReagentX/imessage-exporter/blob/beeb853b2...
- foobiekr 2y agoIt makes it impossible to write a general purpose dissector that takes captured messages or bytes and figure out how to parse it. All they needed was a varint at the head of any marshaled from to at least provide some scoping clue.