lua example for protobuf dissector which has protobuf encoded within protobuf
Hi,
Am looking for working example for below case where data is serialized as bytes to another protobuf.
In below example streamDataArgs msg includes "data" as bytes and that is serialized with encodeData.proto. This is a very simple case and I would like to know if there is simpler way to get the working lua example for this.
I found https://ask.wireshark.org/question/21... but that neither had the protofile nor the full lua script example to check.
serviceA.proto
syntax = "proto3";
package export_data;
service streamDataOut {
rpc streamData(stream streamDataArgs) returns(stream streamDataArgs) {};
}
message streamDataArgs {
int64 Id = 1;
bytes data = 2; // serialized with encodeDataInfo message from encodeData.proto
}
encodeData.proto
syntax = "proto3";
package encoded_data;
message encodeDataInfo {
string name = 1; // set to macData.proto
bytes val = 2; // serialized with macDataInfo from macData.proto
}
macData.proto
syntax = "proto3";
package mac_data;
message macDataInfo {
string mac_addr = 1; // set to mac address
uint64 time = 2; // set to epoch time in ms
}
pcap file
Comments
Can share a capture file and proto file(s)?
Thanks for the response. I have added both protofiles and the pcap capture dropbox link to the question. Please let me know if more details required.
Do you have lua code for the first encoding? (serviceA.proto)
no, I don't have it. Looking for help here with that.
Link back to a similar question: Protobuf dissector with nested structures