-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path__init__.py
36 lines (27 loc) · 975 Bytes
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from importlib import reload
from flowslicer import flowslicer, dfil
import binaryninja
def flowslicer_closure(*pargs, **kwargs):
def reload_call_flowslicer(bv, fx):
reload(flowslicer)
reload(dfil)
flowslicer.analyze_function(bv, fx, *pargs, **kwargs)
return reload_call_flowslicer
def flowslicer_hlil_closure(*pargs, **kwargs):
def call_flowslicer_hlil_instruction(bv, hlil_instr):
reload(flowslicer)
reload(dfil)
flowslicer.analyze_hlil_instruction(bv, hlil_instr, *pargs, **kwargs)
return call_flowslicer_hlil_instruction
def setup():
binaryninja.PluginCommand.register_for_function(
'Flowslicer on current function',
'Show function data flows',
flowslicer_closure()
)
binaryninja.PluginCommand.register_for_high_level_il_instruction(
'Flowslicer on HLIL instruction',
'Show flows from instruction',
flowslicer_hlil_closure()
)
setup()