how to read many different binary files with the help of non programmers

I have a lot of binary message streams that are captured in files. I want to write a program that can read these files and decode the data to human readable format to stdout. However, there are many protocols, so it is tedious and time consuming to support all of them. A lot of the protocols are similar such that they have the same header, but the message content is slightly different. So if I write the program to support one type of protocol, and I let the user specify the message formats, I can support dozens of binary files with different formats. Then I can extend my program to support a second type of format and again with the specs for users, the list of supported protocols will increase by the dozens. In other words, I want to write a binary file parser that can support dozens and dozens of protocols by making it as generic as possible and letting the users write the specs.

Here is one use case: my program supports a protocol that has a simple header of message type and message size. My program will parse the file and find the header and then to display the data, it looks at the user defined spec to tell it how to do that. For instance for message type "A", it will say the first 10 bytes is a string, the next 8 is a double, and so on. This all works fine for some time. But then the protocol is changed by the source such that there is a new message "B." In that case, the programmer has to do nothing. The user will just update the specification and add message "B" to it.

I've done a google search and come up with thrift, avro, protocol-buffers, json and xml. I believe these are all web technologies and my program is a standalone util on redhat linux. So I'm not sure I am heading in the right direction. Can you please assist? I'd like to stick to either C/C++ or python if possible.