mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
Candidate release of source code.
This commit is contained in:
11
Ghidra/Features/Python/ghidra_scripts/ImportSymbolsScript.py
Normal file
11
Ghidra/Features/Python/ghidra_scripts/ImportSymbolsScript.py
Normal file
@@ -0,0 +1,11 @@
|
||||
#Imports a file with lines in the form "symbolName 0xADDRESS"
|
||||
#@category Data
|
||||
#@author
|
||||
|
||||
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
|
||||
pieces = line.split()
|
||||
address = toAddr(long(pieces[1], 16))
|
||||
print "creating symbol", pieces[0], "at address", address
|
||||
createLabel(address, pieces[0], False)
|
||||
Reference in New Issue
Block a user