mirror of
https://github.com/Perfare/Il2CppDumper.git
synced 2025-01-24 09:57:44 -03:00
Add BinaryNinja 3 script
Adds a script for BinaryNinja 3, currently it only processes the ScriptMethod field from script.json Script needs to be edited to grab script.json as I haven't
This commit is contained in:
parent
c3877cf39a
commit
ab47c13249
1 changed files with 27 additions and 0 deletions
27
Il2CppDumper/binaryninja3_py3.py
Normal file
27
Il2CppDumper/binaryninja3_py3.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
import binaryninja
|
||||
from os.path import exists
|
||||
|
||||
imageBase = bv.start
|
||||
|
||||
def get_addr(addr):
|
||||
return imageBase + addr
|
||||
|
||||
fileDialog = OpenFileNameField("Select script.json", "script.json", "script.json")
|
||||
|
||||
if get_form_input([fileDialog], "script.json from Il2CppDumper") != 1:
|
||||
print("File not selected, try again!")
|
||||
else:
|
||||
if exists(fileDialog.result) == True:
|
||||
data = json.loads(open(fileDialog.result, 'rb').read().decode('utf-8'))
|
||||
data["Addresses"] = None
|
||||
if "ScriptMethod" in data:
|
||||
scriptMethods = data["ScriptMethod"]
|
||||
for scriptMethod in scriptMethods:
|
||||
addr = get_addr(scriptMethod["Address"])
|
||||
name = scriptMethod["Name"]
|
||||
func = bv.get_function_at(addr)
|
||||
if func != None:
|
||||
bv.get_function_at(addr).name = name
|
||||
print("Done")
|
||||
else:
|
||||
print("File not found")
|
Loading…
Add table
Reference in a new issue