This is a repository of some scripts I am using for my research and experiments.
This script will dump one program's functions & basic blocks, with instructions and Pcode, into a Json file named output.json, in the current working directory.
Example execution:
/path/to/ghidra/support/analyzeHeadless /projects/path ProjectName -import /full/path/to/program.exe \
-postScript JsonBlocks.java
/path/to/ghidra/support/analyzeHeadless /projects/path ProjectName -process program.exe \
-postScript JsonBlocks.java