diff --git a/dailalib/__init__.py b/dailalib/__init__.py index 5c3feb0..dabbecc 100644 --- a/dailalib/__init__.py +++ b/dailalib/__init__.py @@ -1,4 +1,4 @@ -__version__ = "3.4.6" +__version__ = "3.5.0" from .api import AIAPI, LiteLLMAIAPI from libbs.api import DecompilerInterface diff --git a/dailalib/daila_plugin.py b/dailalib/daila_plugin.py index 4755c6d..e3cbab6 100644 --- a/dailalib/daila_plugin.py +++ b/dailalib/daila_plugin.py @@ -22,13 +22,20 @@ def create_plugin(*args, **kwargs): import subprocess from libbs_vendored.ghidra_bridge_server import GhidraBridgeServer from distutils.spawn import find_executable - cmd = shell_library_command.split(" ") if shell_library_command else python_library_command.split(" ") + cmd = shell_library_command.split(" ") if not find_executable(cmd[0]): - # fallback to doing a python command - cmd = python_library_command.split(" ") - + # fallback to doing python style module call + python_end = ["-m"] + python_library_command.split(" ") + python_exec = "python" if find_executable("python") else "python3" + cmd = [python_exec] + python_end + GhidraBridgeServer.run_server(background=True) - process = subprocess.Popen(cmd) + print("[+] Starting the backend now...") + try: + process = subprocess.Popen(cmd) + except Exception as e: + print("[!] Failed to run the backend command", cmd, "because", e) + if process.poll() is not None: raise RuntimeError( "Failed to run the Python3 backed. It's likely Python3 is not in your Path inside Ghidra.") diff --git a/setup.cfg b/setup.cfg index cc34030..e4a7172 100644 --- a/setup.cfg +++ b/setup.cfg @@ -17,7 +17,7 @@ install_requires = litellm tiktoken Jinja2 - libbs>=1.20.1 + libbs>=1.21.0 python_requires = >= 3.10 include_package_data = True @@ -29,4 +29,4 @@ console_scripts = [options.extras_require] full = - varbert>=2.1.1 + varbert>=2.3.0