質問

I have a sample of a ProtoBuf encoded message, as well as all of the .proto files. I know that the message is one of the messages in the proto files. Is there some way to figure out which message fits the encoded message?

役に立ちましたか?

解決

In general, no. The protobuf format is dense, and the same bytes may be valid as two different kinds of messages.

That said, you can pipe the message to protoc --decode_raw to see the content with numeric tags. From there, you might be able to manually compare it against each type to decide whether it makes sense as that type.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top