Skip to content

Ghidra started in PyGhidra mode, Jython disabled, but scripts in the Scripts Manager are still executed with Jython #7856

Open
@joxeankoret

Description

@joxeankoret

Describe the bug

I have started Ghidra in PyGhidra mode and verified it by running some commands in the console. I have also disabled Jython as I don't use it. Then, I tried to run some Python script I'm developing from the Scripts Manager and realized that it's still using Jython instead of my Python 3.11 installation.

To Reproduce

  1. Run Ghidra in PyGhidra mode.
  2. Disable Jython.
  3. Create a python script in some directory configured to appear in the Ghidra's Script Manager with only the following lines:
import sys
print("Python version", sys.version)
  1. Run the script.
  2. It will print something like the following text, clearly showing that it isn't using PyGhidra but Jython:
('Python version', '2.7.4 (tags/v2.7.4:3f256f4a7, Aug 18 2024, 10:30:53)\n[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)]')

Expected behavior
Running my script using my PyGhidra installation, not Jython.

Environment (please complete the following information):

  • OS: Ubuntu 22.04.5 LTS
  • Java Version: JDK 23
  • Ghidra Version: 11.3.1
  • Ghidra Origin: Github release

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions