-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Right now, ghidra2dwarf.py relies on having the original ELF on disk. It ends up breaking one of my automated workflows, since my tooling cleans up samples off disk after they've been imported to Ghidra.
ghidra2dwarf/src/ghidra2dwarf.py
Lines 69 to 73 in 650597d
| while not os.path.isfile(exe_path): | |
| print "I couldn't find the original file at path %s. Please specify its path:" % exe_path | |
| exe_path = askFile("Original binary path", "Open").path | |
| curr.executablePath = exe_path | |
| print "Changed binary path to %s." % exe_path |
ghidra2dwarf/src/ghidra2dwarf.py
Line 515 in 650597d
| add_sections_to_elf(exe_path, out_path, sections) |
We should use the ElfExporter class instead to get the original ELF file. https://github.com/NationalSecurityAgency/ghidra/blob/master/Ghidra/Features/Base/src/main/java/ghidra/app/util/exporter/ElfExporter.java
Here's some examples of how to do that:
frederictobiasc
Metadata
Metadata
Assignees
Labels
No labels