From 674ab1b19646656240c6c740558d00f8430a911a Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Wed, 20 Apr 2022 13:22:50 -0400 Subject: [PATCH] update for 3.0 APIs --- __init__.py | 13 ++----------- plugin.json | 4 ++-- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/__init__.py b/__init__.py index a8081ec..5c9aa48 100644 --- a/__init__.py +++ b/__init__.py @@ -59,11 +59,7 @@ def collect_calls(view, rootfunction): calls[function] = calls.get(function, set()) call_il = caller.get_low_level_il_at(ref.address) - if (call_il.operation in ( - LowLevelILOperation.LLIL_CALL, - LowLevelILOperation.LLIL_TAILCALL, - LowLevelILOperation.LLIL_CALL_STACK_ADJUST - ) and call_il.dest.operation == LowLevelILOperation.LLIL_CONST_PTR): + if isinstance(call_il, Call) and isinstance(call_il.dest, Constant): calls[function].add(caller) callgraph = FlowGraph() @@ -73,12 +69,7 @@ def collect_calls(view, rootfunction): callgraph.append(root_node) function_nodes = {} - call_queue = view.functions - - while call_queue: - # get the next called function - callee = call_queue.pop() - + for callee in view.functions: # create a new node if one doesn't exist already callee_node = get_or_set_call_node(callgraph, function_nodes, callee) diff --git a/plugin.json b/plugin.json index af34e32..bd8c7ff 100644 --- a/plugin.json +++ b/plugin.json @@ -23,6 +23,6 @@ "Windows": "", "Linux": "" }, - "version": "1.0", - "minimumbinaryninjaversion": 1500 + "version": "1.1", + "minimumbinaryninjaversion": 3233 }