Learning resource
Ghidra Snippets
A single-page collection of 30 commented Python examples for scripting Ghidra, grouped by task: projects, programs, functions and cross-references, basic blocks, instructions, stack variables, decompiler output, comments, P-code emulation and dumps, call graphs and program slices. It starts from the Flat Program, Flat Decompiler and Flat Debugger APIs, then shows where a task needs Ghidra's fuller API; most snippets include an example of their output.
- Targets
- Binary
- Category
- Learning resources
- Relationship
- Learning resource
- Sources reviewed
Requirements & limits
- Everything is in one README, with no script files or releases. The last change, on 2023-07-19, fixed a typo; the one before, on 2022-11-09, added Flat API notes for Ghidra 10.2. Version remarks range from Ghidra 9.1 and 9.2.2 to 10.2, so names and behavior in current Ghidra releases may differ; the README points to Ghidra's built-in API help and to the ghidra.re online docs, which it says may not be up to date.
- The examples run in Ghidra's Python scripting environment, which the README calls the Jython console, against a program the user has loaded. Plotting a function AST also needs GraphViz's dot plus networkx and pydot importable from Jython, and the README notes that Python modules with native code do not work there. Compatibility with PyGhidra or Python 3 is not stated.
- Released under CC0 1.0. The README calls the snippets a verbose mashup with more than one way to do each task and invites pull requests. No snippet was run for this review, and the reviewed sources establish no REA connection.
About this entry
The description was reviewed against primary sources. This does not establish runtime testing, security auditing or verified compatibility.
Primary sources
- README.md GitHub · HackOvert/GhidraSnippets · Revision 9bcd718
- LICENSE GitHub · HackOvert/GhidraSnippets · Revision 9bcd718
- https://github.com/HackOvert/GhidraSnippets/commit/643bbee5d287c79cb92d93112f89346ce3023a1f
More in References and learning
- Installation and client setup · Documentation
- CLI and Evidence · Documentation
- MCP contracts and generated catalog · Documentation
- Native binary investigation · Documentation
- Cross-layer JavaScript application workflows · Documentation
- Static Android APK analysis · Documentation