Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def on_message(self, message, data):
"""
Frida on_message callback, for formatting output data.
:param message - JSON formatted output
:param data - binary data for some JNI method calls
"""
if TraceFormatter._is_error(message):
return
payload = message["payload"]
if TraceFormatter._is_meta_message(payload):
return
if self._buffer_output:
self._update_output_buffer(message["payload"], data)
self._current_ts = payload["timestamp"]
self._color_manager.update_current_color(payload["thread_id"])
self._print_method_call(payload, data)
if self._config["show_backtrace"]:
self._print_backtrace(payload["backtrace"])
print()