diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/WhatsNew.md b/Ghidra/Configurations/Public_Release/src/global/docs/WhatsNew.md index 8323d74565..675401a442 100644 --- a/Ghidra/Configurations/Public_Release/src/global/docs/WhatsNew.md +++ b/Ghidra/Configurations/Public_Release/src/global/docs/WhatsNew.md @@ -118,6 +118,11 @@ encoded form; thus, using the encoded form can also create bifurcation in the na ## Processors +## Jython Extension +Jython support is now delivered as a Ghidra Extension, which means an extra step is required to +install it. If you require Jython, simply go to `File -> Install Extensions` in the Ghidra +Front End GUI and check "Jython". Restart Ghidra and Jython support will be enabled. + ## Additional Bug Fixes and Enhancements Numerous other new features, improvements, and bug fixes are fully listed in the [Change History](ChangeHistory.md) file. diff --git a/Ghidra/Features/Jython/Module.manifest b/Ghidra/Extensions/Jython/Module.manifest similarity index 100% rename from Ghidra/Features/Jython/Module.manifest rename to Ghidra/Extensions/Jython/Module.manifest diff --git a/Ghidra/Features/Jython/README.md b/Ghidra/Extensions/Jython/README.md similarity index 100% rename from Ghidra/Features/Jython/README.md rename to Ghidra/Extensions/Jython/README.md diff --git a/Ghidra/Features/Jython/build.gradle b/Ghidra/Extensions/Jython/build.gradle similarity index 93% rename from Ghidra/Features/Jython/build.gradle rename to Ghidra/Extensions/Jython/build.gradle index 9056a8023c..a713d0be7f 100644 --- a/Ghidra/Features/Jython/build.gradle +++ b/Ghidra/Extensions/Jython/build.gradle @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle" +apply from: "$rootProject.projectDir/gradle/distributableGhidraExtension.gradle" apply from: "$rootProject.projectDir/gradle/javaProject.gradle" apply from: "$rootProject.projectDir/gradle/helpProject.gradle" apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle" @@ -21,7 +21,7 @@ apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle" apply from: "$rootProject.projectDir/gradle/javadoc.gradle" apply plugin: 'eclipse' -eclipse.project.name = 'Features Jython' +eclipse.project.name = 'Xtra Jython' def JYTHON = "org.python:jython-standalone:2.7.4" diff --git a/Ghidra/Features/Jython/certification.manifest b/Ghidra/Extensions/Jython/certification.manifest similarity index 88% rename from Ghidra/Features/Jython/certification.manifest rename to Ghidra/Extensions/Jython/certification.manifest index de2c3849f3..501ed00d99 100644 --- a/Ghidra/Features/Jython/certification.manifest +++ b/Ghidra/Extensions/Jython/certification.manifest @@ -4,5 +4,6 @@ Module.manifest||GHIDRA||||END| README.md||GHIDRA||||END| data/jython.theme.properties||GHIDRA||||END| +extension.properties||GHIDRA||||END| src/main/help/help/TOC_Source.xml||GHIDRA||||END| src/main/help/help/topics/Jython/interpreter.html||GHIDRA||||END| diff --git a/Ghidra/Features/Jython/data/jython.theme.properties b/Ghidra/Extensions/Jython/data/jython.theme.properties similarity index 100% rename from Ghidra/Features/Jython/data/jython.theme.properties rename to Ghidra/Extensions/Jython/data/jython.theme.properties diff --git a/Ghidra/Extensions/Jython/extension.properties b/Ghidra/Extensions/Jython/extension.properties new file mode 100644 index 0000000000..df8c40bb85 --- /dev/null +++ b/Ghidra/Extensions/Jython/extension.properties @@ -0,0 +1,5 @@ +name=Jython +description=The Jython 2.x GhidraScript engine and interpreter plugin +author=Ghidra Team +createdOn=pre-4/23/2026 +version=@extversion@ diff --git a/Ghidra/Features/Jython/ghidra_scripts/AddCommentToProgramScriptPy.py b/Ghidra/Extensions/Jython/ghidra_scripts/AddCommentToProgramScriptPy.py similarity index 100% rename from Ghidra/Features/Jython/ghidra_scripts/AddCommentToProgramScriptPy.py rename to Ghidra/Extensions/Jython/ghidra_scripts/AddCommentToProgramScriptPy.py diff --git a/Ghidra/Features/Jython/ghidra_scripts/AskScriptPy.py b/Ghidra/Extensions/Jython/ghidra_scripts/AskScriptPy.py similarity index 100% rename from Ghidra/Features/Jython/ghidra_scripts/AskScriptPy.py rename to Ghidra/Extensions/Jython/ghidra_scripts/AskScriptPy.py diff --git a/Ghidra/Features/Jython/ghidra_scripts/CallAnotherScriptForAllProgramsPy.py b/Ghidra/Extensions/Jython/ghidra_scripts/CallAnotherScriptForAllProgramsPy.py similarity index 100% rename from Ghidra/Features/Jython/ghidra_scripts/CallAnotherScriptForAllProgramsPy.py rename to Ghidra/Extensions/Jython/ghidra_scripts/CallAnotherScriptForAllProgramsPy.py diff --git a/Ghidra/Features/Jython/ghidra_scripts/CallAnotherScriptPy.py b/Ghidra/Extensions/Jython/ghidra_scripts/CallAnotherScriptPy.py similarity index 100% rename from Ghidra/Features/Jython/ghidra_scripts/CallAnotherScriptPy.py rename to Ghidra/Extensions/Jython/ghidra_scripts/CallAnotherScriptPy.py diff --git a/Ghidra/Features/Jython/ghidra_scripts/ChooseDataTypeScriptPy.py b/Ghidra/Extensions/Jython/ghidra_scripts/ChooseDataTypeScriptPy.py similarity index 100% rename from Ghidra/Features/Jython/ghidra_scripts/ChooseDataTypeScriptPy.py rename to Ghidra/Extensions/Jython/ghidra_scripts/ChooseDataTypeScriptPy.py diff --git a/Ghidra/Features/Jython/ghidra_scripts/ExampleColorScriptPy.py b/Ghidra/Extensions/Jython/ghidra_scripts/ExampleColorScriptPy.py similarity index 100% rename from Ghidra/Features/Jython/ghidra_scripts/ExampleColorScriptPy.py rename to Ghidra/Extensions/Jython/ghidra_scripts/ExampleColorScriptPy.py diff --git a/Ghidra/Features/Jython/ghidra_scripts/FormatExampleScriptPy.py b/Ghidra/Extensions/Jython/ghidra_scripts/FormatExampleScriptPy.py similarity index 100% rename from Ghidra/Features/Jython/ghidra_scripts/FormatExampleScriptPy.py rename to Ghidra/Extensions/Jython/ghidra_scripts/FormatExampleScriptPy.py diff --git a/Ghidra/Features/Jython/ghidra_scripts/ImportSymbolsScript.py b/Ghidra/Extensions/Jython/ghidra_scripts/ImportSymbolsScript.py similarity index 100% rename from Ghidra/Features/Jython/ghidra_scripts/ImportSymbolsScript.py rename to Ghidra/Extensions/Jython/ghidra_scripts/ImportSymbolsScript.py diff --git a/Ghidra/Features/Jython/ghidra_scripts/PrintNonZeroPurge.py b/Ghidra/Extensions/Jython/ghidra_scripts/PrintNonZeroPurge.py similarity index 100% rename from Ghidra/Features/Jython/ghidra_scripts/PrintNonZeroPurge.py rename to Ghidra/Extensions/Jython/ghidra_scripts/PrintNonZeroPurge.py diff --git a/Ghidra/Features/Jython/ghidra_scripts/ToolPropertiesExampleScriptPy.py b/Ghidra/Extensions/Jython/ghidra_scripts/ToolPropertiesExampleScriptPy.py similarity index 100% rename from Ghidra/Features/Jython/ghidra_scripts/ToolPropertiesExampleScriptPy.py rename to Ghidra/Extensions/Jython/ghidra_scripts/ToolPropertiesExampleScriptPy.py diff --git a/Ghidra/Features/Jython/ghidra_scripts/external_module_callee.py b/Ghidra/Extensions/Jython/ghidra_scripts/external_module_callee.py similarity index 100% rename from Ghidra/Features/Jython/ghidra_scripts/external_module_callee.py rename to Ghidra/Extensions/Jython/ghidra_scripts/external_module_callee.py diff --git a/Ghidra/Features/Jython/ghidra_scripts/external_module_caller.py b/Ghidra/Extensions/Jython/ghidra_scripts/external_module_caller.py similarity index 100% rename from Ghidra/Features/Jython/ghidra_scripts/external_module_caller.py rename to Ghidra/Extensions/Jython/ghidra_scripts/external_module_caller.py diff --git a/Ghidra/Features/Jython/ghidra_scripts/ghidra_basics.py b/Ghidra/Extensions/Jython/ghidra_scripts/ghidra_basics.py similarity index 100% rename from Ghidra/Features/Jython/ghidra_scripts/ghidra_basics.py rename to Ghidra/Extensions/Jython/ghidra_scripts/ghidra_basics.py diff --git a/Ghidra/Features/Jython/ghidra_scripts/jython_basics.py b/Ghidra/Extensions/Jython/ghidra_scripts/jython_basics.py similarity index 100% rename from Ghidra/Features/Jython/ghidra_scripts/jython_basics.py rename to Ghidra/Extensions/Jython/ghidra_scripts/jython_basics.py diff --git a/Ghidra/Features/Jython/ghidra_scripts/python_basics.py b/Ghidra/Extensions/Jython/ghidra_scripts/python_basics.py similarity index 100% rename from Ghidra/Features/Jython/ghidra_scripts/python_basics.py rename to Ghidra/Extensions/Jython/ghidra_scripts/python_basics.py diff --git a/Ghidra/Features/Jython/jython-src/ghidradoc.py b/Ghidra/Extensions/Jython/jython-src/ghidradoc.py similarity index 100% rename from Ghidra/Features/Jython/jython-src/ghidradoc.py rename to Ghidra/Extensions/Jython/jython-src/ghidradoc.py diff --git a/Ghidra/Features/Jython/jython-src/introspect.py b/Ghidra/Extensions/Jython/jython-src/introspect.py similarity index 100% rename from Ghidra/Features/Jython/jython-src/introspect.py rename to Ghidra/Extensions/Jython/jython-src/introspect.py diff --git a/Ghidra/Features/Jython/jython-src/jintrospect.py b/Ghidra/Extensions/Jython/jython-src/jintrospect.py similarity index 100% rename from Ghidra/Features/Jython/jython-src/jintrospect.py rename to Ghidra/Extensions/Jython/jython-src/jintrospect.py diff --git a/Ghidra/Features/Jython/jython-src/sitecustomize.py b/Ghidra/Extensions/Jython/jython-src/sitecustomize.py similarity index 100% rename from Ghidra/Features/Jython/jython-src/sitecustomize.py rename to Ghidra/Extensions/Jython/jython-src/sitecustomize.py diff --git a/Ghidra/Features/Jython/src/main/help/help/TOC_Source.xml b/Ghidra/Extensions/Jython/src/main/help/help/TOC_Source.xml similarity index 100% rename from Ghidra/Features/Jython/src/main/help/help/TOC_Source.xml rename to Ghidra/Extensions/Jython/src/main/help/help/TOC_Source.xml diff --git a/Ghidra/Features/Jython/src/main/help/help/topics/Jython/interpreter.html b/Ghidra/Extensions/Jython/src/main/help/help/topics/Jython/interpreter.html similarity index 100% rename from Ghidra/Features/Jython/src/main/help/help/topics/Jython/interpreter.html rename to Ghidra/Extensions/Jython/src/main/help/help/topics/Jython/interpreter.html diff --git a/Ghidra/Features/Jython/src/main/java/ghidra/jython/GhidraJythonInterpreter.java b/Ghidra/Extensions/Jython/src/main/java/ghidra/jython/GhidraJythonInterpreter.java similarity index 100% rename from Ghidra/Features/Jython/src/main/java/ghidra/jython/GhidraJythonInterpreter.java rename to Ghidra/Extensions/Jython/src/main/java/ghidra/jython/GhidraJythonInterpreter.java diff --git a/Ghidra/Features/Jython/src/main/java/ghidra/jython/JythonCodeCompletionFactory.java b/Ghidra/Extensions/Jython/src/main/java/ghidra/jython/JythonCodeCompletionFactory.java similarity index 100% rename from Ghidra/Features/Jython/src/main/java/ghidra/jython/JythonCodeCompletionFactory.java rename to Ghidra/Extensions/Jython/src/main/java/ghidra/jython/JythonCodeCompletionFactory.java diff --git a/Ghidra/Features/Jython/src/main/java/ghidra/jython/JythonPlugin.java b/Ghidra/Extensions/Jython/src/main/java/ghidra/jython/JythonPlugin.java similarity index 100% rename from Ghidra/Features/Jython/src/main/java/ghidra/jython/JythonPlugin.java rename to Ghidra/Extensions/Jython/src/main/java/ghidra/jython/JythonPlugin.java diff --git a/Ghidra/Features/Jython/src/main/java/ghidra/jython/JythonPluginExecutionThread.java b/Ghidra/Extensions/Jython/src/main/java/ghidra/jython/JythonPluginExecutionThread.java similarity index 100% rename from Ghidra/Features/Jython/src/main/java/ghidra/jython/JythonPluginExecutionThread.java rename to Ghidra/Extensions/Jython/src/main/java/ghidra/jython/JythonPluginExecutionThread.java diff --git a/Ghidra/Features/Jython/src/main/java/ghidra/jython/JythonPluginInputThread.java b/Ghidra/Extensions/Jython/src/main/java/ghidra/jython/JythonPluginInputThread.java similarity index 100% rename from Ghidra/Features/Jython/src/main/java/ghidra/jython/JythonPluginInputThread.java rename to Ghidra/Extensions/Jython/src/main/java/ghidra/jython/JythonPluginInputThread.java diff --git a/Ghidra/Features/Jython/src/main/java/ghidra/jython/JythonRun.java b/Ghidra/Extensions/Jython/src/main/java/ghidra/jython/JythonRun.java similarity index 100% rename from Ghidra/Features/Jython/src/main/java/ghidra/jython/JythonRun.java rename to Ghidra/Extensions/Jython/src/main/java/ghidra/jython/JythonRun.java diff --git a/Ghidra/Features/Jython/src/main/java/ghidra/jython/JythonScript.java b/Ghidra/Extensions/Jython/src/main/java/ghidra/jython/JythonScript.java similarity index 100% rename from Ghidra/Features/Jython/src/main/java/ghidra/jython/JythonScript.java rename to Ghidra/Extensions/Jython/src/main/java/ghidra/jython/JythonScript.java diff --git a/Ghidra/Features/Jython/src/main/java/ghidra/jython/JythonScriptExecutionThread.java b/Ghidra/Extensions/Jython/src/main/java/ghidra/jython/JythonScriptExecutionThread.java similarity index 100% rename from Ghidra/Features/Jython/src/main/java/ghidra/jython/JythonScriptExecutionThread.java rename to Ghidra/Extensions/Jython/src/main/java/ghidra/jython/JythonScriptExecutionThread.java diff --git a/Ghidra/Features/Jython/src/main/java/ghidra/jython/JythonScriptProvider.java b/Ghidra/Extensions/Jython/src/main/java/ghidra/jython/JythonScriptProvider.java similarity index 100% rename from Ghidra/Features/Jython/src/main/java/ghidra/jython/JythonScriptProvider.java rename to Ghidra/Extensions/Jython/src/main/java/ghidra/jython/JythonScriptProvider.java diff --git a/Ghidra/Features/Jython/src/main/java/ghidra/jython/JythonUtils.java b/Ghidra/Extensions/Jython/src/main/java/ghidra/jython/JythonUtils.java similarity index 100% rename from Ghidra/Features/Jython/src/main/java/ghidra/jython/JythonUtils.java rename to Ghidra/Extensions/Jython/src/main/java/ghidra/jython/JythonUtils.java diff --git a/Ghidra/Features/Jython/src/main/java/ghidra/jython/PyDevUtils.java b/Ghidra/Extensions/Jython/src/main/java/ghidra/jython/PyDevUtils.java similarity index 100% rename from Ghidra/Features/Jython/src/main/java/ghidra/jython/PyDevUtils.java rename to Ghidra/Extensions/Jython/src/main/java/ghidra/jython/PyDevUtils.java diff --git a/Ghidra/Features/Jython/src/test.slow/java/ghidra/jython/JythonCodeCompletionTest.java b/Ghidra/Extensions/Jython/src/test.slow/java/ghidra/jython/JythonCodeCompletionTest.java similarity index 100% rename from Ghidra/Features/Jython/src/test.slow/java/ghidra/jython/JythonCodeCompletionTest.java rename to Ghidra/Extensions/Jython/src/test.slow/java/ghidra/jython/JythonCodeCompletionTest.java diff --git a/Ghidra/Features/Jython/src/test.slow/java/ghidra/jython/JythonInterpreterTest.java b/Ghidra/Extensions/Jython/src/test.slow/java/ghidra/jython/JythonInterpreterTest.java similarity index 100% rename from Ghidra/Features/Jython/src/test.slow/java/ghidra/jython/JythonInterpreterTest.java rename to Ghidra/Extensions/Jython/src/test.slow/java/ghidra/jython/JythonInterpreterTest.java diff --git a/Ghidra/Features/Jython/src/test.slow/java/ghidra/jython/JythonPluginTest.java b/Ghidra/Extensions/Jython/src/test.slow/java/ghidra/jython/JythonPluginTest.java similarity index 100% rename from Ghidra/Features/Jython/src/test.slow/java/ghidra/jython/JythonPluginTest.java rename to Ghidra/Extensions/Jython/src/test.slow/java/ghidra/jython/JythonPluginTest.java diff --git a/Ghidra/Features/Jython/src/test.slow/java/ghidra/jython/JythonScriptInfoTest.java b/Ghidra/Extensions/Jython/src/test.slow/java/ghidra/jython/JythonScriptInfoTest.java similarity index 100% rename from Ghidra/Features/Jython/src/test.slow/java/ghidra/jython/JythonScriptInfoTest.java rename to Ghidra/Extensions/Jython/src/test.slow/java/ghidra/jython/JythonScriptInfoTest.java diff --git a/Ghidra/Features/Jython/src/test.slow/java/ghidra/jython/JythonScriptTest.java b/Ghidra/Extensions/Jython/src/test.slow/java/ghidra/jython/JythonScriptTest.java similarity index 100% rename from Ghidra/Features/Jython/src/test.slow/java/ghidra/jython/JythonScriptTest.java rename to Ghidra/Extensions/Jython/src/test.slow/java/ghidra/jython/JythonScriptTest.java diff --git a/Ghidra/Features/Base/src/main/help/help/topics/GhidraScriptMgrPlugin/ScriptDevelopment.htm b/Ghidra/Features/Base/src/main/help/help/topics/GhidraScriptMgrPlugin/ScriptDevelopment.htm index 7e524b0576..9f26b8c028 100644 --- a/Ghidra/Features/Base/src/main/help/help/topics/GhidraScriptMgrPlugin/ScriptDevelopment.htm +++ b/Ghidra/Features/Base/src/main/help/help/topics/GhidraScriptMgrPlugin/ScriptDevelopment.htm @@ -26,7 +26,7 @@ script-specific code.
  • Of course if you choose Java, the Ghidra script must be written in Java. - An implementation for Python (based on Jython) is also provided.
  • + An implementation for Python (based on PyGhidra) is also provided.

    @@ -161,8 +161,8 @@ uses the same script file extension. If left unspecified, the first Ghidra script runtime environment that matches the script's extension will be used.

    - For example, specify "@runtime Jython" if the script is targetted for a Jython 2 - runtime environment rather than a Python 3 runtime environment. + For example, specify "@runtime Jython" if the script is targeted for a Jython 2 + runtime environment rather than a CPython 3 (PyGhidra) runtime environment.

    diff --git a/Ghidra/Test/IntegrationTest/src/screen/java/help/screenshot/GhidraScriptMgrPluginScreenShots.java b/Ghidra/Test/IntegrationTest/src/screen/java/help/screenshot/GhidraScriptMgrPluginScreenShots.java index 88bdb08cd2..7becb4774c 100644 --- a/Ghidra/Test/IntegrationTest/src/screen/java/help/screenshot/GhidraScriptMgrPluginScreenShots.java +++ b/Ghidra/Test/IntegrationTest/src/screen/java/help/screenshot/GhidraScriptMgrPluginScreenShots.java @@ -35,7 +35,6 @@ import ghidra.app.plugin.core.osgi.BundleStatusComponentProvider; import ghidra.app.plugin.core.script.*; import ghidra.app.script.*; import ghidra.app.services.ConsoleService; -import ghidra.jython.JythonScriptProvider; import ghidra.util.HelpLocation; import ghidra.util.datastruct.LRUSet; @@ -223,7 +222,7 @@ public class GhidraScriptMgrPluginScreenShots extends GhidraScreenShotGenerator List items = new ArrayList<>(); JavaScriptProvider javaScriptProvider = new JavaScriptProvider(); items.add(javaScriptProvider); - items.add(new JythonScriptProvider()); + //items.add(new JythonScriptProvider()); final PickProviderDialog pickDialog = new PickProviderDialog(items, javaScriptProvider); runSwing(() -> tool.showDialog(pickDialog), false); diff --git a/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/program/database/sourcemap/MappingSourceFilesTest.java b/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/program/database/sourcemap/MappingSourceFilesTest.java index a314f3d74b..cce2e0553b 100644 --- a/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/program/database/sourcemap/MappingSourceFilesTest.java +++ b/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/program/database/sourcemap/MappingSourceFilesTest.java @@ -22,7 +22,8 @@ import java.util.HexFormat; import java.util.List; import org.junit.Test; -import org.python.google.common.primitives.Longs; + +import com.google.common.primitives.Longs; import ghidra.framework.store.LockException; import ghidra.program.model.address.*; diff --git a/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/program/database/sourcemap/SourceFileTest.java b/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/program/database/sourcemap/SourceFileTest.java index 7c4b9ed7c3..c7ab335f49 100644 --- a/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/program/database/sourcemap/SourceFileTest.java +++ b/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/program/database/sourcemap/SourceFileTest.java @@ -24,7 +24,8 @@ import java.util.*; import org.apache.commons.lang3.StringUtils; import org.junit.Test; -import org.python.google.common.primitives.Longs; + +import com.google.common.primitives.Longs; import ghidra.framework.store.LockException; import ghidra.util.SourceFileUtils; diff --git a/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/program/database/sourcemap/UserDataPathTransformerTest.java b/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/program/database/sourcemap/UserDataPathTransformerTest.java index ff805d568e..31b8354998 100644 --- a/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/program/database/sourcemap/UserDataPathTransformerTest.java +++ b/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/program/database/sourcemap/UserDataPathTransformerTest.java @@ -22,7 +22,8 @@ import java.util.List; import org.junit.Before; import org.junit.Test; -import org.python.google.common.primitives.Longs; + +import com.google.common.primitives.Longs; import generic.test.AbstractGenericTest; import ghidra.framework.store.LockException;