Closed zxhubo closed 4 years ago
Hi, is there a specific issue you are running into?
The functions in user_funcs.py are there to allow a user to override some defaults if a project calls for it. If they are not implemented, then the defaults are used.
The functions responsible for actually translating protobuf to JSON can be found in https://github.com/nccgroup/blackboxprotobuf/blob/master/blackboxprotobuf/lib/interface.py
@rwinkelmaier-ncc
Yes,I know。
I agree what you said The functions in user_funcs.py are there to allow a user to override some defaults if a project calls for it. If they are not implemented, then the defaults are used.
.
but The functions in user_funcs.py are any define in this file。for example,
def detect_protobuf(content, is_request, content_info, helpers):
"""Customize protobuf detection. Passes in request. Should return True,
False, or None (to use default detection)"""
pass
this function detect_protobuf ,the body is pass , but nothing in this function. so default it can not do anything.
I think phthon is like java , we can define a function in a interface file by java,if we want to invoke this method,we must be implement it。 now ,the present situation is similar what I said,there is a python file must implement the functions in user_funcs.py。understand what I said ? my English is pool,sorry。
The functions should work as currently implemented. They simply return None if they are not overridden and the calling code performs a different check instead. Are you running into a specific error?
@rwinkelmaier-ncc Yes,I know what you said ,but now there is no any file or function implment user_funcs.py.it's means now the can't do anything?
I read the tool of source code,I found the source code where to parse protobuf data to json data and the json data to protobuf data is not Integrally。 For example,the code is :
the function detect_protobuf is in the file of user_funcs.py,but all of the function in user_funcs.py are only defined in this file,but not implement。for example:
the functions are implement ,where ?