nccgroup / blackboxprotobuf

Blackbox Protobuf is a set of tools for working with encoded Protocol Buffers (protobuf) without the matching protobuf definition.
MIT License
480 stars 82 forks source link

when I set a filed name, an excetpion is raised here #8

Closed iPenx closed 3 years ago

iPenx commented 3 years ago

Console: $ ./pyenv/Scripts/python parse.py Traceback (most recent call last): File "parse.py", line 44, in obj = blackboxprotobuf.decode_message(data, mtype) File "D:\ipenx\gitlab.h3yun.net\h3yun-deploy\h3sre-outlier-adapter\pyenv\lib\site-packages\blackboxprotobuf\lib\interface.py", line 62, in decodemessage value, typedef, = blackboxprotobuf.lib.types.length_delim.decode_message(buf, message_type) File "D:\ipenx\gitlab.h3yun.net\h3yun-deploy\h3sre-outlier-adapter\pyenv\lib\site-packages\blackboxprotobuf\lib\types\length_delim.py", line 271, in decode_message if isinstance(output[field_number], list): KeyError: '1'

$

rwinkelmaier-ncc commented 3 years ago

Hi,

This looks like the bug that was just fixed by https://github.com/nccgroup/blackboxprotobuf/commit/c01190fd3cbc620327eb5e26259b9f8302dac2d7.

It looks like you're using the pypi package, which unfortunately is published from an older fork of the project. I'm hoping to put together a python package soon, but for now the latest version of the library has to be used from source.

iPenx commented 3 years ago

Okay, thanks!