107 Commits

Author SHA1 Message Date
Ryan Kurtz fdbc3abd3f Merge remote-tracking branch 'origin/patch' 2026-05-14 10:47:19 -04:00
Ryan Kurtz 7601b2cf63 GP-6825: Handling a possible NotADirectoryError in pyghidra_launcher.py 2026-05-14 08:36:24 -04:00
Ryan Kurtz 7219427f69 GP-6669: JsonDoclet now outputs public/private/protected, which Jython
and PyGhidra will display in help()
2026-04-16 19:25:14 -04:00
Ryan Kurtz 56d072f13b GP-6580: Suppressing "java -version" output 2026-04-15 05:50:44 -04:00
Ryan Kurtz 64add1c0fa GP-6580: PyGhidra will now try to use the JAVA_HOME environment variable
to call LaunchSupport if java was not on the PATH
2026-03-19 09:06:53 -04:00
Ryan Kurtz 6f8100e585 GP-0: README update 2026-03-09 09:03:57 -04:00
fcrwr 49839645c7 Fix incorrect overriding of showsyntaxerror in PyConsole 2026-03-09 08:57:57 -04:00
Ryan Kurtz 35ac32e342 GP-0: Certify and README update 2026-03-09 08:42:20 -04:00
brandon c0992425f0 Added py.typed to pyghidra 2026-03-09 08:39:33 -04:00
Ryan Kurtz ee0accc44e Merge branch 'GP-0_ryanmkurtz_PR-8924_jstasiak_docs' 2026-02-06 05:51:35 -05:00
Jakub Stasiak 1231a520c0 Clarify the difference between ghidra and pyghidra imports
I got confused by the distinction and the differences a few times, I
figured it could be documented better.
2026-02-05 18:05:37 +01:00
Ryan Kurtz 3cda473a62 GP-0: Updating PyGhidra README.md 2026-02-03 12:28:15 -05:00
Alba Mendez 14c2495cb0 ghidra_launch.py: append JVM args in right order 2026-02-01 07:03:22 +01:00
Ryan Kurtz ba6cc4a4ed Merge remote-tracking branch 'origin/patch' 2026-01-13 10:50:56 -05:00
Ryan Kurtz c38915ebd1 Merge remote-tracking branch 'origin/GP-6284_ryanmkurtz_wheels' into patch 2026-01-13 10:45:44 -05:00
Ryan Kurtz 2a14ce7be4 Merge remote-tracking branch 'origin/patch' 2026-01-12 06:26:11 -05:00
Ryan Kurtz 03740023b7 GP-6301: PyGhidra 3.0.2 now uses TaskMonitor.DUMMY instead of
PyGhidraTaskMonitor if no timeout is specified (#8858)
2026-01-12 06:21:07 -05:00
Ryan Kurtz 4e8ff9e621 Merge remote-tracking branch 'origin/patch' 2026-01-08 12:40:23 -05:00
Ryan Kurtz 1acb4a37a0 GP-6301: PyGhidraTaskMonitor no longer hangs python session
(Closes #8858)
2026-01-08 12:30:06 -05:00
Ryan Kurtz 7ca96c7fd2 GP-6288: Updating PyGhidra README and version 2026-01-06 09:31:14 -05:00
Ryan Kurtz d5b9582fd5 GP-6288: PyGhidra now by default restores sys.modules each time a script
is run, or the interactive interpreter is reset.

Can be disabled by uncommenting
"#VMARGS=-Dpyghidra.sys.modules.restore.disable=true" in
launch.properties if its found to cause problems.
2026-01-06 06:20:11 -05:00
Ryan Kurtz 0e0c92ea2e GP-6284: Upgrading wheels 2026-01-05 07:41:22 -05:00
Ryan Kurtz 6ef256cef1 Merge remote-tracking branch 'origin/patch' 2026-01-02 13:33:35 -05:00
Ryan Kurtz d6b7bb8c74 GP-6283: Fixing PyGhidra API inadvertently squashing some exceptions 2026-01-02 13:30:05 -05:00
Ryan Kurtz b485727aa2 Merge remote-tracking branch 'origin/patch' 2026-01-02 07:30:17 -05:00
Ryan Kurtz 89f487f65f GP-6283: PyGhidra 3.0.2 2026-01-02 07:28:00 -05:00
Ryan Kurtz 56252685c0 GP-6252: pyghidra_launcher.py fixes
pyghidra_launcher.py can now use an existing pyghidra
installation in an externally managed environment. Upgrading is disabled
in this scenario.

Fixed an issue with getting the package version from an arbitrary
environment
2025-12-19 07:35:45 -05:00
Ryan Kurtz 0ccff8ed76 Merge remote-tracking branch 'origin/patch' 2025-12-17 05:47:20 -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 58e5c8e44c Merge remote-tracking branch 'origin/Ghidra_12.0' 2025-12-03 11:18:29 -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 a8a07b148e Merge remote-tracking branch 'origin/Ghidra_12.0' 2025-12-03 05:43:25 -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 09327173a4 Merge remote-tracking branch 'origin/Ghidra_12.0' 2025-11-24 05:45:29 -05:00
Ryan Kurtz 06ae0f5660 GP-0: Removing unneeded PyGhidra print 2025-11-24 05:42:35 -05:00
Ryan Kurtz aabf436723 Merge remote-tracking branch 'origin/Ghidra_12.0' 2025-11-19 10:50:54 -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 593dacf7d0 Merge remote-tracking branch 'origin/Ghidra_12.0' 2025-11-19 06:24:39 -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 44d29b9ada Merge remote-tracking branch 'origin/Ghidra_12.0' 2025-11-18 14:19:50 -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
jhq223 8148f6364f refactor(pyghidra_launcher): Improve get_package_version implementation
Refactors the `get_package_version` helper function to use the standard
`importlib.metadata` library instead of a subprocess call to `pip show`.

This change provides several benefits:
- Robustness: Avoids brittle parsing of command-line tool output.
- Performance: Eliminates the overhead of spawning a new process.
- Correctness: The return type hint is corrected to `Optional[str]` to
  accurately reflect that the function can return `None`.
- Simplicity: The unused `python_cmd` parameter has been removed,
  simplifying the function's signature.
2025-10-25 18:18:05 +08: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