Skip to content

Instantly share code, notes, and snippets.

@brandonros
Created December 22, 2021 03:01
Show Gist options
  • Save brandonros/6474f72ab0360e89cb8a908710298d6e to your computer and use it in GitHub Desktop.
Save brandonros/6474f72ab0360e89cb8a908710298d6e to your computer and use it in GitHub Desktop.
from ghidra.program.model.data import PointerDataType
def create_pointer(address):
try:
currentProgram.getListing().createData(toAddr(address), PointerDataType())
except:
pass
functionManager = currentProgram.getFunctionManager()
f = askFile("Give me a file to open", "Go baby go!")
for line in file(f.absolutePath): # note, cannot use open(), since that is in GhidraScript
create_pointer(line.strip())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment