summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/scriptingprovider.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/python/scriptingprovider.py b/python/scriptingprovider.py
index 8645c96c..761b359c 100644
--- a/python/scriptingprovider.py
+++ b/python/scriptingprovider.py
@@ -457,7 +457,7 @@ class PythonScriptingInstance(ScriptingInstance):
super(PythonScriptingInstance.InterpreterThread, self).__init__()
self.instance = instance
self.locals = {"__name__": "__console__", "__doc__": None, "binaryninja": sys.modules[__name__]}
- self.interpreter = code.InteractiveInterpreter(self.locals)
+ self.interpreter = code.InteractiveConsole(self.locals)
self.event = threading.Event()
self.daemon = True
@@ -484,7 +484,7 @@ class PythonScriptingInstance(ScriptingInstance):
self.code = None
self.input = ""
- self.interpreter.runsource("from binaryninja import *\n")
+ self.interpreter.push("from binaryninja import *\n")
def execute(self, code):
self.code = code
@@ -547,7 +547,8 @@ class PythonScriptingInstance(ScriptingInstance):
self.locals["current_llil"] = self.active_func.low_level_il
self.locals["current_mlil"] = self.active_func.medium_level_il
- self.interpreter.runcode(code)
+ for line in code.split("\n"):
+ self.interpreter.push(line)
if self.locals["here"] != self.active_addr:
if not self.active_view.file.navigate(self.active_view.file.view, self.locals["here"]):