Ghidra is a software reverse engineering (SRE) framework
Renaming Pyhidra to PyGhidra
Ryan Kurtz5b81139197a2
diff --git a/Ghidra/Features/Base/ghidra_scripts/VSCodeProjectScript.java b/Ghidra/Features/Base/ghidra_scripts/VSCodeProjectScript.javaindex f1ce702bf6..7d776acb74 100644--- a/Ghidra/Features/Base/ghidra_scripts/VSCodeProjectScript.java+++ b/Ghidra/Features/Base/ghidra_scripts/VSCodeProjectScript.java@@ -65,7 +65,7 @@ public class VSCodeProjectScript extends GhidraScript {writeSettings(installDir, projectDir, classpathSourceMap);writeLaunch(installDir, projectDir, classpathSourceMap);writeSampleScriptJava(projectDir);- writeSampleScriptPyhidra(projectDir);+ writeSampleScriptPyGhidra(projectDir);writeSampleModule(installDir, projectDir);println("Successfully created VSCode project directory at: " + projectDir);@@ -228,13 +228,13 @@ public class VSCodeProjectScript extends GhidraScript {FileUtils.writeStringToFile(scriptFile, sampleScript, StandardCharsets.UTF_8);}- private void writeSampleScriptPyhidra(File projectDir) throws IOException {+ private void writeSampleScriptPyGhidra(File projectDir) throws IOException {File scriptsDir = new File(projectDir, "ghidra_scripts");File scriptFile = new File(scriptsDir, "sample_script.py");String sampleScript = """- # Sample Pyhidra GhidraScript+ # Sample PyGhidra GhidraScript# @category Examples- # @runtime Pyhidra+ # @runtime PyGhidrafrom java.util import LinkedListjava_list = LinkedList([1,2,3])diff --git a/Ghidra/Features/Pyhidra/.gitignore b/Ghidra/Features/PyGhidra/.gitignoresimilarity index 100%rename from Ghidra/Features/Pyhidra/.gitignorerename to Ghidra/Features/PyGhidra/.gitignorediff --git a/Ghidra/Features/Pyhidra/.launch/Ghidra Attach.launch b/Ghidra/Features/PyGhidra/.launch/Ghidra Attach.launchsimilarity index 92%rename from Ghidra/Features/Pyhidra/.launch/Ghidra Attach.launchrename to Ghidra/Features/PyGhidra/.launch/Ghidra Attach.launchindex ca245cdfe9..211c9ff25d 100644--- a/Ghidra/Features/Pyhidra/.launch/Ghidra Attach.launch+++ b/Ghidra/Features/PyGhidra/.launch/Ghidra Attach.launch@@ -2,7 +2,7 @@<launchConfiguration type="org.eclipse.jdt.launching.remoteJavaApplication"><booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/><listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">- <listEntry value="/Features Pyhidra"/>+ <listEntry value="/Features PyGhidra"/></listAttribute><listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"><listEntry value="4"/>@@ -12,6 +12,6 @@<mapEntry key="hostname" value="localhost"/><mapEntry key="port" value="18001"/></mapAttribute>- <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="Features Pyhidra"/>+ <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="Features PyGhidra"/><stringAttribute key="org.eclipse.jdt.launching.VM_CONNECTOR_ID" value="org.eclipse.jdt.launching.socketAttachConnector"/></launchConfiguration>diff --git a/Ghidra/Features/Pyhidra/.launch/Pyhidra GUI Debug.launch b/Ghidra/Features/PyGhidra/.launch/PyGhidra GUI Debug.launchsimilarity index 97%rename from Ghidra/Features/Pyhidra/.launch/Pyhidra GUI Debug.launchrename to Ghidra/Features/PyGhidra/.launch/PyGhidra GUI Debug.launchindex 8ded57cdb0..4598ca359d 100644--- a/Ghidra/Features/Pyhidra/.launch/Pyhidra GUI Debug.launch+++ b/Ghidra/Features/PyGhidra/.launch/PyGhidra GUI Debug.launch@@ -5,7 +5,7 @@<booleanAttribute key="org.eclipse.debug.core.launchGroup.0.adoptIfRunning" value="false"/><booleanAttribute key="org.eclipse.debug.core.launchGroup.0.enabled" value="true"/><stringAttribute key="org.eclipse.debug.core.launchGroup.0.mode" value="debug"/>- <stringAttribute key="org.eclipse.debug.core.launchGroup.0.name" value="_Pyhidra GUI Debug"/>+ <stringAttribute key="org.eclipse.debug.core.launchGroup.0.name" value="_PyGhidra GUI Debug"/><stringAttribute key="org.eclipse.debug.core.launchGroup.1.action" value="NONE"/><booleanAttribute key="org.eclipse.debug.core.launchGroup.1.adoptIfRunning" value="true"/><booleanAttribute key="org.eclipse.debug.core.launchGroup.1.enabled" value="true"/>diff --git a/Ghidra/Features/Pyhidra/.launch/Pyhidra GUI.launch b/Ghidra/Features/PyGhidra/.launch/PyGhidra GUI.launchsimilarity index 80%rename from Ghidra/Features/Pyhidra/.launch/Pyhidra GUI.launchrename to Ghidra/Features/PyGhidra/.launch/PyGhidra GUI.launchindex 560206411b..bc0c1ef12c 100644--- a/Ghidra/Features/Pyhidra/.launch/Pyhidra GUI.launch+++ b/Ghidra/Features/PyGhidra/.launch/PyGhidra GUI.launch@@ -2,7 +2,7 @@<launchConfiguration type="org.python.pydev.debug.regularLaunchConfigurationType"><booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/><listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">- <listEntry value="/Features Pyhidra/src/main/py/src/pyhidra"/>+ <listEntry value="/Features PyGhidra/src/main/py/src/pyghidra"/></listAttribute><listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"><listEntry value="2"/>@@ -14,11 +14,11 @@<listAttribute key="org.eclipse.debug.ui.favoriteGroups"><listEntry value="org.eclipse.debug.ui.launchGroup.run"/></listAttribute>- <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:Features Pyhidra/src/main/py/src/pyhidra}"/>- <stringAttribute key="org.eclipse.ui.externaltools.ATTR_OTHER_WORKING_DIRECTORY" value="${workspace_loc:Features Pyhidra/src/main/py/src/pyhidra}"/>+ <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:Features PyGhidra/src/main/py/src/pyghidra}"/>+ <stringAttribute key="org.eclipse.ui.externaltools.ATTR_OTHER_WORKING_DIRECTORY" value="${workspace_loc:Features PyGhidra/src/main/py/src/pyghidra}"/><stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-v -g"/>- <stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:Features Pyhidra/src/main/py/src/pyhidra}"/>+ <stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:Features PyGhidra/src/main/py/src/pyghidra}"/><stringAttribute key="org.python.pydev.debug.ATTR_INTERPRETER" value="__default"/>- <stringAttribute key="org.python.pydev.debug.ATTR_PROJECT" value="Features Pyhidra"/>+ <stringAttribute key="org.python.pydev.debug.ATTR_PROJECT" value="Features PyGhidra"/><stringAttribute key="process_factory_id" value="org.python.pydev.debug.processfactory.PyProcessFactory"/></launchConfiguration>diff --git a/Ghidra/Features/Pyhidra/.launch/Pyhidra Interpreter Debug.launch b/Ghidra/Features/PyGhidra/.launch/PyGhidra Interpreter Debug.launchsimilarity index 96%rename from Ghidra/Features/Pyhidra/.launch/Pyhidra Interpreter Debug.launchrename to Ghidra/Features/PyGhidra/.launch/PyGhidra Interpreter Debug.launchindex 776a77b978..c8107d6b53 100644--- a/Ghidra/Features/Pyhidra/.launch/Pyhidra Interpreter Debug.launch+++ b/Ghidra/Features/PyGhidra/.launch/PyGhidra Interpreter Debug.launch@@ -5,7 +5,7 @@<booleanAttribute key="org.eclipse.debug.core.launchGroup.0.adoptIfRunning" value="false"/><booleanAttribute key="org.eclipse.debug.core.launchGroup.0.enabled" value="true"/><stringAttribute key="org.eclipse.debug.core.launchGroup.0.mode" value="debug"/>- <stringAttribute key="org.eclipse.debug.core.launchGroup.0.name" value="_Pyhidra Interpreter Debug"/>+ <stringAttribute key="org.eclipse.debug.core.launchGroup.0.name" value="_PyGhidra Interpreter Debug"/><stringAttribute key="org.eclipse.debug.core.launchGroup.1.action" value="NONE"/><booleanAttribute key="org.eclipse.debug.core.launchGroup.1.adoptIfRunning" value="true"/><booleanAttribute key="org.eclipse.debug.core.launchGroup.1.enabled" value="true"/>diff --git a/Ghidra/Features/Pyhidra/.launch/Pyhidra Interpreter.launch b/Ghidra/Features/PyGhidra/.launch/PyGhidra Interpreter.launchsimilarity index 80%rename from Ghidra/Features/Pyhidra/.launch/Pyhidra Interpreter.launchrename to Ghidra/Features/PyGhidra/.launch/PyGhidra Interpreter.launchindex ba7189fa7f..97462b74b2 100644--- a/Ghidra/Features/Pyhidra/.launch/Pyhidra Interpreter.launch+++ b/Ghidra/Features/PyGhidra/.launch/PyGhidra Interpreter.launch@@ -2,7 +2,7 @@<launchConfiguration type="org.python.pydev.debug.regularLaunchConfigurationType"><booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/><listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">- <listEntry value="/Features Pyhidra/src/main/py/src/pyhidra"/>+ <listEntry value="/Features PyGhidra/src/main/py/src/pyghidra"/></listAttribute><listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"><listEntry value="2"/>@@ -14,11 +14,11 @@<listAttribute key="org.eclipse.debug.ui.favoriteGroups"><listEntry value="org.eclipse.debug.ui.launchGroup.run"/></listAttribute>- <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:Features Pyhidra/src/main/py/src/pyhidra}"/>- <stringAttribute key="org.eclipse.ui.externaltools.ATTR_OTHER_WORKING_DIRECTORY" value="${workspace_loc:Features Pyhidra/src/main/py/src/pyhidra}"/>+ <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:Features PyGhidra/src/main/py/src/pyghidra}"/>+ <stringAttribute key="org.eclipse.ui.externaltools.ATTR_OTHER_WORKING_DIRECTORY" value="${workspace_loc:Features PyGhidra/src/main/py/src/pyghidra}"/><stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-v"/>- <stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:Features Pyhidra/src/main/py/src/pyhidra}"/>+ <stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:Features PyGhidra/src/main/py/src/pyghidra}"/><stringAttribute key="org.python.pydev.debug.ATTR_INTERPRETER" value="__default"/>- <stringAttribute key="org.python.pydev.debug.ATTR_PROJECT" value="Features Pyhidra"/>+ <stringAttribute key="org.python.pydev.debug.ATTR_PROJECT" value="Features PyGhidra"/><stringAttribute key="process_factory_id" value="org.python.pydev.debug.processfactory.PyProcessFactory"/></launchConfiguration>diff --git a/Ghidra/Features/Pyhidra/.launch/_Pyhidra GUI Debug.launch b/Ghidra/Features/PyGhidra/.launch/_PyGhidra GUI Debug.launchsimilarity index 75%rename from Ghidra/Features/Pyhidra/.launch/_Pyhidra GUI Debug.launchrename to Ghidra/Features/PyGhidra/.launch/_PyGhidra GUI Debug.launchindex ce6849d1d1..c9a8500275 100644--- a/Ghidra/Features/Pyhidra/.launch/_Pyhidra GUI Debug.launch+++ b/Ghidra/Features/PyGhidra/.launch/_PyGhidra GUI Debug.launch@@ -2,7 +2,7 @@<launchConfiguration type="org.python.pydev.debug.regularLaunchConfigurationType"><booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/><listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">- <listEntry value="/Features Pyhidra/src/main/py/src/pyhidra"/>+ <listEntry value="/Features PyGhidra/src/main/py/src/pyghidra"/></listAttribute><listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"><listEntry value="2"/>@@ -10,13 +10,13 @@<mapAttribute key="org.eclipse.debug.core.environmentVariables"><mapEntry key="GHIDRA_INSTALL_DIR" value="${project_loc:/___root}"/><mapEntry key="JAVA_HOME_OVERRIDE" value="${ee_home:JavaSE-21}"/>- <mapEntry key="PYHIDRA_DEBUG" value="1"/>+ <mapEntry key="PYGHIDRA_DEBUG" value="1"/></mapAttribute>- <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:Features Pyhidra/src/main/py/src/pyhidra}"/>- <stringAttribute key="org.eclipse.ui.externaltools.ATTR_OTHER_WORKING_DIRECTORY" value="${workspace_loc:Features Pyhidra/src/main/py/src/pyhidra}"/>+ <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:Features PyGhidra/src/main/py/src/pyghidra}"/>+ <stringAttribute key="org.eclipse.ui.externaltools.ATTR_OTHER_WORKING_DIRECTORY" value="${workspace_loc:Features PyGhidra/src/main/py/src/pyghidra}"/><stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-v -g"/>- <stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:Features Pyhidra/src/main/py/src/pyhidra}"/>+ <stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:Features PyGhidra/src/main/py/src/pyghidra}"/><stringAttribute key="org.python.pydev.debug.ATTR_INTERPRETER" value="__default"/>- <stringAttribute key="org.python.pydev.debug.ATTR_PROJECT" value="Features Pyhidra"/>+ <stringAttribute key="org.python.pydev.debug.ATTR_PROJECT" value="Features PyGhidra"/><stringAttribute key="process_factory_id" value="org.python.pydev.debug.processfactory.PyProcessFactory"/></launchConfiguration>diff --git a/Ghidra/Features/Pyhidra/.launch/_Pyhidra Interpreter Debug.launch b/Ghidra/Features/PyGhidra/.launch/_PyGhidra Interpreter Debug.launchsimilarity index 75%rename from Ghidra/Features/Pyhidra/.launch/_Pyhidra Interpreter Debug.launchrename to Ghidra/Features/PyGhidra/.launch/_PyGhidra Interpreter Debug.launchindex 0afdfb09b6..eacee98399 100644--- a/Ghidra/Features/Pyhidra/.launch/_Pyhidra Interpreter Debug.launch+++ b/Ghidra/Features/PyGhidra/.launch/_PyGhidra Interpreter Debug.launch@@ -2,7 +2,7 @@<launchConfiguration type="org.python.pydev.debug.regularLaunchConfigurationType"><booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/><listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">- <listEntry value="/Features Pyhidra/src/main/py/src/pyhidra"/>+ <listEntry value="/Features PyGhidra/src/main/py/src/pyghidra"/></listAttribute><listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"><listEntry value="2"/>@@ -10,13 +10,13 @@<mapAttribute key="org.eclipse.debug.core.environmentVariables"><mapEntry key="GHIDRA_INSTALL_DIR" value="${project_loc:/___root}"/><mapEntry key="JAVA_HOME_OVERRIDE" value="${ee_home:JavaSE-21}"/>- <mapEntry key="PYHIDRA_DEBUG" value="1"/>+ <mapEntry key="PYGHIDRA_DEBUG" value="1"/></mapAttribute>- <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:Features Pyhidra/src/main/py/src/pyhidra}"/>- <stringAttribute key="org.eclipse.ui.externaltools.ATTR_OTHER_WORKING_DIRECTORY" value="${workspace_loc:Features Pyhidra/src/main/py/src/pyhidra}"/>+ <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:Features PyGhidra/src/main/py/src/pyghidra}"/>+ <stringAttribute key="org.eclipse.ui.externaltools.ATTR_OTHER_WORKING_DIRECTORY" value="${workspace_loc:Features PyGhidra/src/main/py/src/pyghidra}"/><stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-v"/>- <stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:Features Pyhidra/src/main/py/src/pyhidra}"/>+ <stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:Features PyGhidra/src/main/py/src/pyghidra}"/><stringAttribute key="org.python.pydev.debug.ATTR_INTERPRETER" value="__default"/>- <stringAttribute key="org.python.pydev.debug.ATTR_PROJECT" value="Features Pyhidra"/>+ <stringAttribute key="org.python.pydev.debug.ATTR_PROJECT" value="Features PyGhidra"/><stringAttribute key="process_factory_id" value="org.python.pydev.debug.processfactory.PyProcessFactory"/></launchConfiguration>diff --git a/Ghidra/Features/Pyhidra/Module.manifest b/Ghidra/Features/PyGhidra/Module.manifestsimilarity index 100%rename from Ghidra/Features/Pyhidra/Module.manifestrename to Ghidra/Features/PyGhidra/Module.manifestdiff --git a/Ghidra/Features/Pyhidra/build.gradle b/Ghidra/Features/PyGhidra/build.gradlesimilarity index 87%rename from Ghidra/Features/Pyhidra/build.gradlerename to Ghidra/Features/PyGhidra/build.gradleindex 79a102c146..2c0ff36d34 100644--- a/Ghidra/Features/Pyhidra/build.gradle+++ b/Ghidra/Features/PyGhidra/build.gradle@@ -22,7 +22,7 @@ apply from: "$rootProject.projectDir/gradle/javadoc.gradle"apply from: "${rootProject.projectDir}/gradle/hasPythonPackage.gradle"apply plugin: 'eclipse'-eclipse.project.name = 'Features Pyhidra'+eclipse.project.name = 'Features PyGhidra'dependencies {@@ -53,28 +53,28 @@ distributePyDep("setuptools-68.0.0-py3-none-any.whl")task installJPype(type: Exec) {dependsOn(":createPythonVirtualEnvironment")- File depsDir = file("${DEPS_DIR}/Pyhidra")- File binRepoDir = file("${BIN_REPO}/Ghidra/Features/Pyhidra")+ File depsDir = file("${DEPS_DIR}/PyGhidra")+ File binRepoDir = file("${BIN_REPO}/Ghidra/Features/PyGhidra")def dir = depsDir.exists() ? depsDir : binRepoDircommandLine "$PYTHON3_VENV", "-m", "pip", "install", "--no-index", "-f", "$dir", "JPype1"}-// Install Pyhidra in editable mode to the development virtual environment-task installEditablePyhidra(type: Exec) {+// Install PyGhidra in editable mode to the development virtual environment+task installEditablePyGhidra(type: Exec) {dependsOn("installJPype")commandLine "$PYTHON3_VENV", "-m", "pip", "install", "-e", "src/main/py"}-rootProject.prepDev.dependsOn installEditablePyhidra+rootProject.prepDev.dependsOn installEditablePyGhidra-// Add pyhidraLauncher.py to the release+// Add pyghidra_launcher.py to the releaserootProject.assembleDistribution {dependsOn(buildPyPackage)def p = this.projectdef zipPath = getZipPath(p)from (this.project.projectDir.toString()) {- include "pyhidraLauncher.py"+ include "pyghidra_launcher.py"into { zipPath }}}diff --git a/Ghidra/Features/Pyhidra/certification.manifest b/Ghidra/Features/PyGhidra/certification.manifestsimilarity index 76%rename from Ghidra/Features/Pyhidra/certification.manifestrename to Ghidra/Features/PyGhidra/certification.manifestindex 423fbf567d..335a2329dd 100644--- a/Ghidra/Features/Pyhidra/certification.manifest+++ b/Ghidra/Features/PyGhidra/certification.manifest@@ -3,5 +3,5 @@Module.manifest||GHIDRA||||END|data/python.theme.properties||GHIDRA||||END|src/main/help/help/TOC_Source.xml||GHIDRA||||END|-src/main/help/help/topics/Pyhidra/interpreter.html||GHIDRA||||END|+src/main/help/help/topics/PyGhidra/interpreter.html||GHIDRA||||END|src/main/resources/images/python.png||GHIDRA||||END|diff --git a/Ghidra/Features/Pyhidra/data/python.theme.properties b/Ghidra/Features/PyGhidra/data/python.theme.propertiessimilarity index 100%rename from Ghidra/Features/Pyhidra/data/python.theme.propertiesrename to Ghidra/Features/PyGhidra/data/python.theme.propertiesdiff --git a/Ghidra/Features/Pyhidra/ghidra_scripts/PyhidraBasics.py b/Ghidra/Features/PyGhidra/ghidra_scripts/PyGhidraBasics.pysimilarity index 97%rename from Ghidra/Features/Pyhidra/ghidra_scripts/PyhidraBasics.pyrename to Ghidra/Features/PyGhidra/ghidra_scripts/PyGhidraBasics.pyindex f018bd6ae6..60df37d28f 100644--- a/Ghidra/Features/Pyhidra/ghidra_scripts/PyhidraBasics.py+++ b/Ghidra/Features/PyGhidra/ghidra_scripts/PyGhidraBasics.py@@ -1,6 +1,6 @@-# Examples of Pyhidra-specific functionality+# Examples of PyGhidra-specific functionality# @category: Examples.Python-# @runtime Pyhidra+# @runtime PyGhidra# we can import java libraries just as if they were python librariesdiff --git a/Ghidra/Features/Pyhidra/pyhidraLauncher.py b/Ghidra/Features/PyGhidra/pyghidra_launcher.pysimilarity index 65%rename from Ghidra/Features/Pyhidra/pyhidraLauncher.pyrename to Ghidra/Features/PyGhidra/pyghidra_launcher.pyindex ec0e9dd1b6..4bf53d8521 100644--- a/Ghidra/Features/Pyhidra/pyhidraLauncher.py+++ b/Ghidra/Features/PyGhidra/pyghidra_launcher.py@@ -6,16 +6,16 @@ from pathlib import Pathfrom typing import Listfrom sys import stderr-def upgrade(pip_args: List[str], dist_dir: Path, current_pyhidra_version: str) -> bool:- from packaging.version import Version # if pyhidra imported, we know we have packaging- included_pyhidra: Path = next(dist_dir.glob('pyhidra-*.whl'), None)- if included_pyhidra is None:- print('Warning: included pyhidra wheel was not found', file=sys.stderr)+def upgrade(pip_args: List[str], dist_dir: Path, current_pyghidra_version: str) -> bool:+ from packaging.version import Version # if pyghidra imported, we know we have packaging+ included_pyghidra: Path = next(dist_dir.glob('pyghidra-*.whl'), None)+ if included_pyghidra is None:+ print('Warning: included pyghidra wheel was not found', file=sys.stderr)return- included_version: Version = Version(included_pyhidra.name.split('-')[1])- current_version: Version = Version(current_pyhidra_version)+ included_version: Version = Version(included_pyghidra.name.split('-')[1])+ current_version: Version = Version(current_pyghidra_version)if included_version > current_version:- choice: str = input(f'Do you wish to upgrade Pyhidra {current_version} to {included_version} (y/n)? ')+ choice: str = input(f'Do you wish to upgrade PyGhidra {current_version} to {included_version} (y/n)? ')if choice.lower() in ('y', 'yes'):pip_args.append('-U')subprocess.check_call(pip_args)@@ -25,7 +25,7 @@ def upgrade(pip_args: List[str], dist_dir: Path, current_pyhidra_version: str) -return Falsedef install(pip_args: List[str], dist_dir: Path) -> bool:- choice: str = input('Do you wish to install Pyhidra (y/n)? ')+ choice: str = input('Do you wish to install PyGhidra (y/n)? ')if choice.lower() in ('y', 'yes'):subprocess.check_call(pip_args)return True@@ -48,16 +48,16 @@ def main() -> None:python_cmd: str = sys.executableinstall_dir: Path = Path(args.install_dir)venv_dir: Path = install_dir / 'build' / 'venv'- pyhidra_dir: Path = install_dir / 'Ghidra' / 'Features' / 'Pyhidra'- src_dir: Path = pyhidra_dir / 'src' / 'main' / 'py'- dist_dir: Path = pyhidra_dir / 'pypkg' / 'dist'+ pyghidra_dir: Path = install_dir / 'Ghidra' / 'Features' / 'PyGhidra'+ src_dir: Path = pyghidra_dir / 'src' / 'main' / 'py'+ dist_dir: Path = pyghidra_dir / 'pypkg' / 'dist'# If headless, force console modeif args.headless:args.console = Trueif args.dev:- # If in dev mode, launch pyhidra from the source tree using the development virtual environment+ # If in dev mode, launch PyGhidra from the source tree using the development virtual environmentif not venv_dir.is_dir():print('Virtual environment not found!')print('Run "gradle prepdev" and try again.')@@ -66,17 +66,17 @@ def main() -> None:linux_python_cmd = str(venv_dir / 'bin' / 'python3')python_cmd = win_python_cmd if os.name == 'nt' else linux_python_cmdelse:- # If in release mode, offer to install or upgrade pyhidra before launching from user-controlled environment- pip_args: List[str] = [python_cmd, '-m', 'pip', 'install', '--no-index', '-f', str(dist_dir), 'pyhidra']+ # If in release mode, offer to install or upgrade PyGhidra before launching from user-controlled environment+ pip_args: List[str] = [python_cmd, '-m', 'pip', 'install', '--no-index', '-f', str(dist_dir), 'pyghidra']try:- import pyhidra- upgrade(pip_args, dist_dir, pyhidra.__version__)+ import pyghidra+ upgrade(pip_args, dist_dir, pyghidra.__version__)except ImportError:if not install(pip_args, dist_dir):return- # Launch Pyhidra- py_args: List[str] = [python_cmd, '-m', 'pyhidra.ghidra_launch', '--install-dir', str(install_dir)]+ # Launch PyGhidra+ py_args: List[str] = [python_cmd, '-m', 'pyghidra.ghidra_launch', '--install-dir', str(install_dir)]if args.headless:py_args += ['ghidra.app.util.headless.AnalyzeHeadless']else:@@ -86,6 +86,6 @@ def main() -> None:else:creation_flags = getattr(subprocess, 'CREATE_NO_WINDOW', 0)subprocess.Popen(py_args + remaining, creationflags=creation_flags, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)-+if __name__ == "__main__":main()diff --git a/Ghidra/Features/Pyhidra/src/main/help/help/TOC_Source.xml b/Ghidra/Features/PyGhidra/src/main/help/help/TOC_Source.xmlsimilarity index 54%rename from Ghidra/Features/Pyhidra/src/main/help/help/TOC_Source.xmlrename to Ghidra/Features/PyGhidra/src/main/help/help/TOC_Source.xmlindex ffda807b49..28de8c3882 100644--- a/Ghidra/Features/Pyhidra/src/main/help/help/TOC_Source.xml+++ b/Ghidra/Features/PyGhidra/src/main/help/help/TOC_Source.xml@@ -3,7 +3,7 @@<tocroot><tocref id="Ghidra Functionality"><tocref id="Scripting">- <tocdef id="Pyhidra Interpreter" sortgroup="z" text="Pyhidra Interpreter" target="help/topics/Pyhidra/interpreter.html" />+ <tocdef id="PyGhidra Interpreter" sortgroup="z" text="PyGhidra Interpreter" target="help/topics/PyGhidra/interpreter.html" /></tocref></tocref></tocroot>diff --git a/Ghidra/Features/Pyhidra/src/main/help/help/topics/Pyhidra/interpreter.html b/Ghidra/Features/PyGhidra/src/main/help/help/topics/PyGhidra/interpreter.htmlsimilarity index 89%rename from Ghidra/Features/Pyhidra/src/main/help/help/topics/Pyhidra/interpreter.htmlrename to Ghidra/Features/PyGhidra/src/main/help/help/topics/PyGhidra/interpreter.htmlindex 1c57688c86..13ff477501 100644--- a/Ghidra/Features/Pyhidra/src/main/help/help/topics/Pyhidra/interpreter.html+++ b/Ghidra/Features/PyGhidra/src/main/help/help/topics/PyGhidra/interpreter.html@@ -2,15 +2,15 @@<HTML><HEAD>- <TITLE>Pyhidra Interpreter</TITLE>+ <TITLE>PyGhidra Interpreter</TITLE><LINK rel="stylesheet" type="text/css" href="help/shared/DefaultStyle.css"></HEAD><BODY lang="EN-US">- <H1><A name="Pyhidra"></A>Pyhidra Interpreter</H1>+ <H1><A name="PyGhidra"></A>PyGhidra Interpreter</H1><P>- The Ghidra <I>Pyhidra Interpreter</I> provides a full general-purpose Python interactive shell+ The Ghidra <I>PyGhidra Interpreter</I> provides a full general-purpose Python interactive shelland allows you to interact with your current Ghidra session by exposing Ghidra's powerful JavaAPI through the magic of Jpype.</P>@@ -18,7 +18,7 @@<H2>Environment</H2><BLOCKQUOTE><P>- The Ghidra <I>Pyhidra Interpreter</I> is configured to run in a similar context as a Ghidra+ The Ghidra <I>PyGhidra Interpreter</I> is configured to run in a similar context as a Ghidrascript. Therefore, you immediately have access to variables such as <TT>currentProgram</TT>,<TT>currentSelection</TT>, <TT>currentAddress</TT>, etc without needing to import them.These variables exist as Java objects behind the scenes, but Jpype allows you to interact with@@ -78,7 +78,7 @@<H2>Keybindings</H2><BLOCKQUOTE><P>- The Ghidra <I>Pyhidra Interpreter</I> supports the following hard-coded keybindings:+ The Ghidra <I>PyGhidra Interpreter</I> supports the following hard-coded keybindings:<UL><LI><B>(up):</B> Move backward in command stack</LI><LI><B>(down):</B> Move forward in command stack</LI>@@ -100,7 +100,7 @@<H2>Copy/Paste</H2><BLOCKQUOTE><P>- Copy and paste from within the Ghidra <I>Pyhidra Interpreter</I> should work as expected for+ Copy and paste from within the Ghidra <I>PyGhidra Interpreter</I> should work as expected foryour given environment:<UL><LI><B>Windows:</B> CTRL+C / CTRL+V</LI>@@ -113,7 +113,7 @@<H2>API Documentation</H2><BLOCKQUOTE><P>- The built-in <TT>help()</TT> Python function has been altered by the Ghidra <I>Pyhidra Interpreter</I>+ The built-in <TT>help()</TT> Python function has been altered by the Ghidra <I>PyGhidra Interpreter</I>to add support for displaying Ghidra's Javadoc (where available) for a given Ghidra class, method,or variable. For example, to see Ghidra's Javadoc on the <TT>state</TT> variable, simply do:<PRE>@@ -156,7 +156,7 @@</P></BLOCKQUOTE>- <P align="left" class="providedbyplugin">Provided by: <I>PyhidraPlugin</I></P>+ <P align="left" class="providedbyplugin">Provided by: <I>PyGhidraPlugin</I></P><P> </P><BR>diff --git a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/PyhidraPlugin.java b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/PyGhidraPlugin.javasimilarity index 73%rename from Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/PyhidraPlugin.javarename to Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/PyGhidraPlugin.javaindex 0705de835c..1bb2b7deb7 100644--- a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/PyhidraPlugin.java+++ b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/PyGhidraPlugin.java@@ -1,11 +1,11 @@-package ghidra.pyhidra;+package ghidra.pyghidra;import java.util.function.Consumer;import ghidra.app.CorePluginPackage;import ghidra.app.plugin.PluginCategoryNames;import ghidra.app.plugin.ProgramPlugin;-import ghidra.app.plugin.core.interpreter.*;+import ghidra.app.plugin.core.interpreter.InterpreterPanelService;import ghidra.app.script.GhidraState;import ghidra.framework.plugintool.PluginInfo;import ghidra.framework.plugintool.PluginTool;@@ -13,8 +13,8 @@ import ghidra.framework.plugintool.util.PluginStatus;import ghidra.program.model.listing.Program;import ghidra.program.util.ProgramLocation;import ghidra.program.util.ProgramSelection;-import ghidra.pyhidra.interpreter.InterpreterGhidraScript;-import ghidra.pyhidra.interpreter.PyhidraInterpreter;+import ghidra.pyghidra.interpreter.InterpreterGhidraScript;+import ghidra.pyghidra.interpreter.PyGhidraInterpreter;import ghidra.util.exception.AssertException;/**@@ -25,20 +25,20 @@ import ghidra.util.exception.AssertException;status = PluginStatus.RELEASED,packageName = CorePluginPackage.NAME,category = PluginCategoryNames.COMMON,- shortDescription = "Pyhidra Interpreter",+ shortDescription = "PyGhidra Interpreter",description = "Provides an interactive Python Interpreter that is tightly integrated with a loaded Ghidra program.",servicesRequired = { InterpreterPanelService.class })//@formatter:on-public class PyhidraPlugin extends ProgramPlugin {+public class PyGhidraPlugin extends ProgramPlugin {- public static final String TITLE = "Pyhidra";- private static Consumer<PyhidraPlugin> initializer = null;+ public static final String TITLE = "PyGhidra";+ private static Consumer<PyGhidraPlugin> initializer = null;public final InterpreterGhidraScript script = new InterpreterGhidraScript();- public PyhidraInterpreter interpreter;+ public PyGhidraInterpreter interpreter;- public PyhidraPlugin(PluginTool tool) {+ public PyGhidraPlugin(PluginTool tool) {super(tool);GhidraState state = new GhidraState(tool, tool.getProject(), null, null, null, null);// use the copy constructor so this state doesn't fire plugin events@@ -54,16 +54,16 @@ public class PyhidraPlugin extends ProgramPlugin {* @param initializer the Python side initializer* @throws AssertException if the code completer has already been set*/- public static void setInitializer(Consumer<PyhidraPlugin> initializer) {- if (PyhidraPlugin.initializer != null) {- throw new AssertException("PyhidraPlugin initializer has already been set");+ public static void setInitializer(Consumer<PyGhidraPlugin> initializer) {+ if (PyGhidraPlugin.initializer != null) {+ throw new AssertException("PyGhidraPlugin initializer has already been set");}- PyhidraPlugin.initializer = initializer;+ PyGhidraPlugin.initializer = initializer;}@Overridepublic void init() {- interpreter = new PyhidraInterpreter(this, PyhidraPlugin.initializer != null);+ interpreter = new PyGhidraInterpreter(this, PyGhidraPlugin.initializer != null);if (initializer != null) {initializer.accept(this);}diff --git a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/PyhidraScriptProvider.java b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/PyGhidraScriptProvider.javasimilarity index 78%rename from Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/PyhidraScriptProvider.javarename to Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/PyGhidraScriptProvider.javaindex 8ba0669e54..6669885e38 100644--- a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/PyhidraScriptProvider.java+++ b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/PyGhidraScriptProvider.java@@ -1,6 +1,6 @@-package ghidra.pyhidra;+package ghidra.pyghidra;-import java.io.*;+import java.io.PrintWriter;import java.lang.invoke.MethodHandles;import java.util.List;import java.util.function.Consumer;@@ -12,15 +12,15 @@ import ghidra.program.model.address.Address;import ghidra.program.model.listing.Program;import ghidra.program.util.ProgramLocation;import ghidra.program.util.ProgramSelection;-import ghidra.pyhidra.PythonFieldExposer.ExposedFields;-import ghidra.util.exception.AssertException;+import ghidra.pyghidra.PythonFieldExposer.ExposedFields;import ghidra.util.SystemUtilities;+import ghidra.util.exception.AssertException;import ghidra.util.task.TaskMonitor;/*** {@link GhidraScript} provider for native python3 scripts*/-public final class PyhidraScriptProvider extends AbstractPythonScriptProvider {+public final class PyGhidraScriptProvider extends AbstractPythonScriptProvider {private static Consumer<GhidraScript> scriptRunner = null;@@ -34,37 +34,37 @@ public final class PyhidraScriptProvider extends AbstractPythonScriptProvider {* @throws AssertException if the script runner has already been set*/public static void setScriptRunner(Consumer<GhidraScript> scriptRunner) {- if (PyhidraScriptProvider.scriptRunner != null) {+ if (PyGhidraScriptProvider.scriptRunner != null) {throw new AssertException("scriptRunner has already been set");}- PyhidraScriptProvider.scriptRunner = scriptRunner;+ PyGhidraScriptProvider.scriptRunner = scriptRunner;}@Overridepublic String getDescription() {- return PyhidraPlugin.TITLE;+ return PyGhidraPlugin.TITLE;}@Overridepublic String getRuntimeEnvironmentName() {- return PyhidraPlugin.TITLE;+ return PyGhidraPlugin.TITLE;}@Overridepublic GhidraScript getScriptInstance(ResourceFile sourceFile, PrintWriter writer)throws GhidraScriptLoadException {if (scriptRunner == null) {- String msg = "Ghidra was not started with pyhidra. Python is not available";+ String msg = "Ghidra was not started with PyGhidra. Python is not available";throw new GhidraScriptLoadException(msg);}- GhidraScript script = SystemUtilities.isInHeadlessMode() ? new PyhidraHeadlessScript()- : new PyhidraGhidraScript();+ GhidraScript script = SystemUtilities.isInHeadlessMode() ? new PyGhidraHeadlessScript()+ : new PyGhidraGhidraScript();script.setSourceFile(sourceFile);return script;}@ExposedFields(- exposer = PyhidraGhidraScript.ExposedField.class,+ exposer = PyGhidraGhidraScript.ExposedField.class,names = {"currentAddress", "currentLocation", "currentSelection","currentHighlight", "currentProgram", "monitor",@@ -78,7 +78,7 @@ public final class PyhidraScriptProvider extends AbstractPythonScriptProvider {ResourceFile.class, GhidraState.class, PrintWriter.class})- final static class PyhidraGhidraScript extends GhidraScript+ final static class PyGhidraGhidraScript extends GhidraScriptimplements PythonFieldExposer {@Override@@ -92,13 +92,13 @@ public final class PyhidraScriptProvider extends AbstractPythonScriptProvider {*/private static class ExposedField extends PythonFieldExposer.ExposedField {public ExposedField(String name, Class<?> type) {- super(MethodHandles.lookup().in(PyhidraGhidraScript.class), name, type);+ super(MethodHandles.lookup().in(PyGhidraGhidraScript.class), name, type);}}}@ExposedFields(- exposer = PyhidraHeadlessScript.ExposedField.class,+ exposer = PyGhidraHeadlessScript.ExposedField.class,names = {"currentAddress", "currentLocation", "currentSelection","currentHighlight", "currentProgram", "monitor",@@ -112,7 +112,7 @@ public final class PyhidraScriptProvider extends AbstractPythonScriptProvider {ResourceFile.class, GhidraState.class, PrintWriter.class})- final static class PyhidraHeadlessScript extends HeadlessScript+ final static class PyGhidraHeadlessScript extends HeadlessScriptimplements PythonFieldExposer {@Override@@ -126,7 +126,7 @@ public final class PyhidraScriptProvider extends AbstractPythonScriptProvider {*/private static class ExposedField extends PythonFieldExposer.ExposedField {public ExposedField(String name, Class<?> type) {- super(MethodHandles.lookup().in(PyhidraHeadlessScript.class), name, type);+ super(MethodHandles.lookup().in(PyGhidraHeadlessScript.class), name, type);}}}diff --git a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/PythonFieldExposer.java b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/PythonFieldExposer.javasimilarity index 96%rename from Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/PythonFieldExposer.javarename to Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/PythonFieldExposer.javaindex 945bf97706..9df5c064f1 100644--- a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/PythonFieldExposer.java+++ b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/PythonFieldExposer.java@@ -1,4 +1,4 @@-package ghidra.pyhidra;+package ghidra.pyghidra;import java.lang.annotation.ElementType;import java.lang.annotation.Retention;@@ -21,8 +21,8 @@ import ghidra.util.exception.AssertException;* This interface is for <b>internal use only</b> and is only public so it can be* visible to Python to apply the Jpype class customizations.*/-public sealed interface PythonFieldExposer permits PyhidraScriptProvider.PyhidraGhidraScript,- PyhidraScriptProvider.PyhidraHeadlessScript {+public sealed interface PythonFieldExposer permits PyGhidraScriptProvider.PyGhidraGhidraScript,+ PyGhidraScriptProvider.PyGhidraHeadlessScript {/*** Gets a mapping of all the explicitly exposed fields of a class.diff --git a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/interpreter/CancelAction.java b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/interpreter/CancelAction.javasimilarity index 72%rename from Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/interpreter/CancelAction.javarename to Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/interpreter/CancelAction.javaindex 6e9f672863..58967c32a0 100644--- a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/interpreter/CancelAction.java+++ b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/interpreter/CancelAction.java@@ -1,13 +1,13 @@-package ghidra.pyhidra.interpreter;+package ghidra.pyghidra.interpreter;import java.awt.event.KeyEvent;import javax.swing.ImageIcon;-import ghidra.pyhidra.PyhidraPlugin;import docking.ActionContext;import docking.action.KeyBindingData;import docking.action.DockingAction;import docking.action.ToolBarData;+import ghidra.pyghidra.PyGhidraPlugin;import ghidra.util.HelpLocation;import resources.ResourceManager;@@ -15,10 +15,10 @@ import static docking.DockingUtils.CONTROL_KEY_MODIFIER_MASK;final class CancelAction extends DockingAction {- private final PyhidraConsole console;+ private final PyGhidraConsole console;- CancelAction(PyhidraConsole console) {- super("Cancel", PyhidraPlugin.class.getSimpleName());+ CancelAction(PyGhidraConsole console) {+ super("Cancel", PyGhidraPlugin.class.getSimpleName());this.console = console;setDescription("Interrupt the interpreter");ImageIcon image = ResourceManager.loadImage("images/dialog-cancel.png");@@ -26,7 +26,7 @@ final class CancelAction extends DockingAction {setEnabled(true);KeyBindingData key = new KeyBindingData(KeyEvent.VK_I, CONTROL_KEY_MODIFIER_MASK);setKeyBindingData(key);- setHelpLocation(new HelpLocation(PyhidraPlugin.TITLE, "Interrupt_Interpreter"));+ setHelpLocation(new HelpLocation(PyGhidraPlugin.TITLE, "Interrupt_Interpreter"));}@Overridediff --git a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/interpreter/InterpreterGhidraScript.java b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/interpreter/InterpreterGhidraScript.javasimilarity index 90%rename from Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/interpreter/InterpreterGhidraScript.javarename to Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/interpreter/InterpreterGhidraScript.javaindex 043db5534a..fe06dcc208 100644--- a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/interpreter/InterpreterGhidraScript.java+++ b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/interpreter/InterpreterGhidraScript.java@@ -1,4 +1,4 @@-package ghidra.pyhidra.interpreter;+package ghidra.pyghidra.interpreter;import java.io.PrintWriter;@@ -10,11 +10,11 @@ import ghidra.program.util.ProgramLocation;import ghidra.program.util.ProgramSelection;/**- * Custom {@link GhidraScript} only for use with the pyhidra interpreter console+ * Custom {@link GhidraScript} only for use with the PyGhidra interpreter console*/public final class InterpreterGhidraScript extends GhidraScript {- // public default constructor for use by PyhidraPlugin+ // public default constructor for use by PyGhidraPlugin// the default constructor for FlatProgramAPI has protected visibilitypublic InterpreterGhidraScript() {}diff --git a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/interpreter/InterpreterTaskMonitor.java b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/interpreter/InterpreterTaskMonitor.javasimilarity index 76%rename from Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/interpreter/InterpreterTaskMonitor.javarename to Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/interpreter/InterpreterTaskMonitor.javaindex ff432d7905..5fb1df0003 100644--- a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/interpreter/InterpreterTaskMonitor.java+++ b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/interpreter/InterpreterTaskMonitor.java@@ -1,4 +1,4 @@-package ghidra.pyhidra.interpreter;+package ghidra.pyghidra.interpreter;import java.io.PrintWriter;@@ -14,6 +14,6 @@ final class InterpreterTaskMonitor extends TaskMonitorAdapter {@Overridepublic void setMessage(String message) {- output.println("<pyhidra-interactive>: " + message);+ output.println("<pyghidra-interactive>: " + message);}}diff --git a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/interpreter/PyhidraConsole.java b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/interpreter/PyGhidraConsole.javasimilarity index 79%rename from Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/interpreter/PyhidraConsole.javarename to Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/interpreter/PyGhidraConsole.javaindex 37944dd669..e8296fded5 100644--- a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/interpreter/PyhidraConsole.java+++ b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/interpreter/PyGhidraConsole.java@@ -1,4 +1,4 @@-package ghidra.pyhidra.interpreter;+package ghidra.pyghidra.interpreter;import java.util.List;@@ -12,10 +12,10 @@ import ghidra.util.Disposable;* This interface is for <b>internal use only</b> and is only public so it can be* implemented in Python.*/-public interface PyhidraConsole extends Disposable {+public interface PyGhidraConsole extends Disposable {/**- * Generates code completions for the pyhidra interpreter+ * Generates code completions for the PyGhidra interpreter** @param cmd The command to get code completions for* @param caretPos The position of the caret in the input string 'cmd'.@@ -26,12 +26,12 @@ public interface PyhidraConsole extends Disposable {List<CodeCompletion> getCompletions(String cmd, int caretPos);/**- * Restarts the pyhidra console+ * Restarts the PyGhidra console*/void restart();/**- * Interrupts the code running in the pyhidra console+ * Interrupts the code running in the PyGhidra console*/void interrupt();}diff --git a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/interpreter/PyhidraInterpreter.java b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/interpreter/PyGhidraInterpreter.javasimilarity index 64%rename from Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/interpreter/PyhidraInterpreter.javarename to Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/interpreter/PyGhidraInterpreter.javaindex b85f5a41db..ec4363c705 100644--- a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/interpreter/PyhidraInterpreter.java+++ b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/interpreter/PyGhidraInterpreter.java@@ -1,4 +1,4 @@-package ghidra.pyhidra.interpreter;+package ghidra.pyghidra.interpreter;import java.io.PrintWriter;import java.util.List;@@ -8,20 +8,20 @@ import ghidra.app.plugin.core.console.CodeCompletion;import ghidra.app.plugin.core.interpreter.InterpreterConnection;import ghidra.app.plugin.core.interpreter.InterpreterConsole;import ghidra.app.plugin.core.interpreter.InterpreterPanelService;-import ghidra.pyhidra.PyhidraPlugin;+import ghidra.pyghidra.PyGhidraPlugin;import ghidra.util.Disposable;import ghidra.util.exception.AssertException;import resources.ResourceManager;/**- * The pyhidra interpreter connection+ * The PyGhidra interpreter connection*/-public final class PyhidraInterpreter implements Disposable, InterpreterConnection {+public final class PyGhidraInterpreter implements Disposable, InterpreterConnection {- private PyhidraConsole pyhidraConsole = null;+ private PyGhidraConsole pyghidraConsole = null;public final InterpreterConsole console;- public PyhidraInterpreter(PyhidraPlugin plugin, boolean isPythonAvailable) {+ public PyGhidraInterpreter(PyGhidraPlugin plugin, boolean isPythonAvailable) {InterpreterPanelService service =plugin.getTool().getService(InterpreterPanelService.class);console = service.createInterpreterPanel(this, false);@@ -32,8 +32,8 @@ public final class PyhidraInterpreter implements Disposable, InterpreterConnecti@Overridepublic void dispose() {- if (pyhidraConsole != null) {- pyhidraConsole.dispose();+ if (pyghidraConsole != null) {+ pyghidraConsole.dispose();}console.dispose();}@@ -45,7 +45,7 @@ public final class PyhidraInterpreter implements Disposable, InterpreterConnecti@Overridepublic String getTitle() {- return PyhidraPlugin.TITLE;+ return PyGhidraPlugin.TITLE;}@Override@@ -55,20 +55,20 @@ public final class PyhidraInterpreter implements Disposable, InterpreterConnecti@Overridepublic List<CodeCompletion> getCompletions(String cmd, int caretPos) {- if (pyhidraConsole == null) {+ if (pyghidraConsole == null) {return List.of();}- return pyhidraConsole.getCompletions(cmd, caretPos);+ return pyghidraConsole.getCompletions(cmd, caretPos);}private void unavailableCallback() {console.setInputPermitted(false);PrintWriter out = console.getOutWriter();- out.println("Ghidra was not started with pyhidra. Python is not available.");+ out.println("Ghidra was not started with PyGhidra. Python is not available.");}/**- * Initializes the interpreter with the provided PyhidraConsole.+ * Initializes the interpreter with the provided PyGhidraConsole.** This method is for <b>internal use only</b> and is only public so it can be* called from Python.@@ -76,13 +76,13 @@ public final class PyhidraInterpreter implements Disposable, InterpreterConnecti* @param pythonSideConsole the python side console* @throws AssertException if the interpreter has already been initialized*/- public void init(PyhidraConsole pythonSideConsole) {- if (pyhidraConsole != null) {+ public void init(PyGhidraConsole pythonSideConsole) {+ if (pyghidraConsole != null) {throw new AssertException("the interpreter has already been initialized");}- pyhidraConsole = pythonSideConsole;- console.addFirstActivationCallback(pyhidraConsole::restart);- console.addAction(new CancelAction(pyhidraConsole));- console.addAction(new ResetAction(pyhidraConsole));+ pyghidraConsole = pythonSideConsole;+ console.addFirstActivationCallback(pyghidraConsole::restart);+ console.addAction(new CancelAction(pyghidraConsole));+ console.addAction(new ResetAction(pyghidraConsole));}}diff --git a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/interpreter/ResetAction.java b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/interpreter/ResetAction.javasimilarity index 73%rename from Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/interpreter/ResetAction.javarename to Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/interpreter/ResetAction.javaindex 1de493a3d0..a30997ff96 100644--- a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/interpreter/ResetAction.java+++ b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/interpreter/ResetAction.java@@ -1,9 +1,9 @@-package ghidra.pyhidra.interpreter;+package ghidra.pyghidra.interpreter;import java.awt.event.KeyEvent;import javax.swing.ImageIcon;-import ghidra.pyhidra.PyhidraPlugin;+import ghidra.pyghidra.PyGhidraPlugin;import ghidra.util.HelpLocation;import docking.ActionContext;import docking.action.DockingAction;@@ -15,10 +15,10 @@ import static docking.DockingUtils.CONTROL_KEY_MODIFIER_MASK;final class ResetAction extends DockingAction {- private final PyhidraConsole console;+ private final PyGhidraConsole console;- ResetAction(PyhidraConsole console) {- super("Reset", PyhidraPlugin.class.getSimpleName());+ ResetAction(PyGhidraConsole console) {+ super("Reset", PyGhidraPlugin.class.getSimpleName());this.console = console;setDescription("Reset the interpreter");ImageIcon image = ResourceManager.loadImage("images/reload3.png");@@ -26,7 +26,7 @@ final class ResetAction extends DockingAction {setEnabled(true);KeyBindingData key = new KeyBindingData(KeyEvent.VK_D, CONTROL_KEY_MODIFIER_MASK);setKeyBindingData(key);- setHelpLocation(new HelpLocation(PyhidraPlugin.TITLE, "Reset_Interpreter"));+ setHelpLocation(new HelpLocation(PyGhidraPlugin.TITLE, "Reset_Interpreter"));}@Overridediff --git a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/AbstractJavaProperty.java b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/AbstractJavaProperty.javasimilarity index 94%rename from Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/AbstractJavaProperty.javarename to Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/AbstractJavaProperty.javaindex e9cb3cf7cd..0f11ce273e 100644--- a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/AbstractJavaProperty.java+++ b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/AbstractJavaProperty.java@@ -1,4 +1,4 @@-package ghidra.pyhidra.property;+package ghidra.pyghidra.property;import java.lang.invoke.MethodHandle;@@ -16,7 +16,7 @@ import java.lang.invoke.MethodHandle;* }* }*- * The pyhidra internals expects every {@link JavaProperty} to be an instance of this class.+ * The PyGhidra internals expects every {@link JavaProperty} to be an instance of this class.* No checking is required or performed since the {@link JavaProperty} interface and this* class are sealed.*/diff --git a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/BooleanJavaProperty.java b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/BooleanJavaProperty.javasimilarity index 95%rename from Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/BooleanJavaProperty.javarename to Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/BooleanJavaProperty.javaindex 7e764b3f2e..f332d97f7f 100644--- a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/BooleanJavaProperty.java+++ b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/BooleanJavaProperty.java@@ -1,4 +1,4 @@-package ghidra.pyhidra.property;+package ghidra.pyghidra.property;import java.lang.invoke.MethodHandle;diff --git a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/ByteJavaProperty.java b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/ByteJavaProperty.javasimilarity index 95%rename from Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/ByteJavaProperty.javarename to Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/ByteJavaProperty.javaindex 4afa658564..06e3af80a1 100644--- a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/ByteJavaProperty.java+++ b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/ByteJavaProperty.java@@ -1,4 +1,4 @@-package ghidra.pyhidra.property;+package ghidra.pyghidra.property;import java.lang.invoke.MethodHandle;diff --git a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/CharacterJavaProperty.java b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/CharacterJavaProperty.javasimilarity index 95%rename from Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/CharacterJavaProperty.javarename to Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/CharacterJavaProperty.javaindex fbbb5fdafb..9c966dce6d 100644--- a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/CharacterJavaProperty.java+++ b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/CharacterJavaProperty.java@@ -1,4 +1,4 @@-package ghidra.pyhidra.property;+package ghidra.pyghidra.property;import java.lang.invoke.MethodHandle;diff --git a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/DoubleJavaProperty.java b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/DoubleJavaProperty.javasimilarity index 95%rename from Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/DoubleJavaProperty.javarename to Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/DoubleJavaProperty.javaindex 8b75ffb5d7..ed81f5bb0b 100644--- a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/DoubleJavaProperty.java+++ b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/DoubleJavaProperty.java@@ -1,4 +1,4 @@-package ghidra.pyhidra.property;+package ghidra.pyghidra.property;import java.lang.invoke.MethodHandle;diff --git a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/FloatJavaProperty.java b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/FloatJavaProperty.javasimilarity index 95%rename from Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/FloatJavaProperty.javarename to Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/FloatJavaProperty.javaindex 88bbb340af..e5e26b9839 100644--- a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/FloatJavaProperty.java+++ b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/FloatJavaProperty.java@@ -1,4 +1,4 @@-package ghidra.pyhidra.property;+package ghidra.pyghidra.property;import java.lang.invoke.MethodHandle;diff --git a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/IntegerJavaProperty.java b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/IntegerJavaProperty.javasimilarity index 95%rename from Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/IntegerJavaProperty.javarename to Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/IntegerJavaProperty.javaindex c14ff1ce77..ccaff265f1 100644--- a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/IntegerJavaProperty.java+++ b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/IntegerJavaProperty.java@@ -1,4 +1,4 @@-package ghidra.pyhidra.property;+package ghidra.pyghidra.property;import java.lang.invoke.MethodHandle;diff --git a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/JavaProperty.java b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/JavaProperty.javasimilarity index 97%rename from Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/JavaProperty.javarename to Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/JavaProperty.javaindex 08d1fdfd1e..bad5682d5e 100644--- a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/JavaProperty.java+++ b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/JavaProperty.java@@ -1,4 +1,4 @@-package ghidra.pyhidra.property;+package ghidra.pyghidra.property;/*** Property interface for creating a Python property for getters and setters.diff --git a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/JavaPropertyFactory.java b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/JavaPropertyFactory.javasimilarity index 97%rename from Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/JavaPropertyFactory.javarename to Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/JavaPropertyFactory.javaindex 11a6278c22..e82e21b374 100644--- a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/JavaPropertyFactory.java+++ b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/JavaPropertyFactory.java@@ -1,4 +1,4 @@-package ghidra.pyhidra.property;+package ghidra.pyghidra.property;import java.lang.invoke.MethodHandle;diff --git a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/LongJavaProperty.java b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/LongJavaProperty.javasimilarity index 95%rename from Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/LongJavaProperty.javarename to Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/LongJavaProperty.javaindex 9bda93d281..7875a04b3b 100644--- a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/LongJavaProperty.java+++ b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/LongJavaProperty.java@@ -1,4 +1,4 @@-package ghidra.pyhidra.property;+package ghidra.pyghidra.property;import java.lang.invoke.MethodHandle;diff --git a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/ObjectJavaProperty.java b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/ObjectJavaProperty.javasimilarity index 95%rename from Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/ObjectJavaProperty.javarename to Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/ObjectJavaProperty.javaindex ea62fc38ab..cf38f14de0 100644--- a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/ObjectJavaProperty.java+++ b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/ObjectJavaProperty.java@@ -1,4 +1,4 @@-package ghidra.pyhidra.property;+package ghidra.pyghidra.property;import java.lang.invoke.MethodHandle;diff --git a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/PropertyUtils.java b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/PropertyUtils.javasimilarity index 99%rename from Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/PropertyUtils.javarename to Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/PropertyUtils.javaindex d62317855f..0915d6b6dc 100644--- a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/PropertyUtils.java+++ b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/PropertyUtils.java@@ -1,4 +1,4 @@-package ghidra.pyhidra.property;+package ghidra.pyghidra.property;import java.lang.invoke.MethodHandle;import java.lang.invoke.MethodHandles;diff --git a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/ShortJavaProperty.java b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/ShortJavaProperty.javasimilarity index 95%rename from Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/ShortJavaProperty.javarename to Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/ShortJavaProperty.javaindex 03f2b6b49a..fd3711819f 100644--- a/Ghidra/Features/Pyhidra/src/main/java/ghidra/pyhidra/property/ShortJavaProperty.java+++ b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/property/ShortJavaProperty.java@@ -1,4 +1,4 @@-package ghidra.pyhidra.property;+package ghidra.pyghidra.property;import java.lang.invoke.MethodHandle;diff --git a/Ghidra/Features/Pyhidra/src/main/py/LICENSE b/Ghidra/Features/PyGhidra/src/main/py/LICENSEsimilarity index 100%rename from Ghidra/Features/Pyhidra/src/main/py/LICENSErename to Ghidra/Features/PyGhidra/src/main/py/LICENSEdiff --git a/Ghidra/Features/Pyhidra/src/main/py/MANIFEST.in b/Ghidra/Features/PyGhidra/src/main/py/MANIFEST.insimilarity index 100%rename from Ghidra/Features/Pyhidra/src/main/py/MANIFEST.inrename to Ghidra/Features/PyGhidra/src/main/py/MANIFEST.indiff --git a/Ghidra/Features/Pyhidra/src/main/py/README.md b/Ghidra/Features/PyGhidra/src/main/py/README.mdsimilarity index 58%rename from Ghidra/Features/Pyhidra/src/main/py/README.mdrename to Ghidra/Features/PyGhidra/src/main/py/README.mdindex 0905a54f58..861b6ff5f3 100644--- a/Ghidra/Features/Pyhidra/src/main/py/README.md+++ b/Ghidra/Features/PyGhidra/src/main/py/README.md@@ -1,9 +1,9 @@-# pyhidra+# PyGhidra-Pyhidra is a Python library that provides direct access to the Ghidra API within a native CPython interpreter using [jpype](https://jpype.readthedocs.io/en/latest). As well, Pyhidra contains some conveniences for setting up analysis on a given sample and running a Ghidra script locally. It also contains a Ghidra plugin to allow the use of CPython from the Ghidra user interface.+PyGhidra is a Python library that provides direct access to the Ghidra API within a native CPython interpreter using [jpype](https://jpype.readthedocs.io/en/latest). As well, PyGhidra contains some conveniences for setting up analysis on a given sample and running a Ghidra script locally. It also contains a Ghidra plugin to allow the use of CPython from the Ghidra user interface.-Pyhidra was initially developed for use with Dragodis and is designed to be installable without requiring Java or Ghidra. This allows other Python projects-have pyhidra as a dependency and provide optional Ghidra functionality without requiring all users to install Java and Ghidra. It is recommended to recommend that users set the `GHIDRA_INSTALL_DIR` environment variable to simplify locating Ghidra.+PyGhidra was initially developed for use with Dragodis and is designed to be installable without requiring Java or Ghidra. This allows other Python projects+have PyGhidra as a dependency and provide optional Ghidra functionality without requiring all users to install Java and Ghidra. It is recommended to recommend that users set the `GHIDRA_INSTALL_DIR` environment variable to simplify locating Ghidra.## Usage@@ -18,8 +18,8 @@ which will allow you to directly import `ghidra` and `java`.*NOTE: No projects or programs get setup in this mode.*```python-import pyhidra-pyhidra.start()+import pyghidra+pyghidra.start()import ghidrafrom ghidra.app.util.headless import HeadlessAnalyzer@@ -32,12 +32,12 @@ from java.lang import String### Customizing Java and Ghidra initialization-JVM configuration for the classpath and vmargs may be done through a `PyhidraLauncher`.+JVM configuration for the classpath and vmargs may be done through a `PyGhidraLauncher`.```python-from pyhidra.launcher import HeadlessPyhidraLauncher+from pyghidra.launcher import HeadlessPyGhidraLauncher-launcher = HeadlessPyhidraLauncher()+launcher = HeadlessPyGhidraLauncher()launcher.add_classpaths("log4j-core-2.17.1.jar", "log4j-api-2.17.1.jar")launcher.add_vmargs("-Dlog4j2.formatMsgNoLookups=true")launcher.start()@@ -45,10 +45,10 @@ launcher.start()### Registering an Entry Point-The `PyhidraLauncher` can also be configured through the use of a registered entry point on your own python project.-This is useful for installing your own Ghidra plugin which uses pyhidra and self-compiles.+The `PyGhidraLauncher` can also be configured through the use of a registered entry point on your own python project.+This is useful for installing your own Ghidra plugin which uses PyGhidra and self-compiles.-First create an [entry_point](https://setuptools.pypa.io/en/latest/userguide/entry_point.html) for `pyhidra.setup`+First create an [entry_point](https://setuptools.pypa.io/en/latest/userguide/entry_point.html) for `pyghidra.setup`pointing to a single argument function which accepts the launcher instance.```python@@ -58,7 +58,7 @@ from setuptools import setupsetup(# ...,entry_points={- 'pyhidra.setup': [+ 'pyghidra.setup': ['acme_plugin = acme.ghidra_plugin.install:setup',]}@@ -67,25 +67,25 @@ setup(Then we create the target function.-This function will be called every time a user starts a pyhidra launcher.-In the same fashion, another entry point `pyhidra.pre_launch` may be registered and will be called after Ghidra and all+This function will be called every time a user starts a PyGhidra launcher.+In the same fashion, another entry point `pyghidra.pre_launch` may be registered and will be called after Ghidra and allplugins have been loaded.```python# acme/ghidra_plugin/install.pyfrom pathlib import Path-import pyhidra+import pyghidradef setup(launcher):"""- Run by pyhidra launcher to install our plugin.+ Run by PyGhidra launcher to install our plugin."""launcher.add_classpaths("log4j-core-2.17.1.jar", "log4j-api-2.17.1.jar")launcher.add_vmargs("-Dlog4j2.formatMsgNoLookups=true")# Install our plugin.source_path = Path(__file__).parent / "java" / "plugin" # path to uncompiled .java code- details = pyhidra.ExtensionDetails(+ details = pyghidra.ExtensionDetails(name="acme_plugin",description="My Cool Plugin",author="acme",@@ -97,15 +97,15 @@ def setup(launcher):### Analyze a File-To have pyhidra setup a binary file for you, use the `open_program()` function.+To have PyGhidra setup a binary file for you, use the `open_program()` function.This will setup a Ghidra project and import the given binary file as a program for you.Again, this will also allow you to import `ghidra` and `java` to perform more advanced processing.```python-import pyhidra+import pyghidra-with pyhidra.open_program("binary_file.exe") as flat_api:+with pyghidra.open_program("binary_file.exe") as flat_api:program = flat_api.getCurrentProgram()listing = program.getListing()print(listing.getCodeUnitAt(flat_api.toAddr(0x1234)))@@ -117,12 +117,12 @@ with pyhidra.open_program("binary_file.exe") as flat_api:decomp_api.dispose()```-By default, pyhidra will run analysis for you. If you would like to do this yourself, set `analyze` to `False`.+By default, PyGhidra will run analysis for you. If you would like to do this yourself, set `analyze` to `False`.```python-import pyhidra+import pyghidra-with pyhidra.open_program("binary_file.exe", analyze=False) as flat_api:+with pyghidra.open_program("binary_file.exe", analyze=False) as flat_api:from ghidra.program.util import GhidraProgramUtilitiesprogram = flat_api.getCurrentProgram()@@ -135,16 +135,16 @@ The `open_program()` function can also accept optional arguments to control the(Helpful for opening up a sample in an already existing project.)```python-import pyhidra+import pyghidra-with pyhidra.open_program("binary_file.exe", project_name="EXAM_231", project_location=r"C:\exams\231") as flat_api:+with pyghidra.open_program("binary_file.exe", project_name="EXAM_231", project_location=r"C:\exams\231") as flat_api:...```### Run a Script-Pyhidra can also be used to run an existing Ghidra Python script directly in your native python interpreter+PyGhidra can also be used to run an existing Ghidra Python script directly in your native python interpreterusing the `run_script()` command.However, while you can technically run an existing Ghidra script unmodified, you mayrun into issues due to differences between Jython 2 and CPython 3.@@ -152,21 +152,21 @@ Therefore, some modification to the script may be needed.```python-import pyhidra+import pyghidra-pyhidra.run_script(r"C:\input.exe", r"C:\some_ghidra_script.py")+pyghidra.run_script(r"C:\input.exe", r"C:\some_ghidra_script.py")```-This can also be done on the command line using `pyhidra`.+This can also be done on the command line using `pyghidra`.```console-> pyhidra C:\input.exe C:\some_ghidra_script.py <CLI ARGS PASSED TO SCRIPT>+> pyghidra C:\input.exe C:\some_ghidra_script.py <CLI ARGS PASSED TO SCRIPT>```### Handling Package Name ConflictsThere may be some Python modules and Java packages with the same import path. When this occurs the Python module takes precedence.-While jpype has its own mechanism for handling this situation, pyhidra automatically makes the Java package accessible by allowing+While jpype has its own mechanism for handling this situation, PyGhidra automatically makes the Java package accessible by allowingit to be imported with an underscore appended to the package name.```pythondiff --git a/Ghidra/Features/Pyhidra/src/main/py/pyproject.toml b/Ghidra/Features/PyGhidra/src/main/py/pyproject.tomlsimilarity index 91%rename from Ghidra/Features/Pyhidra/src/main/py/pyproject.tomlrename to Ghidra/Features/PyGhidra/src/main/py/pyproject.tomlindex 9478a8d8b3..ec08544cef 100644--- a/Ghidra/Features/Pyhidra/src/main/py/pyproject.toml+++ b/Ghidra/Features/PyGhidra/src/main/py/pyproject.toml@@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"]build-backend = "setuptools.build_meta"[project]-name = "pyhidra"+name = "pyghidra"dynamic = ["version", "readme"]description = "Native CPython for Ghidra"license = {text = "Apache-2.0"}@@ -39,16 +39,16 @@ testing = [][project.scripts]-pyhidra = "pyhidra.__main__:main"+pyghidra = "pyghidra.__main__:main"[project.gui-scripts]-pyhidraw = "pyhidra.gui:_gui"+pyghidraw = "pyghidra.gui:_gui"[project.urls]Repository = "https://github.com/NationalSecurityAgency/ghidra"[tool.setuptools.dynamic]-version = {attr = "pyhidra.__version__"}+version = {attr = "pyghidra.__version__"}readme = {file = ["README.md"], content-type = "text/markdown"}[tool.pytest.ini_options]diff --git a/Ghidra/Features/Pyhidra/src/main/py/setup.py b/Ghidra/Features/PyGhidra/src/main/py/setup.pysimilarity index 100%rename from Ghidra/Features/Pyhidra/src/main/py/setup.pyrename to Ghidra/Features/PyGhidra/src/main/py/setup.pydiff --git a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/__init__.py b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/__init__.pysimilarity index 86%rename from Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/__init__.pyrename to Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/__init__.pyindex 5941eb20f1..015c8d950f 100644--- a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/__init__.py+++ b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/__init__.py@@ -41,13 +41,13 @@ debug_callback = _debug_callback# Expose APIfrom .core import run_script, start, started, open_program-from .launcher import DeferredPyhidraLauncher, GuiPyhidraLauncher, HeadlessPyhidraLauncher+from .launcher import DeferredPyGhidraLauncher, GuiPyGhidraLauncher, HeadlessPyGhidraLauncherfrom .script import get_current_interpreterfrom .version import ApplicationInfo, ExtensionDetails__all__ = ["debug_callback", "get_current_interpreter", "open_program", "run_script", "start",- "started", "ApplicationInfo", "DeferredPyhidraLauncher", "ExtensionDetails",- "GuiPyhidraLauncher", "HeadlessPyhidraLauncher"+ "started", "ApplicationInfo", "DeferredPyGhidraLauncher", "ExtensionDetails",+ "GuiPyGhidraLauncher", "HeadlessPyGhidraLauncher"]diff --git a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/__main__.py b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/__main__.pysimilarity index 90%rename from Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/__main__.pyrename to Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/__main__.pyindex 54cc8c7e3a..4959314425 100644--- a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/__main__.py+++ b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/__main__.py@@ -5,13 +5,13 @@ import loggingimport sysfrom pathlib import Path-import pyhidra-import pyhidra.core-import pyhidra.gui+import pyghidra+import pyghidra.core+import pyghidra.gui-# NOTE: this must be "pyhidra" and not __name__-logger = logging.getLogger("pyhidra")+# NOTE: this must be "pyghidra" and not __name__+logger = logging.getLogger("pyghidra")def _interpreter(interpreter_globals: dict):@@ -24,7 +24,7 @@ def _interpreter(interpreter_globals: dict):# pylint: disable=too-few-public-methods-class PyhidraArgs(argparse.Namespace):+class PyGhidraArgs(argparse.Namespace):"""Custom namespace for holding the command line arguments"""@@ -60,18 +60,18 @@ class PyhidraArgs(argparse.Namespace):vmargs = self.jvm_argsif self.gui:- pyhidra.gui.gui(self.install_dir, vmargs)+ pyghidra.gui.gui(self.install_dir, vmargs)return# not in gui mode so it is easier to start Ghidra now- launcher = pyhidra.HeadlessPyhidraLauncher(+ launcher = pyghidra.HeadlessPyGhidraLauncher(verbose=self.verbose, install_dir=self.install_dir)launcher.vm_args = vmargs + launcher.vm_argslauncher.start()if self.script_path is not None:try:- pyhidra.run_script(+ pyghidra.run_script(self.binary_path,self.script_path,project_location=self.project_path,@@ -92,7 +92,7 @@ class PyhidraArgs(argparse.Namespace):self.verbose,not self.skip_analysis)- with pyhidra.core._flat_api(*args, install_dir=self.install_dir) as api:+ with pyghidra.core._flat_api(*args, install_dir=self.install_dir) as api:_interpreter(api)else:_interpreter(globals())@@ -129,7 +129,7 @@ class PathAction(argparse.Action):self.nargs = '*'self.type = str- def __call__(self, parser, namespace: PyhidraArgs, values, option_string=None):+ def __call__(self, parser, namespace: PyGhidraArgs, values, option_string=None):if not values:return@@ -168,7 +168,7 @@ class PathAction(argparse.Action):def _get_parser():- parser = argparse.ArgumentParser(prog="pyhidra")+ parser = argparse.ArgumentParser(prog="pyghidra")parser.add_argument("-v","--verbose",@@ -215,7 +215,7 @@ def _get_parser():action=PathAction,help=("Headless script path. The script must have a .py extension. "- "If a script is not provided, pyhidra will drop into a repl."+ "If a script is not provided, pyghidra will drop into a repl."))parser.add_argument(@@ -258,7 +258,7 @@ def _get_parser():def main():"""- pyhidra module main function+ pyghidra module main function"""handler = logging.StreamHandler()formatter = logging.Formatter("%(filename)s:%(lineno)d %(message)s")@@ -266,7 +266,7 @@ def main():logger.addHandler(handler)parser = _get_parser()- parser.parse_args(namespace=PyhidraArgs(parser)).func()+ parser.parse_args(namespace=PyGhidraArgs(parser)).func()if __name__ == "__main__":diff --git a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/converters.py b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/converters.pysimilarity index 100%rename from Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/converters.pyrename to Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/converters.pydiff --git a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/core.py b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/core.pysimilarity index 93%rename from Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/core.pyrename to Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/core.pyindex 1d43198235..68d65aaffa 100644--- a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/core.py+++ b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/core.py@@ -2,18 +2,18 @@ import contextlibfrom pathlib import Pathfrom typing import Union, TYPE_CHECKING, Tuple, ContextManager, List, Optional-from pyhidra.converters import * # pylint: disable=wildcard-import, unused-wildcard-import+from pyghidra.converters import * # pylint: disable=wildcard-import, unused-wildcard-importif TYPE_CHECKING:- from pyhidra.launcher import PyhidraLauncher+ from pyghidra.launcher import PyGhidraLauncherfrom ghidra.base.project import GhidraProjectfrom ghidra.program.flatapi import FlatProgramAPIfrom ghidra.program.model.lang import CompilerSpec, Language, LanguageServicefrom ghidra.program.model.listing import Program-def start(verbose=False, *, install_dir: Path = None) -> "PyhidraLauncher":+def start(verbose=False, *, install_dir: Path = None) -> "PyGhidraLauncher":"""Starts the JVM and fully initializes Ghidra in Headless mode.@@ -22,18 +22,18 @@ def start(verbose=False, *, install_dir: Path = None) -> "PyhidraLauncher":(Defaults to the GHIDRA_INSTALL_DIR environment variable):return: The PhyidraLauncher used to start the JVM"""- from pyhidra.launcher import HeadlessPyhidraLauncher- launcher = HeadlessPyhidraLauncher(verbose=verbose, install_dir=install_dir)+ from pyghidra.launcher import HeadlessPyGhidraLauncher+ launcher = HeadlessPyGhidraLauncher(verbose=verbose, install_dir=install_dir)launcher.start()return launcherdef started() -> bool:"""- Whether the PyhidraLauncher has already started.+ Whether the PyGhidraLauncher has already started."""- from pyhidra.launcher import PyhidraLauncher- return PyhidraLauncher.has_launched()+ from pyghidra.launcher import PyGhidraLauncher+ return PyGhidraLauncher.has_launched()def _get_language(id: str) -> "Language":@@ -137,7 +137,7 @@ def _setup_project(def _setup_script(project: "GhidraProject", program: "Program"):- from pyhidra.script import PyGhidraScript+ from pyghidra.script import PyGhidraScriptfrom ghidra.app.script import GhidraStatefrom ghidra.program.util import ProgramLocationfrom ghidra.util.task import TaskMonitor@@ -205,10 +205,10 @@ def open_program(:raises TypeError: If the provided loader does not implement `ghidra.app.util.opinion.Loader`."""- from pyhidra.launcher import PyhidraLauncher, HeadlessPyhidraLauncher+ from pyghidra.launcher import PyGhidraLauncher, HeadlessPyGhidraLauncher- if not PyhidraLauncher.has_launched():- HeadlessPyhidraLauncher().start()+ if not PyGhidraLauncher.has_launched():+ HeadlessPyGhidraLauncher().start()from ghidra.app.script import GhidraScriptUtilfrom ghidra.program.flatapi import FlatProgramAPI@@ -273,10 +273,10 @@ def _flat_api(:raises ValueError: If the provided language, compiler or loader is invalid.:raises TypeError: If the provided loader does not implement `ghidra.app.util.opinion.Loader`."""- from pyhidra.launcher import PyhidraLauncher, HeadlessPyhidraLauncher+ from pyghidra.launcher import PyGhidraLauncher, HeadlessPyGhidraLauncher- if not PyhidraLauncher.has_launched():- HeadlessPyhidraLauncher(verbose=verbose, install_dir=install_dir).start()+ if not PyGhidraLauncher.has_launched():+ HeadlessPyGhidraLauncher(verbose=verbose, install_dir=install_dir).start()project, program = None, Noneif binary_path or project_location:diff --git a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/ghidra_launch.py b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/ghidra_launch.pysimilarity index 96%rename from Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/ghidra_launch.pyrename to Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/ghidra_launch.pyindex c985f03005..890f677aa6 100644--- a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/ghidra_launch.py+++ b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/ghidra_launch.py@@ -4,10 +4,10 @@ from pathlib import Pathimport sysimport threading-from .launcher import PyhidraLauncher, _run_mac_app+from .launcher import PyGhidraLauncher, _run_mac_app-class GhidraLauncher(PyhidraLauncher):+class GhidraLauncher(PyGhidraLauncher):def __init__(self, verbose=False, class_name=str, gui=False, *, install_dir: Path = None):super().__init__(verbose=verbose, install_dir=install_dir)diff --git a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/ghidradoc.py b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/ghidradoc.pysimilarity index 98%rename from Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/ghidradoc.pyrename to Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/ghidradoc.pyindex 7cef49ca2f..e0b3eded73 100644--- a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/ghidradoc.py+++ b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/ghidradoc.py@@ -50,14 +50,14 @@ class _Helper:self.msg += " # Perform headless processing\n"self.msg += " headless.processLocal(...)\n\n"else:- # PyhidraPlugin scenario+ # PyGhidraPlugin scenarioself.msg = "Press 'F1' for usage instructions"def __call__(self, param=None):def get_class_and_method(param):if param is None and not SystemUtilities.isInHeadlessMode():- # Enable help() in PyhidraPlugin scenario to show help for GhidraScript+ # Enable help() in PyGhidraPlugin scenario to show help for GhidraScriptreturn "ghidra.app.script.GhidraScript", Noneclass_name = Nonemethod_name = Nonediff --git a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/gui.py b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/gui.pysimilarity index 92%rename from Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/gui.pyrename to Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/gui.pyindex adbd7cc33c..aba4facd7d 100644--- a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/gui.py+++ b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/gui.py@@ -8,7 +8,7 @@ import tracebackfrom typing import List, NoReturnimport warnings-import pyhidra+import pyghidraclass _GuiOutput(io.StringIO):@@ -44,7 +44,7 @@ def _gui_mac() -> NoReturn:path = Path(sys.base_exec_prefix) / "Resources/Python.app/Contents/MacOS/Python"if path.exists():# the python launcher app will correctly start the venv if sys.executable is in a venv- argv = [sys.executable, "-m", "pyhidra", "-g"]+ argv = [sys.executable, "-m", "pyghidra", "-g"]if install_dir is not None:argv += ["--install-dir", str(install_dir)]actions = ((os.POSIX_SPAWN_CLOSE, 0), (os.POSIX_SPAWN_CLOSE, 1), (os.POSIX_SPAWN_CLOSE, 2))@@ -55,7 +55,7 @@ def _gui_mac() -> NoReturn:def _parse_args():- parser = _GuiArgumentParser(prog="pyhidraw")+ parser = _GuiArgumentParser(prog="pyghidraw")parser.add_argument("--install-dir",type=Path,@@ -133,7 +133,7 @@ def gui(install_dir: Path = None, vm_args: List[str] = None):(Defaults to the GHIDRA_INSTALL_DIR environment variable):param vm_args: Additional vm arguments to be passed ot the JVM."""- launcher = pyhidra.GuiPyhidraLauncher(install_dir=install_dir)+ launcher = pyghidra.GuiPyGhidraLauncher(install_dir=install_dir)if vm_args:launcher.vm_args += vm_argslauncher.start()@@ -141,8 +141,8 @@ def gui(install_dir: Path = None, vm_args: List[str] = None):def get_current_interpreter():warnings.warn(- "get_current_interpreter has been moved. Please use pyhidra.get_current_interpreter",+ "get_current_interpreter has been moved. Please use pyghidra.get_current_interpreter",DeprecationWarning)- return pyhidra.get_current_interpreter()+ return pyghidra.get_current_interpreter()diff --git a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/internal/__init__.py b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/internal/__init__.pysimilarity index 100%rename from Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/internal/__init__.pyrename to Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/internal/__init__.pydiff --git a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/internal/plugin/__init__.py b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/internal/plugin/__init__.pysimilarity index 100%rename from Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/internal/plugin/__init__.pyrename to Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/internal/plugin/__init__.pydiff --git a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/internal/plugin/completions.py b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/internal/plugin/completions.pysimilarity index 100%rename from Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/internal/plugin/completions.pyrename to Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/internal/plugin/completions.pydiff --git a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/internal/plugin/plugin.py b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/internal/plugin/plugin.pysimilarity index 95%rename from Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/internal/plugin/plugin.pyrename to Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/internal/plugin/plugin.pyindex d5f8d9bbc8..ede8375080 100644--- a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/internal/plugin/plugin.py+++ b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/internal/plugin/plugin.py@@ -9,8 +9,8 @@ import typesfrom code import InteractiveConsolefrom ghidra.framework import Application-from ghidra.pyhidra import PyhidraScriptProvider, PyhidraPlugin-from ghidra.pyhidra.interpreter import PyhidraConsole+from ghidra.pyghidra import PyGhidraScriptProvider, PyGhidraPlugin+from ghidra.pyghidra.interpreter import PyGhidraConsolefrom java.io import BufferedReader, InputStreamReaderfrom java.lang import Stringfrom java.lang import Thread as JThread@@ -18,8 +18,8 @@ from java.util import Collectionsfrom java.util.function import Consumerfrom jpype import JClass, JImplements, JOverride-from pyhidra.internal.plugin.completions import PythonCodeCompleter-from pyhidra.script import PyGhidraScript+from pyghidra.internal.plugin.completions import PythonCodeCompleter+from pyghidra.script import PyGhidraScriptlogger = logging.getLogger(__name__)@@ -125,15 +125,15 @@ class ConsoleState(enum.Enum):RESET = enum.auto()-@JImplements(PyhidraConsole)+@JImplements(PyGhidraConsole)class PyConsole(InteractiveConsole):"""- Pyhidra Interactive Console+ PyGhidra Interactive Console"""_WORD_PATTERN = re.compile(r".*?([\w\.]+)\Z") # get the last word, including '.', from the right- def __init__(self, py_plugin: PyhidraPlugin):+ def __init__(self, py_plugin: PyGhidraPlugin):super().__init__(locals=PyGhidraScript(py_plugin.script))appVersion = Application.getApplicationVersion()appName = Application.getApplicationReleaseName()@@ -314,11 +314,11 @@ class PyConsole(InteractiveConsole):return Collections.emptyList()-def _init_plugin(plugin: PyhidraPlugin):+def _init_plugin(plugin: PyGhidraPlugin):console = PyConsole(plugin)plugin.interpreter.init(console)def setup_plugin():- PyhidraPlugin.setInitializer(Consumer @ _init_plugin)- PyhidraScriptProvider.setScriptRunner(Consumer @ _run_script)+ PyGhidraPlugin.setInitializer(Consumer @ _init_plugin)+ PyGhidraScriptProvider.setScriptRunner(Consumer @ _run_script)diff --git a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/javac.py b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/javac.pysimilarity index 100%rename from Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/javac.pyrename to Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/javac.pydiff --git a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/launcher.py b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/launcher.pysimilarity index 95%rename from Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/launcher.pyrename to Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/launcher.pyindex 6d43950037..fa510e6833 100644--- a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/launcher.py+++ b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/launcher.py@@ -76,7 +76,7 @@ def _load_entry_points(group: str, *args):logger.error(f"Failed to run {group} entry point {name} with error: {e}")-class _PyhidraImportLoader:+class _PyGhidraImportLoader:""" (internal) Finder hook for importlib to handle Python mod conflicts. """def find_spec(self, name, path, target=None):@@ -101,7 +101,7 @@ def _plugin_lock():File lock for processing plugins"""from java.io import RandomAccessFile- path = Path(tempfile.gettempdir()) / "pyhidra_plugin_lock"+ path = Path(tempfile.gettempdir()) / "pyghidra_plugin_lock"try:# Python doesn't have a file lock except for unix systems# so use the one available in Java instead of adding on@@ -117,19 +117,19 @@ def _plugin_lock():path.unlink()except:# if it fails it's ok- # another pyhidra process has the lock+ # another pyghidra process has the lock# it will be removed by said process when donepass-class PyhidraLauncher:+class PyGhidraLauncher:"""- Base pyhidra launcher+ Base pyghidra launcher"""def __init__(self, verbose=False, *, install_dir: Path = None):"""- Initializes a new `PyhidraLauncher`.+ Initializes a new `PyGhidraLauncher`.:param verbose: True to enable verbose output when starting Ghidra.:param install_dir: Ghidra installation directory.@@ -296,10 +296,10 @@ class PyhidraLauncher:# dev modereturn install_dir- path = install_dir / "Ghidra" / "Features" / "Pyhidra" / "lib" / "Pyhidra.jar"+ path = install_dir / "Ghidra" / "Features" / "PyGhidra" / "lib" / "PyGhidra.jar"if not path.exists():- msg = "The Ghidra installation does not contain the Pyhidra module\n" + \+ msg = "The Ghidra installation does not contain the PyGhidra module\n" + \f"{path} does not exist"cls._report_fatal_error("Incorrect Ghidra installation directory", msg, ValueError(msg))@@ -344,12 +344,12 @@ class PyhidraLauncher:Run setup entry points, start the JVM and prepare ghidra imports"""# Before starting up, give launcher to installed entry points so they can do their thing.- _load_entry_points("pyhidra.setup", self)+ _load_entry_points("pyghidra.setup", self)# Merge classpathjpype_kwargs['classpath'] = self.class_path + jpype_kwargs.get('classpath', [])- # force convert strings (required by pyhidra)+ # force convert strings (required by pyghidra)jpype_kwargs['convertStrings'] = True# set the JAVA_HOME environment variable to the correct one so jpype uses it@@ -357,7 +357,7 @@ class PyhidraLauncher:jpype_kwargs['ignoreUnrecognized'] = True- if os.getenv("PYHIDRA_DEBUG"):+ if os.getenv("PYGHIDRA_DEBUG"):debug = "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=127.0.0.1:18001"self.vm_args.insert(0, debug)@@ -368,7 +368,7 @@ class PyhidraLauncher:)# Install hook into python importlib- sys.meta_path.append(_PyhidraImportLoader())+ sys.meta_path.append(_PyGhidraImportLoader())imports.registerDomain("ghidra")@@ -384,11 +384,11 @@ class PyhidraLauncher:- # remove any installed pyhidra extension+ # remove any old installed pyhidra extension# if left in place Ghidra will fail to start with a confusing# and unrelated error about the InterpreterConsole class not being found# this is only needed for those using a DEV build of Ghidra- # who also have pyhidra installed.+ # who also have and old version of pyhidra installed.# however, this took an unnecessary amount of time to debugself.uninstall_plugin("pyhidra")@@ -404,7 +404,7 @@ class PyhidraLauncher:self._layout = GhidraLauncher.initializeGhidraEnvironment()# import it at the end so interfaces in our java code may be implemented- from pyhidra.internal.plugin.plugin import setup_plugin+ from pyghidra.internal.plugin.plugin import setup_pluginsetup_plugin()# Add extra class paths@@ -432,7 +432,7 @@ class PyhidraLauncher:# import properties to register the property customizerfrom . import properties as _- _load_entry_points("pyhidra.pre_launch")+ _load_entry_points("pyghidra.pre_launch")def start(self, **jpype_kwargs):"""@@ -548,9 +548,9 @@ class PyhidraLauncher:return Application.isInitialized()-class DeferredPyhidraLauncher(PyhidraLauncher):+class DeferredPyGhidraLauncher(PyGhidraLauncher):"""- PyhidraLauncher which allows full Ghidra initialization to be deferred.+ PyGhidraLauncher which allows full Ghidra initialization to be deferred.initialize_ghidra must be called before all Ghidra classes are fully available."""@@ -571,9 +571,9 @@ class DeferredPyhidraLauncher(PyhidraLauncher):GhidraRun().launch(self._layout, self.args)-class HeadlessPyhidraLauncher(PyhidraLauncher):+class HeadlessPyGhidraLauncher(PyGhidraLauncher):"""- Headless pyhidra launcher+ Headless pyghidra launcher"""def _launch(self):@@ -583,7 +583,7 @@ class HeadlessPyhidraLauncher(PyhidraLauncher):Application.initializeApplication(self._layout, config)-class _PyhidraStdOut:+class _PyGhidraStdOut:def __init__(self, stream):self._stream = stream@@ -615,9 +615,9 @@ class _PyhidraStdOut:return self._stream.write(s)-class GuiPyhidraLauncher(PyhidraLauncher):+class GuiPyGhidraLauncher(PyGhidraLauncher):"""- GUI pyhidra launcher+ GUI pyghidra launcher"""@classmethod@@ -647,8 +647,8 @@ class GuiPyhidraLauncher(PyhidraLauncher):appid = ctypes.c_wchar_p(self.app_info.name)ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(appid)- stdout = _PyhidraStdOut(sys.stdout)- stderr = _PyhidraStdOut(sys.stderr)+ stdout = _PyGhidraStdOut(sys.stdout)+ stderr = _PyGhidraStdOut(sys.stderr)with contextlib.redirect_stdout(stdout), contextlib.redirect_stderr(stderr):Thread(lambda: Ghidra.main(["ghidra.GhidraRun", *self.args])).start()is_exiting = threading.Event()diff --git a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/properties.py b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/properties.pysimilarity index 91%rename from Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/properties.pyrename to Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/properties.pyindex 61008f9035..314df44a16 100644--- a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/properties.py+++ b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/properties.py@@ -14,10 +14,10 @@ class _JavaObject:if isinstance(self, jpype.JException):# don't process any exceptionsreturn- exposer = jpype.JClass("ghidra.pyhidra.PythonFieldExposer")+ exposer = jpype.JClass("ghidra.pyghidra.PythonFieldExposer")if exposer.class_.isAssignableFrom(self.class_):return- utils = jpype.JClass("ghidra.pyhidra.property.PropertyUtils")+ utils = jpype.JClass("ghidra.pyghidra.property.PropertyUtils")for prop in utils.getProperties(self.class_):field = prop.fieldif keyword.iskeyword(field):diff --git a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/script.py b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/script.pysimilarity index 93%rename from Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/script.pyrename to Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/script.pyindex 9e4a79e1d6..acaeb472e9 100644--- a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/script.py+++ b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/script.py@@ -12,7 +12,7 @@ from jpype import JClass, JImplementationForfrom typing import List-from pyhidra import debug_callback+from pyghidra import debug_callback_NO_ATTRIBUTE = object()@@ -70,12 +70,12 @@ class _JavaProperty(property):#pylint: disable=too-few-public-methods-@JImplementationFor("ghidra.pyhidra.PythonFieldExposer")+@JImplementationFor("ghidra.pyghidra.PythonFieldExposer")class _PythonFieldExposer:#pylint: disable=no-memberdef __jclass_init__(self):- exposer = JClass("ghidra.pyhidra.PythonFieldExposer")+ exposer = JClass("ghidra.pyghidra.PythonFieldExposer")if self.class_ == exposer:returntry:@@ -135,8 +135,8 @@ class PyGhidraScript(dict):def __init__(self, jobj=None):super().__init__()if jobj is None:- from ghidra.pyhidra import PyhidraScriptProvider- jobj = PyhidraScriptProvider().getScriptInstance(None, None)+ from ghidra.pyghidra import PyGhidraScriptProvider+ jobj = PyGhidraScriptProvider().getScriptInstance(None, None)self._script = jobjglobal _headless_interpreter@@ -258,7 +258,7 @@ class PyGhidraScript(dict):def get_current_interpreter():"""- Gets the underlying GhidraScript for the focused Pyhidra InteractiveConsole.+ Gets the underlying GhidraScript for the focused PyGhidra InteractiveConsole.This will always return None unless it is being access from a functioncalled from within the interactive console.@@ -274,8 +274,8 @@ def get_current_interpreter():if SystemUtilities.isInHeadlessMode():if _headless_interpreter is None:# one hasn't been created yet so make one now- PyhidraScriptProvider = JClass("ghidra.pyhidra.PyhidraScriptProvider")- _headless_interpreter = PyhidraScriptProvider.PyhidraHeadlessScript()+ PyGhidraScriptProvider = JClass("ghidra.pyghidra.PyGhidraScriptProvider")+ _headless_interpreter = PyGhidraScriptProvider.PyGhidraHeadlessScript()return _headless_interpreterproject = AppInfo.getActiveProject()@@ -293,7 +293,7 @@ def get_current_interpreter():return Nonefor plugin in tool.getManagedPlugins():- if plugin.name == 'PyhidraPlugin':+ if plugin.name == 'PyGhidraPlugin':return plugin.scriptexcept ImportError:diff --git a/Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/version.py b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/version.pysimilarity index 100%rename from Ghidra/Features/Pyhidra/src/main/py/src/pyhidra/version.pyrename to Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/version.pydiff --git a/Ghidra/Features/Pyhidra/src/main/py/tests/data/bad_plugin/BadPluginClass.java b/Ghidra/Features/PyGhidra/src/main/py/tests/data/bad_plugin/BadPluginClass.javasimilarity index 86%rename from Ghidra/Features/Pyhidra/src/main/py/tests/data/bad_plugin/BadPluginClass.javarename to Ghidra/Features/PyGhidra/src/main/py/tests/data/bad_plugin/BadPluginClass.javaindex 92ddc11555..2b90059eab 100644--- a/Ghidra/Features/Pyhidra/src/main/py/tests/data/bad_plugin/BadPluginClass.java+++ b/Ghidra/Features/PyGhidra/src/main/py/tests/data/bad_plugin/BadPluginClass.java@@ -1,4 +1,4 @@-package ghidra.pyhidra.test;+package ghidra.pyghidra.test;/*** This is a bad class that will fail to compile.diff --git a/Ghidra/Features/Pyhidra/src/main/py/tests/data/example_script.py b/Ghidra/Features/PyGhidra/src/main/py/tests/data/example_script.pysimilarity index 100%rename from Ghidra/Features/Pyhidra/src/main/py/tests/data/example_script.pyrename to Ghidra/Features/PyGhidra/src/main/py/tests/data/example_script.pydiff --git a/Ghidra/Features/Pyhidra/src/main/py/tests/data/good_plugin/DummyTestRecognizer.java b/Ghidra/Features/PyGhidra/src/main/py/tests/data/good_plugin/DummyTestRecognizer.javasimilarity index 89%rename from Ghidra/Features/Pyhidra/src/main/py/tests/data/good_plugin/DummyTestRecognizer.javarename to Ghidra/Features/PyGhidra/src/main/py/tests/data/good_plugin/DummyTestRecognizer.javaindex 399046c8ef..b325b71391 100644--- a/Ghidra/Features/Pyhidra/src/main/py/tests/data/good_plugin/DummyTestRecognizer.java+++ b/Ghidra/Features/PyGhidra/src/main/py/tests/data/good_plugin/DummyTestRecognizer.java@@ -1,9 +1,9 @@-package ghidra.pyhidra.test;+package ghidra.pyghidra.test;import ghidra.app.util.recognizer.Recognizer;/**- * Simple ExtensionPoint class for pyhidra plugin test.+ * Simple ExtensionPoint class for PyGhidra plugin test.** This can be any ExtensionPoint. Recognizer was chosen here* because it has a small number of methods and hasn't changed in a long time.diff --git a/Ghidra/Features/Pyhidra/src/main/py/tests/data/import_test_script.py b/Ghidra/Features/PyGhidra/src/main/py/tests/data/import_test_script.pysimilarity index 100%rename from Ghidra/Features/Pyhidra/src/main/py/tests/data/import_test_script.pyrename to Ghidra/Features/PyGhidra/src/main/py/tests/data/import_test_script.pydiff --git a/Ghidra/Features/Pyhidra/src/main/py/tests/data/programless_script.py b/Ghidra/Features/PyGhidra/src/main/py/tests/data/programless_script.pysimilarity index 100%rename from Ghidra/Features/Pyhidra/src/main/py/tests/data/programless_script.pyrename to Ghidra/Features/PyGhidra/src/main/py/tests/data/programless_script.pydiff --git a/Ghidra/Features/Pyhidra/src/main/py/tests/data/projectless_script.py b/Ghidra/Features/PyGhidra/src/main/py/tests/data/projectless_script.pysimilarity index 100%rename from Ghidra/Features/Pyhidra/src/main/py/tests/data/projectless_script.pyrename to Ghidra/Features/PyGhidra/src/main/py/tests/data/projectless_script.pydiff --git a/Ghidra/Features/Pyhidra/src/main/py/tests/test_argparser.py b/Ghidra/Features/PyGhidra/src/main/py/tests/test_argparser.pysimilarity index 96%rename from Ghidra/Features/Pyhidra/src/main/py/tests/test_argparser.pyrename to Ghidra/Features/PyGhidra/src/main/py/tests/test_argparser.pyindex 0ceb3290a8..b010876798 100644--- a/Ghidra/Features/Pyhidra/src/main/py/tests/test_argparser.py+++ b/Ghidra/Features/PyGhidra/src/main/py/tests/test_argparser.py@@ -2,9 +2,9 @@ from pathlib import Pathfrom typing import List, Tupleimport pytest-from pyhidra.__main__ import _get_parser, PyhidraArgs-from pyhidra.ghidra_launch import ParsedArgs-from pyhidra.ghidra_launch import get_parser as get_ghidra_launcher_parser+from pyghidra.__main__ import _get_parser, PyGhidraArgs+from pyghidra.ghidra_launch import ParsedArgs+from pyghidra.ghidra_launch import get_parser as get_ghidra_launcher_parserPROJECT_NAME = "stub_name"@@ -20,9 +20,9 @@ def exe_file(shared_datadir: Path):class TestArgParser:- def parse(self, *args) -> PyhidraArgs:+ def parse(self, *args) -> PyGhidraArgs:parser = _get_parser()- parser_args = PyhidraArgs(parser)+ parser_args = PyGhidraArgs(parser)args = [str(arg) for arg in args]parser.parse_args(args, namespace=parser_args)return parser_argsdiff --git a/Ghidra/Features/Pyhidra/src/main/py/tests/test_core.py b/Ghidra/Features/PyGhidra/src/main/py/tests/test_core.pysimilarity index 81%rename from Ghidra/Features/Pyhidra/src/main/py/tests/test_core.pyrename to Ghidra/Features/PyGhidra/src/main/py/tests/test_core.pyindex cdf5c5f1b2..0bc74cdf05 100644--- a/Ghidra/Features/Pyhidra/src/main/py/tests/test_core.py+++ b/Ghidra/Features/PyGhidra/src/main/py/tests/test_core.py@@ -4,7 +4,7 @@ import textwrapimport importlibimport sysimport jpype-import pyhidra+import pyghidraimport pytestEXE_NAME = "strings.exe"@@ -23,7 +23,7 @@ def class_file(shared_datadir: Path):def test_invalid_jpype_keyword_arg():assert not jpype.isJVMStarted()- launcher = pyhidra.launcher.HeadlessPyhidraLauncher()+ launcher = pyghidra.launcher.HeadlessPyGhidraLauncher()with pytest.raises(TypeError) as ex:launcher.start(someBogusKeywordArg=True)assert "startJVM() got an unexpected keyword argument 'someBogusKeywordArg'" in str(ex.value)@@ -32,7 +32,7 @@ def test_invalid_jpype_keyword_arg():def test_invalid_vm_arg_succeed():assert not jpype.isJVMStarted()- launcher = pyhidra.launcher.HeadlessPyhidraLauncher()+ launcher = pyghidra.launcher.HeadlessPyGhidraLauncher()launcher.add_vmargs('-XX:SomeBogusJvmArg')launcher.start(ignoreUnrecognized=True)@@ -40,7 +40,7 @@ def test_invalid_vm_arg_succeed():def test_run_script(capsys, shared_datadir: Path):strings_exe = shared_datadir / EXE_NAMEscript_path = shared_datadir / "example_script.py"- pyhidra.run_script(strings_exe, script_path, script_args=["my", "--commands"], analyze=False)+ pyghidra.run_script(strings_exe, script_path, script_args=["my", "--commands"], analyze=False)captured = capsys.readouterr()assert captured.err == ""@@ -56,7 +56,7 @@ def test_run_script(capsys, shared_datadir: Path):def test_open_program(shared_datadir: Path):strings_exe = shared_datadir / EXE_NAME- with pyhidra.open_program(strings_exe, analyze=False, language=TEST_LANGUAGE, compiler=TEST_COMPILER) as flat_api:+ with pyghidra.open_program(strings_exe, analyze=False, language=TEST_LANGUAGE, compiler=TEST_COMPILER) as flat_api:assert flat_api.currentProgram.name == strings_exe.nameassert flat_api.getCurrentProgram().listingassert flat_api.getCurrentProgram().changeable@@ -65,7 +65,7 @@ def test_open_program(shared_datadir: Path):def test_bad_language(shared_datadir: Path):strings_exe = shared_datadir / EXE_NAMEwith pytest.raises(ValueError):- with pyhidra.open_program(+ with pyghidra.open_program(strings_exe,analyze=False,language="invalid"@@ -76,7 +76,7 @@ def test_bad_language(shared_datadir: Path):def test_bad_compiler(shared_datadir: Path):strings_exe = shared_datadir / EXE_NAMEwith pytest.raises(ValueError):- with pyhidra.open_program(+ with pyghidra.open_program(strings_exe,analyze=False,language=TEST_LANGUAGE,@@ -87,19 +87,19 @@ def test_bad_compiler(shared_datadir: Path):def test_no_compiler(shared_datadir: Path):strings_exe = shared_datadir / EXE_NAME- with pyhidra.open_program(strings_exe, analyze=False, language=TEST_LANGUAGE) as flat_api:+ with pyghidra.open_program(strings_exe, analyze=False, language=TEST_LANGUAGE) as flat_api:passdef test_no_language_with_compiler(shared_datadir: Path):strings_exe = shared_datadir / EXE_NAME- with pyhidra.open_program(strings_exe, analyze=False, compiler=TEST_COMPILER) as flat_api:+ with pyghidra.open_program(strings_exe, analyze=False, compiler=TEST_COMPILER) as flat_api:passdef test_loader(shared_datadir: Path):strings_exe = shared_datadir / EXE_NAME- with pyhidra.open_program(+ with pyghidra.open_program(strings_exe,analyze=False,language="DATA:LE:64:default",@@ -112,7 +112,7 @@ def test_loader(shared_datadir: Path):def test_invalid_loader(shared_datadir: Path):strings_exe = shared_datadir / EXE_NAMEwith pytest.raises(ValueError):- with pyhidra.open_program(+ with pyghidra.open_program(strings_exe,analyze=False,language="DATA:LE:64:default",@@ -125,7 +125,7 @@ def test_invalid_loader(shared_datadir: Path):def test_invalid_loader_type(shared_datadir: Path):strings_exe = shared_datadir / EXE_NAMEwith pytest.raises(TypeError):- with pyhidra.open_program(+ with pyghidra.open_program(strings_exe,analyze=False,language="DATA:LE:64:default",@@ -136,7 +136,7 @@ def test_invalid_loader_type(shared_datadir: Path):def test_no_project(capsys, shared_datadir: Path):- pyhidra.run_script(None, shared_datadir / "projectless_script.py")+ pyghidra.run_script(None, shared_datadir / "projectless_script.py")captured = capsys.readouterr()assert captured.out.rstrip() == "projectless_script executed successfully"@@ -145,14 +145,14 @@ def test_no_program(capsys, shared_datadir: Path):script_path = shared_datadir / "programless_script.py"project_path = shared_datadir / "programless_ghidra"- pyhidra.run_script(None, script_path, project_path, "programless")+ pyghidra.run_script(None, script_path, project_path, "programless")captured = capsys.readouterr()assert captured.out.rstrip() == "programless_script executed successfully"def test_import_script(capsys, shared_datadir: Path):script_path = shared_datadir / "import_test_script.py"- pyhidra.run_script(None, script_path)+ pyghidra.run_script(None, script_path)captured = capsys.readouterr()assert captured.out.rstrip() == "imported successfully"@@ -176,16 +176,16 @@ def test_import_ghidra_base_java_packages():def wrap_mod(mod):return mod + '_'- launcher = pyhidra.start()+ launcher = pyghidra.start()- # Test to ensure _PyhidraImportLoader is last loader- assert isinstance(sys.meta_path[-1], pyhidra.launcher._PyhidraImportLoader)+ # Test to ensure _PyGhidraImportLoader is last loader+ assert isinstance(sys.meta_path[-1], pyghidra.launcher._PyGhidraImportLoader)packages = get_runtime_top_level_java_packages(launcher)assert len(packages) > 0- # Test full coverage for Java base packages (_JImportLoader or _PyhidraImportLoader)+ # Test full coverage for Java base packages (_JImportLoader or _PyGhidraImportLoader)for mod in packages:# check spec using standard import machinery "import mod"spec = importlib.util.find_spec(mod)@@ -195,13 +195,13 @@ def test_import_ghidra_base_java_packages():assert spec is not Noneassert isinstance(spec.loader, jpype.imports._JImportLoader) or isinstance(- spec.loader, pyhidra.launcher._PyhidraImportLoader)+ spec.loader, pyghidra.launcher._PyGhidraImportLoader)# Test all Java base packages are available with '_'for mod in packages:spec_ = importlib.util.find_spec(wrap_mod(mod))assert spec_ is not None- assert isinstance(spec_.loader, pyhidra.launcher._PyhidraImportLoader)+ assert isinstance(spec_.loader, pyghidra.launcher._PyGhidraImportLoader)# Test standard importimport ghidra@@ -209,7 +209,7 @@ def test_import_ghidra_base_java_packages():# Test import with conflictimport pdb_- assert isinstance(pdb_.__loader__, pyhidra.launcher._PyhidraImportLoader)+ assert isinstance(pdb_.__loader__, pyghidra.launcher._PyGhidraImportLoader)# Test "from" import with conflictfrom pdb_ import PdbPlugindiff --git a/Ghidra/Features/Pyhidra/src/main/py/tests/test_plugin.py b/Ghidra/Features/PyGhidra/src/main/py/tests/test_plugin.pysimilarity index 83%rename from Ghidra/Features/Pyhidra/src/main/py/tests/test_plugin.pyrename to Ghidra/Features/PyGhidra/src/main/py/tests/test_plugin.pyindex c030f651c1..7d514f9b8a 100644--- a/Ghidra/Features/Pyhidra/src/main/py/tests/test_plugin.py+++ b/Ghidra/Features/PyGhidra/src/main/py/tests/test_plugin.py@@ -5,7 +5,7 @@ from pathlib import Pathimport typingimport jpype-import pyhidra+import pyghidraimport pytest@@ -13,8 +13,8 @@ import pytestpytestmark = pytest.mark.plugin-SETUP_KEY = "pyhidra.setup"-PRE_LAUNCH_KEY = "pyhidra.pre_launch"+SETUP_KEY = "pyghidra.setup"+PRE_LAUNCH_KEY = "pyghidra.pre_launch"NAME_KEY = "names"@@ -30,10 +30,10 @@ class PluginTest:ran_setup = Falseran_prelaunch = False- details: pyhidra.ExtensionDetails = None+ details: pyghidra.ExtensionDetails = Nonedef __init_subclass__(cls) -> None:- cls.details = pyhidra.ExtensionDetails(+ cls.details = pyghidra.ExtensionDetails(name=cls.__name__,description="Test Plugin",author=""@@ -43,7 +43,7 @@ class PluginTest:_prelaunch = cls.prelaunch@functools.wraps(_setup)- def setup(launcher: pyhidra.HeadlessPyhidraLauncher):+ def setup(launcher: pyghidra.HeadlessPyGhidraLauncher):_setup(launcher)cls.ran_setup = True@@ -62,7 +62,7 @@ class PluginTest:@classmethod@abc.abstractmethod- def setup(cls, launcher: pyhidra.HeadlessPyhidraLauncher):+ def setup(cls, launcher: pyghidra.HeadlessPyGhidraLauncher):...@classmethod@@ -110,7 +110,7 @@ def with_ghidra():"""_monkey_patch_entry_points()try:- launcher = pyhidra.HeadlessPyhidraLauncher()+ launcher = pyghidra.HeadlessPyGhidraLauncher()launcher.start()yield # can't yield Nonefinally:@@ -128,29 +128,29 @@ def with_ghidra():class TestValidPlugin(PluginTest):@classmethod- def setup(cls, launcher: pyhidra.HeadlessPyhidraLauncher):+ def setup(cls, launcher: pyghidra.HeadlessPyGhidraLauncher):source_path = Path(__file__).parent / "data" / "good_plugin"launcher.install_plugin(source_path, cls.details)@classmethoddef prelaunch(cls):- DummyTestRecognizer = jpype.JClass("ghidra.pyhidra.test.DummyTestRecognizer")+ DummyTestRecognizer = jpype.JClass("ghidra.pyghidra.test.DummyTestRecognizer")DummyTestRecognizer.preLaunchInitialized = True@classmethoddef test_extension_point(cls):from ghidra.app.util.recognizer import Recognizerfrom ghidra.util.classfinder import ClassSearcher- DummyTestRecognizer = jpype.JClass("ghidra.pyhidra.test.DummyTestRecognizer")+ DummyTestRecognizer = jpype.JClass("ghidra.pyghidra.test.DummyTestRecognizer")assert DummyTestRecognizer in ClassSearcher.getClasses(Recognizer)class TestBadPlugin(PluginTest):- launcher: pyhidra.HeadlessPyhidraLauncher = None+ launcher: pyghidra.HeadlessPyGhidraLauncher = None@classmethod- def setup(cls, launcher: pyhidra.HeadlessPyhidraLauncher):+ def setup(cls, launcher: pyghidra.HeadlessPyGhidraLauncher):source_path = Path(__file__).parent / "data" / "bad_plugin"launcher.install_plugin(source_path, cls.details)cls.launcher = launcherdiff --git a/Ghidra/Features/Pyhidra/src/test.slow/java/ghidra/pyhidra/PyhidraPluginTest.java b/Ghidra/Features/PyGhidra/src/test.slow/java/ghidra/pyghidra/PyGhidraPluginTest.javasimilarity index 82%rename from Ghidra/Features/Pyhidra/src/test.slow/java/ghidra/pyhidra/PyhidraPluginTest.javarename to Ghidra/Features/PyGhidra/src/test.slow/java/ghidra/pyghidra/PyGhidraPluginTest.javaindex 139a81cdcc..8293005781 100644--- a/Ghidra/Features/Pyhidra/src/test.slow/java/ghidra/pyhidra/PyhidraPluginTest.java+++ b/Ghidra/Features/PyGhidra/src/test.slow/java/ghidra/pyghidra/PyGhidraPluginTest.java@@ -13,11 +13,10 @@* See the License for the specific language governing permissions and* limitations under the License.*/-package ghidra.pyhidra;+package ghidra.pyghidra;-import static org.junit.Assert.*;--import org.junit.*;+import org.junit.After;+import org.junit.Before;import ghidra.app.plugin.core.osgi.BundleHost;import ghidra.app.script.GhidraScriptUtil;@@ -28,7 +27,7 @@ import ghidra.test.TestEnv;/*** Tests the Python Plugin functionality.*/-public class PyhidraPluginTest extends AbstractGhidraHeadedIntegrationTest {+public class PyGhidraPluginTest extends AbstractGhidraHeadedIntegrationTest {private TestEnv env;@@ -37,8 +36,8 @@ public class PyhidraPluginTest extends AbstractGhidraHeadedIntegrationTest {env = new TestEnv();PluginTool tool = env.getTool();GhidraScriptUtil.initialize(new BundleHost(), null);- tool.addPlugin(PyhidraPlugin.class.getName());- env.getPlugin(PyhidraPlugin.class);+ tool.addPlugin(PyGhidraPlugin.class.getName());+ env.getPlugin(PyGhidraPlugin.class);}@Afterdiff --git a/Ghidra/Features/Pyhidra/src/test.slow/java/ghidra/pyhidra/PythonScriptInfoTest.java b/Ghidra/Features/PyGhidra/src/test.slow/java/ghidra/pyghidra/PythonScriptInfoTest.javasimilarity index 99%rename from Ghidra/Features/Pyhidra/src/test.slow/java/ghidra/pyhidra/PythonScriptInfoTest.javarename to Ghidra/Features/PyGhidra/src/test.slow/java/ghidra/pyghidra/PythonScriptInfoTest.javaindex d6b6608156..60494b3c5a 100644--- a/Ghidra/Features/Pyhidra/src/test.slow/java/ghidra/pyhidra/PythonScriptInfoTest.java+++ b/Ghidra/Features/PyGhidra/src/test.slow/java/ghidra/pyghidra/PythonScriptInfoTest.java@@ -13,7 +13,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/-package ghidra.pyhidra;+package ghidra.pyghidra;import static org.junit.Assert.*;diff --git a/Ghidra/Features/Pyhidra/src/test/java/ghidra/pyhidra/PythonFieldExposerTest.java b/Ghidra/Features/Pyhidra/src/test/java/ghidra/pyhidra/PythonFieldExposerTest.javadeleted file mode 100644index 7b05a33aac..0000000000--- a/Ghidra/Features/Pyhidra/src/test/java/ghidra/pyhidra/PythonFieldExposerTest.java+++ /dev/null@@ -1,18 +0,0 @@-package ghidra.pyhidra;--import org.junit.Test;--import ghidra.pyhidra.PythonFieldExposer.ExposedField;--import static org.junit.Assert.assertTrue;--import java.util.Map;;--public class PythonFieldExposerTest {-- @Test- public void test() {- Map<String, ExposedField> fields = PythonFieldExposer.getProperties(PyhidraScriptProvider.PyhidraGhidraScript.class);- assertTrue(fields.containsKey("currentProgram"));- }-}diff --git a/Ghidra/Features/Pyhidra/src/test/java/ghidra/pyhidra/property/PropertyUtilsTest.java b/Ghidra/Features/Pyhidra/src/test/java/ghidra/pyhidra/property/PropertyUtilsTest.javadeleted file mode 100644index 8349a741ef..0000000000--- a/Ghidra/Features/Pyhidra/src/test/java/ghidra/pyhidra/property/PropertyUtilsTest.java+++ /dev/null@@ -1,240 +0,0 @@-package ghidra.pyhidra.property;--import java.lang.annotation.ElementType;-import java.lang.annotation.Repeatable;-import java.lang.annotation.Retention;-import java.lang.annotation.RetentionPolicy;-import java.lang.annotation.Target;-import java.util.ArrayList;-import java.util.Arrays;-import java.util.List;--import org.junit.Test;-import org.junit.runner.RunWith;-import org.junit.runners.Parameterized;-import org.junit.runners.Parameterized.Parameters;--import static org.junit.Assert.assertArrayEquals;--@RunWith(Parameterized.class)-public class PropertyUtilsTest {-- @Parameters(name = "{0}")- public static List<Object[]> data() {- return convertData(PropertyUtilsTest.class.getNestMembers());- }-- private final Class<?> cls;-- public PropertyUtilsTest(String name, Class<?> cls) {- this.cls = cls;- }-- private TestResult[] getExpected() {- return Arrays.stream(cls.getAnnotationsByType(ExpectedResult.class))- .map(TestResult::new)- .toArray(TestResult[]::new);- }-- @Test- public void test() {- TestResult[] expected = getExpected();- TestResult[] properties = getProperties(cls);- assertArrayEquals(expected, properties);- }-- private static TestResult[] getProperties(Class<?> cls) {- return Arrays.stream(PropertyUtils.getProperties(cls))- .map(AbstractJavaProperty.class::cast)- .map(TestResult::new)- .toArray(TestResult[]::new);- }-- private static List<Object[]> convertData(Class<?>[] classes) {- List<Object[]> result = new ArrayList<>(classes.length);- for (Class<?> cls : classes) {- if (cls.isRecord() || cls.isAnnotation()) {- continue;- }- result.add(new Object[] { cls.getSimpleName(), cls });- }- return result;- }-- @Retention(RetentionPolicy.RUNTIME)- @Target(ElementType.TYPE)- @Repeatable(ExpectedResults.class)- private static @interface ExpectedResult {- String field();-- boolean getter();-- boolean setter();- }-- @Retention(RetentionPolicy.RUNTIME)- @Target(ElementType.TYPE)- private static @interface ExpectedResults {- ExpectedResult[] value();- }-- private static record TestResult(String field, boolean getter, boolean setter) {- TestResult(AbstractJavaProperty<?> property) {- this(property.field, property.hasGetter(), property.hasValidSetter());- }-- TestResult(ExpectedResult result) {- this(result.field(), result.getter(), result.setter());- }- }-- @ExpectedResult(field = "length", getter = true, setter = false)- public static class TestGetter {- public int getLength() {- return 0;- }- }-- @ExpectedResult(field = "length", getter = false, setter = true)- public static class TestSetter {- public void setLength(int i) {- }- }-- @ExpectedResult(field = "length", getter = true, setter = true)- public static class TestProperty {- public int getLength() {- return 0;- }-- public void setLength(int i) {- }- }-- @ExpectedResult(field = "length", getter = true, setter = true)- public static class TestMultiSetter {- public int getLength() {- return 0;- }-- public void setLength(int i) {- }-- public void setLength(short s) {- }- }-- @ExpectedResult(field = "length", getter = true, setter = true)- public static class TestBoxedMultiSetter {- public int getLength() {- return 0;- }-- public void setLength(int i) {- }-- public void setLength(Integer i) {- }- }-- public static class TestMultiSetterNoGetter {- public void setLength(int i) {- }-- public void setLength(short s) {- }- }-- @ExpectedResult(field = "valid", getter = true, setter = false)- public static class TestIsGetter {- public boolean isValid() {- return true;- }- }-- @ExpectedResult(field = "valid", getter = true, setter = true)- public static class TestIsProperty {- public boolean isValid() {- return true;- }-- public void setValid(boolean valid) {- }- }-- @ExpectedResult(field = "valid", getter = true, setter = false)- public static class TestIsBoxedGetter {- public Boolean isValid() {- return true;- }- }-- @ExpectedResult(field = "valid", getter = true, setter = true)- public static class TestIsBoxedProperty {- public Boolean isValid() {- return true;- }-- public void setValid(boolean valid) {- }- }-- public static class TestBadIsGetter {- public int isValid() {- return 1;- }- }-- public static class TestIsGetterName {- public boolean isvalid() {- return true;- }- }-- public static class TestBadGetterName {- public int getlength() {- return 0;- }- }-- public static class TestBadSetterName {- public void setlength(int i) {- }- }-- public static class TestBadIsTooShortName {- public boolean i() {- return true;- }- }-- public static class TestBadGetTooShortName {- public int ge() {- return 0;- }- }-- public static class TestBadSetTooShortName {- public int se() {- return 0;- }- }-- public static class TestBadIsNoName {- public boolean is() {- return true;- }- }-- public static class TestBadGetNoName {- public int get() {- return 0;- }- }-- public static class TestBadSetNoName {- public int set() {- return 0;- }- }-}diff --git a/Ghidra/RuntimeScripts/Linux/support/pyhidraRun b/Ghidra/RuntimeScripts/Linux/support/pyghidraRunsimilarity index 83%rename from Ghidra/RuntimeScripts/Linux/support/pyhidraRunrename to Ghidra/RuntimeScripts/Linux/support/pyghidraRunindex cc508ee15c..9c3a0fe2f4 100644--- a/Ghidra/RuntimeScripts/Linux/support/pyhidraRun+++ b/Ghidra/RuntimeScripts/Linux/support/pyghidraRun@@ -1,7 +1,7 @@#!/usr/bin/env bash#-----------------------------------------# Pyhidra launch+# PyGhidra launch#----------------------------------------# Resolve symbolic link if present and get the directory this script lives in.@@ -28,6 +28,6 @@ if [ ! -d "${INSTALL_DIR}/Ghidra" ]; thenINSTALL_DIR="${SCRIPT_DIR}/../../../.."fi-PYHIDRA_LAUNCHER="${INSTALL_DIR}/Ghidra/Features/Pyhidra/pyhidraLauncher.py"+PYGHIDRA_LAUNCHER="${INSTALL_DIR}/Ghidra/Features/PyGhidra/pyghidra_launcher.py"-python3 "${PYHIDRA_LAUNCHER}" "${INSTALL_DIR}" ${DEV_ARG} ${VMARG_LIST} "$@"+python3 "${PYGHIDRA_LAUNCHER}" "${INSTALL_DIR}" ${DEV_ARG} ${VMARG_LIST} "$@"diff --git a/Ghidra/RuntimeScripts/Windows/support/pyhidraRun.bat b/Ghidra/RuntimeScripts/Windows/support/pyghidraRun.batsimilarity index 83%rename from Ghidra/RuntimeScripts/Windows/support/pyhidraRun.batrename to Ghidra/RuntimeScripts/Windows/support/pyghidraRun.batindex 19c0d91554..61d48139d6 100644--- a/Ghidra/RuntimeScripts/Windows/support/pyhidraRun.bat+++ b/Ghidra/RuntimeScripts/Windows/support/pyghidraRun.bat@@ -1,4 +1,4 @@-:: Pyhidra launch+:: PyGhidra launch@echo offsetlocal enabledelayedexpansion@@ -32,9 +32,9 @@ if not exist "%INSTALL_DIR%\Ghidra" (set "INSTALL_DIR=%SCRIPT_DIR%\..\..\..\..")-set "PYHIDRA_LAUNCHER=%INSTALL_DIR%\Ghidra\Features\Pyhidra\pyhidraLauncher.py+set "PYGHIDRA_LAUNCHER=%INSTALL_DIR%\Ghidra\Features\PyGhidra\pyghidra_launcher.py-%PYTHON% "%PYHIDRA_LAUNCHER%" "%INSTALL_DIR%" %DEV_ARG% %VMARG_LIST% %*+%PYTHON% "%PYGHIDRA_LAUNCHER%" "%INSTALL_DIR%" %DEV_ARG% %VMARG_LIST% %*:exit1if not %ERRORLEVEL% == 0 (diff --git a/GhidraBuild/BuildFiles/Doclets/src/main/java/ghidra/doclets/typestubs/PythonTypeStubMethod.java b/GhidraBuild/BuildFiles/Doclets/src/main/java/ghidra/doclets/typestubs/PythonTypeStubMethod.javaindex 5509819aa3..b02970320d 100644--- a/GhidraBuild/BuildFiles/Doclets/src/main/java/ghidra/doclets/typestubs/PythonTypeStubMethod.java+++ b/GhidraBuild/BuildFiles/Doclets/src/main/java/ghidra/doclets/typestubs/PythonTypeStubMethod.java@@ -53,8 +53,8 @@ final class PythonTypeStubMethod extends PythonTypeStubElement<ExecutableElementMap.entry("java.math.BigDecimal", "decimal.Decimal")));// FIXME: list and set aren't automatically converted to java.util.List and java.util.Set :(- // if wanted they could be setup to be converted automatically by pyhidra- // however, when passed as a parameter and modified, the original underlyng python container+ // if wanted they could be setup to be converted automatically by PyGhidra+ // however, when passed as a parameter and modified, the original underlying python container// wouldn't be modified. To make it work as expected, a python implementation for// java.util.List and java.util.Set would need to be created using jpype.JImplements,// that would wrap the list/set before passing it to Java instead of copying the contentsdiff --git a/GhidraDocs/InstallationGuide.html b/GhidraDocs/InstallationGuide.htmlindex a558a09dad..9afe827964 100644--- a/GhidraDocs/InstallationGuide.html+++ b/GhidraDocs/InstallationGuide.html@@ -40,7 +40,7 @@ future releases.<li><a href="#RunServer">Ghidra Server</a></li><li><a href="#RunHeadless">Headless (Batch) Mode</a></li><li><a href="#RunJar">Single Jar Mode</a></li>- <li><a href="#RunPyhidra">Pyhidra</a></li>+ <li><a href="#RunPyGhidra">PyGhidra</a></li></ul><li><a href="#Extensions">Extensions</a></li><ul>@@ -102,7 +102,7 @@ Ghidra team if you have a specific need.</p></blockquote><li>Python3 (3.9 to 3.12)</li><ul><li>Python 3.7 to 3.12 for <a href="#DebuggerPython">Debugger support</a></li>- <li>Python 3.9 to 3.12 for <a href="#RunPyhidra">Pyhidra support</a></li>+ <li>Python 3.9 to 3.12 for <a href="#RunPyGhidra">PyGhidra support</a></li><li>This is available from <a href="https://python.org">Python.org</a> or most operating system'sapp stores or software repositories. For Linux it is recommended that the system's packagerepository be used to install a suitable version of Python.</li>@@ -445,8 +445,8 @@ another Java application.</p><p>A single ghidra.jar file can be created using the<i><GhidraInstallDir></i>/support/buildGhidraJar script.</p>-<h3><a name="RunPyhidra"></a>Pyhidra Mode</h3>-<p>Ghidra has integrated the the popular Pyhidra extension to enable native CPython 3 support out of+<h3><a name="RunPyGhidra"></a>PyGhidra Mode</h3>+<p>Ghidra has integrated the the popular PyGhidra extension to enable native CPython 3 support out ofthe box. To enable this support, Ghidra must be launched from a Python environment using speciallaunch scripts.</p><ol>@@ -454,20 +454,20 @@ launch scripts.</p>Navigate to <i><GhidraInstallDir></i>/support/</li><li>- <p>Run <i>pyhidraRun.bat</i> (Windows) or <i>pyhidraRun</i> (Linux or macOS)</p>- <p>If the <b>pyhidra</b> Python module has not yet been installed, the script will offer to+ <p>Run <i>pyghidraRun.bat</i> (Windows) or <i>pyghidraRun</i> (Linux or macOS)</p>+ <p>If the <b>pyghidra</b> Python module has not yet been installed, the script will offer toinstall it for you, along with its dependencies. If you prefer to install it manually, execute:- <pre>python3 -m pip install --no-index -f <i><GhidraInstallDir></i>/Ghidra/Features/Pyhidra/pypkg/dist pyhidra</pre>- <b>NOTE: </b>You may also install and run Pyhidra from within a+ <pre>python3 -m pip install --no-index -f <i><GhidraInstallDir></i>/Ghidra/Features/PyGhidra/pypkg/dist pyghidra</pre>+ <b>NOTE: </b>You may also install and run PyGhidra from within a<a href="https://docs.python.org/3/tutorial/venv.html">virtual environment</a> if you desire.<p>If Ghidra failed to launch, see the <a href="#Troubleshooting">Troubleshooting</a> section.</p></li></ol>-<p>Once Pyhidra has been installed, you are free to use it like any other Python module. You may-import it from other Python scripts, or launch Pyhidra using the <i>pyhidra</i> or <i>pyhidraw</i>-commands. For more information on using Pyhidra, see the-<i><GhidraInstallDir></i>/Ghidra/Features/Pyhidra/Pyhidra_README.html file.</p>+<p>Once PyGhidra has been installed, you are free to use it like any other Python module. You may+import it from other Python scripts, or launch PyGhidra using the <i>pyghidra</i> or <i>pyghidraw</i>+commands. For more information on using PyGhidra, see the+<i><GhidraInstallDir></i>/Ghidra/Features/PyGhidra/PyGhidra_README.html file.</p><p>(<a href="#top">Back to Top</a>)</p>diff --git a/gradle/support/fetchDependencies.gradle b/gradle/support/fetchDependencies.gradleindex 69cf7491af..9360417458 100644--- a/gradle/support/fetchDependencies.gradle+++ b/gradle/support/fetchDependencies.gradle@@ -182,7 +182,7 @@ ext.deps = [name: "setuptools-68.0.0-py3-none-any.whl",url: "https://files.pythonhosted.org/packages/c7/42/be1c7bbdd83e1bfb160c94b9cafd8e25efc7400346cf7ccdbdb452c467fa/setuptools-68.0.0-py3-none-any.whl",sha256: "11e52c67415a381d10d6b462ced9cfb97066179f0e871399e006c4ab101fc85f",- destination: [file("${DEPS_DIR}/Debugger-rmi-trace/"), file("${DEPS_DIR}/Pyhidra/")]+ destination: [file("${DEPS_DIR}/Debugger-rmi-trace/"), file("${DEPS_DIR}/PyGhidra/")]],[name: "wheel-0.37.1-py2.py3-none-any.whl",@@ -218,79 +218,79 @@ ext.deps = [name: "JPype1-1.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",url: "https://files.pythonhosted.org/packages/5d/cf/7b89469bcede4b2fd69c2db7d1d61e8759393cfeec46f7b0c84f5006a691/JPype1-1.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",sha256: "f7aa1469d75f9b310f709b61bb2faa4cef4cbd4d670531ad1d1bb53e29cfda05",- destination: file("${DEPS_DIR}/Pyhidra/")+ destination: file("${DEPS_DIR}/PyGhidra/")],[name: "JPype1-1.5.0-cp39-cp39-win_amd64.whl",url: "https://files.pythonhosted.org/packages/b9/fd/d38a8e401b089adce04c48021ddcb366891d1932db2f7653054feb470ae6/JPype1-1.5.0-cp39-cp39-win_amd64.whl",sha256: "6bfdc101c56cab0b6b16e974fd8cbb0b3f7f14178286b8b55413c5d82d5f2bea",- destination: file("${DEPS_DIR}/Pyhidra/")+ destination: file("${DEPS_DIR}/PyGhidra/")],[name: "JPype1-1.5.0-cp310-cp310-macosx_10_9_universal2.whl",url: "https://files.pythonhosted.org/packages/84/9c/80d5edf6d610f82d0658b6402cdf3f8cdd6a7d4f36afb2149da90e0cad47/JPype1-1.5.0-cp310-cp310-macosx_10_9_universal2.whl",sha256: "7b6b1af3f9e0033080e3532c2686a224cd14706f36c14ef36160a2a1db751a17",- destination: file("${DEPS_DIR}/Pyhidra/")+ destination: file("${DEPS_DIR}/PyGhidra/")],[name: "JPype1-1.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",url: "https://files.pythonhosted.org/packages/74/98/d6517002355b0585d0e66f7b0283c7f6e2271c898a886e1ebac09836b100/JPype1-1.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",sha256: "a02b2f05621c119d35f4acc501b4261eeb48a4af7cc13d9afc2e9eb316c4bd29",- destination: file("${DEPS_DIR}/Pyhidra/")+ destination: file("${DEPS_DIR}/PyGhidra/")],[name: "JPype1-1.5.0-cp310-cp310-win_amd64.whl",url: "https://files.pythonhosted.org/packages/da/5f/253c1c1dba6f7f457b6c3aa2ea9c517287d49764e0ee1042d5818c36e781/JPype1-1.5.0-cp310-cp310-win_amd64.whl",sha256: "0b40c76e075d4fed2c83340bb30b7b95bbc396fd370c564c6b608faab00ea4ef",- destination: file("${DEPS_DIR}/Pyhidra/")+ destination: file("${DEPS_DIR}/PyGhidra/")],[name: "JPype1-1.5.0-cp311-cp311-macosx_10_9_universal2.whl",url: "https://files.pythonhosted.org/packages/98/37/0049866cbfecb879b46d8e9f9b70944624ab17152a282ad5cf60909054ec/JPype1-1.5.0-cp311-cp311-macosx_10_9_universal2.whl",sha256: "85a31b30b482eaf788b21af421e0750aa0be7758307314178143a76632b0ad04",- destination: file("${DEPS_DIR}/Pyhidra/")+ destination: file("${DEPS_DIR}/PyGhidra/")],[name: "JPype1-1.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",url: "https://files.pythonhosted.org/packages/17/1e/7728ae8fb41e8fbf3a7309f8936d07b0b1622f2860733df0e7ec30b1ce76/JPype1-1.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",sha256: "5ef976e0f3b2e9604469f449f30bb2031941a159a0637f4c16adb2c5076f3e81",- destination: file("${DEPS_DIR}/Pyhidra/")+ destination: file("${DEPS_DIR}/PyGhidra/")],[name: "JPype1-1.5.0-cp311-cp311-win_amd64.whl",url: "https://files.pythonhosted.org/packages/1f/19/144f3a767b563ba5c6d4aa534ea1f3fad9a5067c3917df4458a6e1afe0ef/JPype1-1.5.0-cp311-cp311-win_amd64.whl",sha256: "2bc987205ff8d2d8e36dfbef05430e0638e85d4fee1166ba58ebfa6f7a67cdf8",- destination: file("${DEPS_DIR}/Pyhidra/")+ destination: file("${DEPS_DIR}/PyGhidra/")],[name: "JPype1-1.5.0-cp312-cp312-macosx_10_9_universal2.whl",url: "https://files.pythonhosted.org/packages/30/0d/9ac6f0e59427fc5ebf4547c2fdbb38e347b46c2dc20b430490236d037ed8/JPype1-1.5.0-cp312-cp312-macosx_10_9_universal2.whl",sha256: "8714bfaf09d6877160bc7ac97812016ccb09f6d7ba5ea2a9f519178aefcca93f",- destination: file("${DEPS_DIR}/Pyhidra/")+ destination: file("${DEPS_DIR}/PyGhidra/")],[name: "JPype1-1.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",url: "https://files.pythonhosted.org/packages/7d/ed/549766039d17550da6e3fa59ed776a021b400324d7766358d3b6e33d8b28/JPype1-1.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",sha256: "8649b526eccb4047881ad60bdb1974eb71a09cdb7f8bda17c96fdc0f9a3f2d1e",- destination: file("${DEPS_DIR}/Pyhidra/")+ destination: file("${DEPS_DIR}/PyGhidra/")],[name: "JPype1-1.5.0-cp312-cp312-win_amd64.whl",url: "https://files.pythonhosted.org/packages/20/47/9606af72e21703e5fca5e29e5bd5e345506977b6ba492c549648adef47ef/JPype1-1.5.0-cp312-cp312-win_amd64.whl",sha256: "9aafc00b00bf8c1b624081e5d4ab87f7752e6c7ee6a141cfc332250b05c6d42f",- destination: file("${DEPS_DIR}/Pyhidra/")+ destination: file("${DEPS_DIR}/PyGhidra/")],[name: "JPype1-1.5.0.tar.gz",url: "https://files.pythonhosted.org/packages/25/42/8ca50a0e27e3053829545829e7bcba071cbfa4d5d8fd7fc5d1d988f325b1/JPype1-1.5.0.tar.gz",sha256: "425a6e1966afdd5848b60c2688bcaeb7e40ba504a686f1114589668e0631e878",- destination: file("${DEPS_DIR}/Pyhidra/")+ destination: file("${DEPS_DIR}/PyGhidra/")],[name: "packaging-23.2-py3-none-any.whl",url: "https://files.pythonhosted.org/packages/ec/1a/610693ac4ee14fcdf2d9bf3c493370e4f2ef7ae2e19217d7a237ff42367d/packaging-23.2-py3-none-any.whl",sha256: "8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7",- destination: file("${DEPS_DIR}/Pyhidra/")+ destination: file("${DEPS_DIR}/PyGhidra/")]]