Ghidra is a software reverse engineering (SRE) framework
Revert "GP-5298: PyGhidra can now find modules that live in directories specified by the Bundle Manager"
ghidra11bccb8ac6072
diff --git a/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/launcher.py b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/launcher.pyindex 43f15b6e1c..e16c5ca4a7 100644--- a/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/launcher.py+++ b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/launcher.py@@ -109,17 +109,6 @@ class _PyGhidraImportLoader:def exec_module(self, fullname):pass-class _GhidraBundleFinder(importlib.machinery.PathFinder):- """ (internal) Used to find modules in Ghidra bundle locations """-- def find_spec(self, fullname, path=None, target=None):- from ghidra.app.script import GhidraScriptUtil- GhidraScriptUtil.acquireBundleHostReference()- for directory in GhidraScriptUtil.getEnabledScriptSourceDirectories():- spec = super().find_spec(fullname, [directory.absolutePath], target)- if spec is not None:- return spec- return None@contextlib.contextmanagerdef _plugin_lock():@@ -401,9 +390,8 @@ class PyGhidraLauncher:**jpype_kwargs)- # Install hooks into python importlib+ # Install hook into python importlibsys.meta_path.append(_PyGhidraImportLoader())- sys.meta_path.append(_GhidraBundleFinder())imports.registerDomain("ghidra")