Skip to content

Commit

Permalink
update for 3.0 APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
psifertex committed Apr 20, 2022
1 parent b0b3ed2 commit 674ab1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
13 changes: 2 additions & 11 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
"Windows": "",
"Linux": ""
},
"version": "1.0",
"minimumbinaryninjaversion": 1500
"version": "1.1",
"minimumbinaryninjaversion": 3233
}

0 comments on commit 674ab1b

Please sign in to comment.