Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've used protodump before, but have found that some applications don't embed the .proto data.

It may be bit-rotted by now, but a couple of years ago I hacked together a python script that would extract a proto definition from Objective C apps by scanning the assembly output and looking for the patterns of code generated by the protoc compiler. I put it on github in case it is useful to somebody.

https://gist.github.com/dunhamsteve/224e26a7f56689c33cea4f0f...

Compiled ObjectiveC is a bit simpler than compiled C/C++, you can read the method invocations out of it. I haven't looked into how hard the output of Swift is to read.

I've also analyzed protobuf data (Apple Notes) by writing code that decodes the data in a generic fashion and output a guess at the schema. I would run on about 100 samples, to help distinguish binary data from sub-objects, to detect optional fields, and to detect 'repeated' fields. Then you have to go through and figure out what all of the fields are.

I succeeded, but later learned that the notes web app embedded the plain text .proto file, which would have made things a lot easier.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: