Using the Ghidra scripting API
The Ghidra scripting API is divided into the Flat API (ghidra.app.decompiler.flatapi) and the rest of the functions (http://ghidra.re/ghidra_docs/api/overview-tree.html), which are more complex.
The Flat API is a simplified version of the Ghidra API, and it allows you, in summary, to perform the following actions:
- These functions allow you to work with memory addresses:
addEntryPoint,addInstructionXref,createAddressSet,getAddressFactory, andremoveEntryPoint. - Use these functions to perform code analysis:
analyze,analyzeAll,analyzeChanges,analyzeAll, andanalyzeChanges. - Use the following function to clear the code listing:
clearListing. - The following functions allow you to declare data:
createAsciiString,createAsciiString,createBookmark,createByte,createChar,createData,createDouble,createDWord,createDwords,createEquate,createUnicodeString,removeData,removeDataAt,removeEquate,removeEquate, andremoveEquates.
...