From 7ffdda6232058d41367a07233f2786cfae918e26 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Thu, 7 Apr 2022 09:51:51 +0200 Subject: [PATCH] Import regs_hw_sum_trace outside of sca_code_trace --- rainbow/rainbow.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rainbow/rainbow.py b/rainbow/rainbow.py index dd8087a..b2e6702 100644 --- a/rainbow/rainbow.py +++ b/rainbow/rainbow.py @@ -28,8 +28,9 @@ from pygments.formatters import TerminalFormatter as formatter from pygments.lexers import NasmLexer -from rainbow.color_functions import color -from rainbow.loaders import load_selector +from .color_functions import color +from .loaders import load_selector +from .tracers import regs_hw_sum_trace class HookWeakMethod: @@ -362,10 +363,9 @@ def print_asmline(self, adr, ins, op_str): ) print("\n" + color("YELLOW", f"{adr:8X} ") + line, end=";") - def sca_code_trace(self, uci, address, size, data): - from .tracers import regs_hw_sum_trace + def sca_code_trace(self, _uci, address, size, data): regs_hw_sum_trace(self, address, size, data) - + def sca_code_traceHD(self, uci, address, size, data): """ Hook that traces modified register values in side-channel mode.