GP-6283: PyGhidra 3.0.2

This commit is contained in:
Ryan Kurtz
2026-01-02 07:28:00 -05:00
parent 59f361983f
commit 89f487f65f
3 changed files with 12 additions and 2 deletions
@@ -31,7 +31,11 @@ To install the PyGhidra Python library:
Python editor supports it). The type stubs module is specific to each version of Ghidra: Python editor supports it). The type stubs module is specific to each version of Ghidra:
* Online: `pip install ghidra-stubs==<version>` * Online: `pip install ghidra-stubs==<version>`
* Offline: `python3 -m pip install --no-index -f <GhidraInstallDir>/docs/ghidra_stubs ghidra-stubs` * Offline: `python3 -m pip install --no-index -f <GhidraInstallDir>/docs/ghidra_stubs ghidra-stubs`
4. Optionally point PyGhidra at your Ghidra installation by setting the `GHIDRA_INSTALL_DIR` 4. Optionally install the Java type stubs to improve your development experience (assuming your
Python editor supports it):
* Online: `pip install java-stubs-converted-strings`
* Offline: Not available
5. Optionally point PyGhidra at your Ghidra installation by setting the `GHIDRA_INSTALL_DIR`
environment variable. If not set, PyGhidra will point itself at the last used installation of environment variable. If not set, PyGhidra will point itself at the last used installation of
Ghidra. Alternatively, you can point PyGhidra at a Ghidra installation with Ghidra. Alternatively, you can point PyGhidra at a Ghidra installation with
`pyghidra.start(install_dir=<GhidraInstallDir>)` (see below). `pyghidra.start(install_dir=<GhidraInstallDir>)` (see below).
@@ -557,6 +561,10 @@ import pdb # imports Python's pdb
import pdb_ # imports Ghidra's pdb import pdb_ # imports Ghidra's pdb
``` ```
## Change History ## Change History
__3.0.2__
* Fixed an issue that prevented [`pyghidra.analysis_properties()`](#pyghidraanalysis_properties)
from having access to all of the analysis properties.
__3.0.1__ __3.0.1__
* Fixed `AttributeError: module 'pyghidra' has no attribute 'program_conext'` when performing a * Fixed `AttributeError: module 'pyghidra' has no attribute 'program_conext'` when performing a
`from pyghidra import *`. `from pyghidra import *`.
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
## ##
__version__ = "3.0.1" __version__ = "3.0.2"
# stub for documentation and typing # stub for documentation and typing
# this is mostly to hide the function parameter # this is mostly to hide the function parameter
@@ -280,6 +280,8 @@ def analysis_properties(program: "Program") -> "Options":
:return: the Ghidra "Program.ANALYSIS_PROPERTIES" options. :return: the Ghidra "Program.ANALYSIS_PROPERTIES" options.
""" """
from ghidra.program.model.listing import Program from ghidra.program.model.listing import Program
from ghidra.app.plugin.core.analysis import AutoAnalysisManager
AutoAnalysisManager.getAnalysisManager(program).initializeOptions()
return program.getOptions(Program.ANALYSIS_PROPERTIES) return program.getOptions(Program.ANALYSIS_PROPERTIES)
def program_info(program: "Program") -> "Options": def program_info(program: "Program") -> "Options":