A collection of scripts for Ghidra
| Script | Description | Example Output |
|---|---|---|
| ExportAllDecompiledFunctions | Decompiles all functions in the currently loaded program, and exports the code to a text file. |
/* Decompiled output for program: SAMPLE.dll */
/* Total functions: 2056 */
/* ================================================== */
/* Function: GetVersionNumber */
/* Memory Address: 10001000 */
/* ================================================== */
undefined4 GetVersionNumber(void)
{
/* 0x1000 34 GetVersionNumber */
return 0xf96;
} |
- Launch Ghidra and load a program (binary) you wish to analyze.
- Make sure the Decompiler tool is enabled.
- Go to Window > Script Manager in Ghidra's main menu, and select New Script.
- Ensure the script name matches the name of the Java class.
- Copy-Paste the script, and Save.
- In the Script Manager window, find the script.
- Right-click on the script and select Run.