From 88043ec27091e58ed88f3a3d09ef726425c7dd8e Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Mon, 22 Apr 2019 16:40:59 -0400 Subject: Updates to support get_ssa function returning Instructions instead of indices. --- python/examples/triage/imports.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'python/examples') diff --git a/python/examples/triage/imports.py b/python/examples/triage/imports.py index 008d22e3..3e09b93d 100644 --- a/python/examples/triage/imports.py +++ b/python/examples/triage/imports.py @@ -47,7 +47,7 @@ def get_platform_info(bv): return result def propagate_var_name(func, mlil_ssa_func, ssa_var, name, ty): - instructions = mlil_ssa_func.get_ssa_var_uses(ssa_var) + instructions = list(map(lambda instr: instr.instr_index, mlil_ssa_func.get_ssa_var_uses(ssa_var))) seen_instructions = set() handled_vars = set([ssa_var]) @@ -67,7 +67,7 @@ def propagate_var_name(func, mlil_ssa_func, ssa_var, name, ty): handled_vars.add(instruction.dest) - for use in mlil_ssa_func.get_ssa_var_uses(instruction.dest): + for use in list(map(lambda instr: instr.instr_index, mlil_ssa_func.get_ssa_var_uses(instruction.dest))): if use not in seen_instructions: instructions.append(use) @@ -87,7 +87,7 @@ def propagate_var_name(func, mlil_ssa_func, ssa_var, name, ty): continue handled_vars.add(instruction.dest) - for use in mlil_ssa_func.get_ssa_var_uses(instruction.dest): + for use in list(map(lambda instr: instr.instr_index, mlil_ssa_func.get_ssa_var_uses(instruction.dest))): if use not in seen_instructions: instructions.append(use) -- cgit v1.3.1