I would like to decode protobuf.
Example of the protobuf data: 0a06282c0241057a10011805220d080510bea3f493062a03010c1628f1a6f493063002382b4001481482010f383634333233303532343736343839
I can Decoding online (e.g. via https://protobuf-decoder.netlify.app/) works fine.
The website decode Protobuf without having the original .proto files. And all decoding is done locally via JavaScript (Contribute on GitHub).
How can I do this in python?
I try this solution but not exist .proto file.
Take the raw decoding from that site and you write a
.proto
file yourself.For example, taking the first rows of the output:
you would write:
Once you figure out what the fields actually mean, you can assign more sensible names instead of
fieldX
. If you aren't interested in some of the fields, you can leave them out of the .proto file and the protobuf decoder will ignore them.