75 Commits

Author SHA1 Message Date
Ryan Kurtz
1acb4a37a0 GP-6301: PyGhidraTaskMonitor no longer hangs python session
(Closes #8858)
2026-01-08 12:30:06 -05:00
Ryan Kurtz
d6b7bb8c74 GP-6283: Fixing PyGhidra API inadvertently squashing some exceptions 2026-01-02 13:30:05 -05:00
Ryan Kurtz
89f487f65f GP-6283: PyGhidra 3.0.2 2026-01-02 07:28:00 -05:00
Ryan Kurtz
fed6dd7864 GP-0: Fixing wrong output in pyghidra_launcher.py (Closes #8791) 2025-12-17 05:45:15 -05:00
Ryan Kurtz
2c7cae08a9 GP-6241: Formatting, README update, version bump 2025-12-17 05:08:45 -05:00
Stanley He
f93cc03f27 PyGhidra: Fix up __init__ typo for program_context 2025-12-17 04:59:22 -05:00
Ryan Kurtz
5ab8d33592 GP-0: PyGhidra type hint fixes 2025-12-03 11:11:52 -05:00
Nicolas Iooss
fc0f971c39 Fix Python type annotations in PyGhidra module when using contextmanager
Verifying the type annotations used by PyGhidra with Mypy static type
checker leads to the following error:

    core.py:171: error: Argument 1 to "contextmanager" has incompatible
    type "Callable[[str | Path, str | Path, str, Any, str, str, str |
    JClass, str, Any], AbstractContextManager[Any, bool | None]]";
    expected "Callable[[str | Path, str | Path, str, Any, str, str, str
    | JClass, str, Any], Iterator[Never]]"  [arg-type]

Indeed, in Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/core.py,
function open_program was declared to return a
ContextManager["FlatProgramAPI"]. While this function indeed returns
such a type, the implementation uses decorator @contextlib.contextmanager
which expects the wrapped function to return an generator (with yield).

Use Generator["FlatProgramAPI", None, None] to fix this.

While at it, fix other locations where the type annotation of the
function wrapped with contextmanager was incorrect.
2025-12-03 10:59:05 -05:00
Ryan Kurtz
a93de758f7 GP-6165: Changed JPype dependency to be fixed at version 1.5.2 to avoid
a possible Windows crash on 1.6.0
2025-12-03 05:33:51 -05:00
Ryan Kurtz
5e6c16073e GP-0: Renaming pyghidra.monitor() to pyghidra.task_monitor() to avoid
naming conflict with local monitor variables (Closes #8722)
2025-12-03 05:08:49 -05:00
Ryan Kurtz
06ae0f5660 GP-0: Removing unneeded PyGhidra print 2025-11-24 05:42:35 -05:00
Ryan Kurtz
c32ead3c69 GP-0: Fixing user settings location in dev mode for LaunchSupport and
PyGhidra
2025-11-19 10:35:34 -05:00
Ryan Kurtz
6d36df6eca GP-0: Fixing PyGhidra version check when things like "-BETA" are present 2025-11-19 06:22:44 -05:00
Ryan Kurtz
0d52943d1f GP-6132: Fixed a bug in the the PyGhidra headless analyzer that resulted in the wrong exception being thrown when a script tries to import a module that isn't found 2025-11-18 14:15:44 -05:00
Ryan Kurtz
131aa4ac9a GP-0: If pyghidra.sys.modules.restore is set, PyGhidra will restore
sys.modules each time a script is run (Closes #8529)
2025-10-02 13:10:46 -04:00
Ryan Kurtz
951f5a5daa GP-6021: PyGhidra stdout/stderr scripting console fixes 2025-09-26 12:51:32 -04:00
Ryan Kurtz
26685abc75 GP-5637: More improvements to the PyGhidra API 2025-09-12 09:15:05 -04:00
Ryan Kurtz
657ec39201 GP-5637: More improvements to the PyGhidra API 2025-09-10 12:39:57 -04:00
Ryan Kurtz
c18c7a8f50 GP-5637: More improvements to the PyGhidra API 2025-09-08 13:24:10 -04:00
Ryan Kurtz
e0a060660b GP-5961: Deprecating pyghidra.open_program() and pyghidra.run_script()
Also fixed a recent regression with calling pyghidra.run_script()
2025-08-29 13:47:18 -04:00
Ryan Kurtz
2bb237e8d0 Merge remote-tracking branch
'origin/GP-5819-dragonmacher-help-build-update--SQUASHED' (Closes #8320)
2025-07-21 13:23:15 -04:00
dragonmacher
17c28209ef GP-5819 - Help - Added validation code to check all Ghidra TOC files after help is built 2025-07-21 11:59:01 -04:00
Ryan Kurtz
295f71472a GP-5637: The ghidra_script() function now accepts an optional
"script_args" parameter
2025-07-15 07:40:07 -04:00
Ryan Kurtz
cb68d29bac GP-5637: Fixing PyGhidra usage of DomainFileIterator 2025-07-11 06:58:18 -04:00
Ryan Kurtz
f5fd0171a2 GP-5637: New PyGhidra API 2025-07-10 11:42:46 -04:00
Ryan Kurtz
d58f2ad24c Merge remote-tracking branch 'origin/patch' 2025-07-07 12:25:55 -04:00
Ryan Kurtz
bf167a3126 GP-5810: Improving CWD removal from sys.path 2025-07-07 12:23:55 -04:00
Ryan Kurtz
fe335aa946 Merge remote-tracking branch 'origin/patch' 2025-07-07 11:40:02 -04:00
Ryan Kurtz
2930b622cc GP-5810: Removing CWD from PyGhidra's sys.path (Closes #8190) 2025-07-07 11:35:57 -04:00
Ryan Kurtz
1add5a9bce GP-5737: Fixing GhidraScript PrintWriter 2025-06-09 12:14:58 -04:00
Ryan Kurtz
ec43d344ad GP-0: Giving PyGhidra access to a ProjectManager 2025-05-28 14:59:29 -04:00
Ryan Kurtz
3f8fe98862 Merge remote-tracking branch 'origin/Ghidra_11.4' 2025-05-27 13:06:32 -04:00
Ryan Kurtz
189117e7d4 GP-5677: Ghidra now writes a "lastrun" file that PyGhidra can look for
to help find the Ghidra installation dir
2025-05-27 09:09:53 -04:00
Ryan Kurtz
6f0cb9a77c GP-5415: Python scripts that do not declare a @runtime metadata comment
now default to PyGhidra instead of Jython. (Closes #7856)
2025-05-22 10:13:19 -04:00
Ryan Kurtz
8ff5444ac1 GP-5710: Fixed a bug that prevented PyGhidra from properly using the
user's already-active virtual environment
2025-05-21 09:43:29 -04:00
Ryan Kurtz
151fea46f5 GP-5627: PyGhidra can now open projects created with the Ghidra GUI by
setting the "nested_project_location" optional parameter to False
2025-04-30 09:54:57 -04:00
Ryan Kurtz
0ee0537e45 GP-5598: Rename InstallationGuide to GettingStarted; put in installation
root dir
2025-04-21 11:58:26 -04:00
Ryan Kurtz
50a0bcd050 GP-0: Removing shorthand -c and -d command line args from
pyghidra_launcher.py...they interfered with some AnalyzeHeadless args
2025-04-09 13:35:25 -04:00
Ryan Kurtz
907e5c563f GP-5521: pyghidra.open_program() now accepts a program_name parameter,
which can be used to override the program name derived from the
binary_path parameter
2025-03-25 13:44:04 -04:00
Ryan Kurtz
abb65d1b8c GP-5444: PyGhidra open_program() now handles locked projects better 2025-03-06 11:58:12 -05:00
Ryan Kurtz
034c696512 GP-5372: PyGhidra now respects the application.settingsdir property set
in Ghidra's launch.properties (Closes #7481)
2025-02-12 12:16:41 -05:00
Ryan Kurtz
84e05008ae GP-5348: Fixed a PyGhidra issue that prevented accessing Java
getters/setters as properties on non-public classes (Closes #7450)
2025-02-10 08:35:22 -05:00
Ryan Kurtz
d71dc292ca GP-5298: PyGhidra can now find modules that live in directories
specified by the Bundle Manager
2025-02-07 09:53:03 -05:00
ghidra1
1bccb8ac60 Revert "GP-5298: PyGhidra can now find modules that live in directories specified by the Bundle Manager"
This reverts commit c5d4444128.
2025-02-05 14:21:55 -05:00
Ryan Kurtz
738cbc6fac GP-5315: Upgrading to JPype 1.5.2 2025-01-30 06:35:01 -05:00
Ryan Kurtz
1dfe0c241a GP-0: Fixing PyGhidra Module.manifest IP 2025-01-29 12:19:56 -05:00
Ryan Kurtz
c5d4444128 GP-5298: PyGhidra can now find modules that live in directories
specified by the Bundle Manager
2025-01-29 06:17:02 -05:00
Ryan Kurtz
8c56eb6d00 GP-0: JPype 1.5.1 windows issue workaround 2025-01-14 13:31:20 -05:00
Ryan Kurtz
f9a6b575de GP-0: importing typing into PyGhidraBasics.py 2025-01-14 09:17:56 -05:00
Ryan Kurtz
f5af708e91 GP-0: Initial What's New update and some markdown-to-html link
improvements
2025-01-10 07:08:12 -05:00