Script development
Now you know all the things needed in order to implement your own script. Let's start by writing the header. This script will allow you to patch bytes with no operation instructions (NOP
assembly opcode).
First, we start writing the header. Notice that @keybinding
allows us to execute the script with the Ctrl + Alt + Shift + N key combination:
//This simple script allows you to patch bytes with NOP opcode //@author Packt //@category Memory //@keybinding ctrl alt shift n //@menupath Tools.Packt.nop //@toolbar import ghidra.app.script.GhidraScript; import ghidra.program.model.util.*; import ghidra.program.model.reloc.*; import ghidra.program.model.data.*; import ghidra.program.model.block.*; import ghidra.program.model.symbol.*; import ghidra.program.model.scalar.*; import ghidra.program.model.mem.*; import ghidra.program.model.listing.*; import ghidra.program.model.lang.*; import ghidra.program.model.pcode.*; import ghidra.program.model.address.*;...