Skip to content

Xavier-Lam/protocol-buffer-decryptor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

反向解析Protocol Buffer

本项目旨在解决使用者未持有.proto文件,希望反向解析Protocol Buffer的情况,在github上会更新

https://github.com/Xavier-Lam/protocol-buffer-decryptor

参考文献

https://developers.google.com/protocol-buffers/docs/encoding

http://blog.csdn.net/lwanttowin/article/details/77229000

使用示例

>>> import protobuf
>>> raw = b'\x08\xae\x98\xa8\x06\x10\xe5\xa3^\x18\x08 \xd9\xad\x82\xd3\x8f,(\x032\xa6\x01\x08\xae\x98\xa8\x06\x10\x08\x18\xd8\xad\x82\xd3\x8f, \n*<\xe7\x94\xb5\xe5\xbd\xb1\xe3\x80\x8a\xe5\xaf\xbb\xe6\xa2\xa6\xe7\x8e\xaf\xe6\xb8\xb8\xe8\xae\xb0\xe3\x80\x8b\xe6\x98\xaf\xe5\x93\xaa\xe4\xb8\xaa\xe5\x8a\xa8\xe7\x94\xbb\xe5\x85\xac\xe5\x8f\xb8\xe5\x88\xb6\xe4\xbd\x9c\xe7\x9a\x84\xef\xbc\x9fB\x17\x08\xe7\x02\x12\x12\xe6\xa2\xa6\xe5\xb7\xa5\xe5\x8e\x82\xe5\xb7\xa5\xe4\xbd\x9c\xe5\xae\xa4B\x1d\x08\xc7\x01\x12\x18\xe7\x9a\xae\xe5\x85\x8b\xe6\x96\xaf\xe5\x8a\xa8\xe7\x94\xbb\xe5\xb7\xa5\xe4\xbd\x9c\xe5\xae\xa4B\x1a\x08\xcc\x02\x12\x15\xe7\xa6\x8f\xe5\x85\x8b\xe6\x96\xaf\xe7\x94\xb5\xe5\xbd\xb1\xe5\x85\xac\xe5\x8f\xb8P\xa3\xf2\x07B\x03\x08\xb8\x17'
>>> output = protobuf.decrypt(b, "utf-8")

{1: 13241390, 2: 1544677, 3: 8, 4: 1516029122265, 5: 3, 6: {1: 13241390, 2: 8, 3: 1516029122264, 4: 10, 5: '电影《寻梦环游记》是哪个动画公司制作的?', 8: [{1: 359, 2: '梦工厂工作室'}, {1: 199, 2: '皮克斯动画工作室'}, {1: 332, 2: '福克斯电影公司'}], 10: 129315}, 8: {1: 3000}}

About

反向解析Protocol Buffer

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages