Ghidra: Rebase dumped ELF images correctly (#120)

This commit is contained in:
Katy Coe
2021-01-10 17:41:52 +01:00
parent 34ebd31deb
commit 9437749455
2 changed files with 3 additions and 2 deletions

View File

@@ -68,7 +68,7 @@ def CustomInitializer():
# Ghidra sets the image base for ELF to 0x100000 for some reason
# https://github.com/NationalSecurityAgency/ghidra/issues/1020
if currentProgram.getExecutableFormat().endswith('(ELF)'):
currentProgram.setImageBase(toAddr(0), True)
currentProgram.setImageBase(toAddr(%IMAGE_BASE%), True)
def GetScriptDirectory():
return getSourceFile().getParentFile().toString()