mirror of
https://github.com/Perfare/Il2CppDumper.git
synced 2025-01-09 11:17:35 -03:00
Add BinaryNinja 3 script (#578)
* 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
* Revert "Add BinaryNinja 3 script"
This reverts commit ab47c13249
.
* Add BinaryNinja 3 script
Script for BinaryNinja 3, currently only names functions. I'll improve on it in the future but currently it does the bare minimum
* Add the script to README's
This commit is contained in:
parent
c3877cf39a
commit
67b5598504
3 changed files with 35 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")
|
|
@ -54,6 +54,10 @@ structure information header file
|
|||
|
||||
For Ghidra
|
||||
|
||||
#### binaryninja3_py3.py
|
||||
|
||||
For BinaryNinja
|
||||
|
||||
#### ghidra_wasm.py
|
||||
|
||||
For Ghidra, work with [ghidra-wasm-plugin](https://github.com/nneonneo/ghidra-wasm-plugin)
|
||||
|
|
|
@ -52,6 +52,10 @@ Il2CppDumper.exe <executable-file> <global-metadata> <output-directory>
|
|||
|
||||
用于Ghidra
|
||||
|
||||
#### binaryninja3_py3.py
|
||||
|
||||
用于BinaryNinja
|
||||
|
||||
#### ghidra_wasm.py
|
||||
|
||||
用于Ghidra, 和[ghidra-wasm-plugin](https://github.com/nneonneo/ghidra-wasm-plugin)一起工作
|
||||
|
|
Loading…
Reference in a new issue