diff --git a/libbs/__init__.py b/libbs/__init__.py index 392df32c..ee10d450 100644 --- a/libbs/__init__.py +++ b/libbs/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.22.1" +__version__ = "0.23.0" import logging logging.getLogger("libbs").addHandler(logging.NullHandler()) diff --git a/libbs/plugin_installer.py b/libbs/plugin_installer.py index 678295a7..6eaeee41 100644 --- a/libbs/plugin_installer.py +++ b/libbs/plugin_installer.py @@ -209,8 +209,13 @@ def install_ida(self, path=None, interactive=True): else default_path def install_ghidra(self, path=None, interactive=True): + potential_path = self._home.joinpath('ghidra_scripts').expanduser() + if self._home.exists() and not potential_path.exists(): + self.info(f"Creating Ghidra Scripts directory at {potential_path}...") + potential_path.mkdir() + default_path, skip_ask = self._get_path_without_ask( - path, default_path=self._home.joinpath('ghidra_scripts').expanduser(), interactive=interactive + path, default_path=potential_path, interactive=interactive ) return self.ask_path("Ghidra", "Ghidra Scripts Path", default=default_path) if not skip_ask \ else default_path