Python: Allow creation of typed arrays in IDA and Ghidra
This commit is contained in:
@@ -38,6 +38,11 @@ def DefineField(addr, name, type, ilType = None):
|
||||
if (ilType is not None):
|
||||
SetComment(addr, AsUTF8(ilType))
|
||||
|
||||
def DefineArray(jsonDef):
|
||||
addr = ParseAddress(jsonDef)
|
||||
MakeArray(addr, int(jsonDef['count']), AsUTF8(jsonDef['type']))
|
||||
SetName(addr, AsUTF8(jsonDef['name']))
|
||||
|
||||
# Process JSON
|
||||
def ProcessJSON(jsonData):
|
||||
|
||||
@@ -105,6 +110,11 @@ def ProcessJSON(jsonData):
|
||||
for d in jsonData['functionMetadata']:
|
||||
DefineCppFunction(d)
|
||||
|
||||
# IL2CPP array metadata
|
||||
print('Processing IL2CPP array metadata')
|
||||
for d in jsonData['arrayMetadata']:
|
||||
DefineArray(d)
|
||||
|
||||
# IL2CPP API functions
|
||||
print('Processing IL2CPP API functions')
|
||||
for d in jsonData['apis']:
|
||||
|
||||
Reference in New Issue
Block a user