How to edit protobuf data


I see the option to nicely display protobuf data, but I’m not sure how to edit it.

Is editing possible right now? Regardless of which external editor I use (vim, emacs, sublime text, nano, etc) the protobuf data looks garbled when I open it.

Any help is appreciated, thanks!

Hi @thebandcollins,

I am sorry, but you are right - there is currently no way to edit pretty-printed content, as we miss the “unprettyprint” implementation.

May I ask how you’re displaying protobuf data? I don’t seem to have that option on mitmproxy

What system are you on? I’m on a mac, and had to install protobuf. Also, last I checked, pip install didn’t do the trick, so I had to use brew. And to make things more fun, homebrew is pointing to a nonexistent archive, so I installed a slightly older version, which you can do with “brew install protobuf250” I believe.

After that, I was able to see the protobuf pretty print in mitmproxy.

For what it’s worth, I also kind of figured out how to spoof protobuf data, but I had to use a Python script. You also need to know at least a classname in order to decode it meaningfully, but then re-encoding is easy with SerializeToString().

More info on that: