mirror of
https://github.com/Perfare/Il2CppDumper.git
synced 2025-01-09 11:17:35 -03:00
Add Hopper Disassembler Script (#680)
* Add Hopper Disassembler Script * Update hopper-py3.py Remove tkinter import
This commit is contained in:
parent
5689cfb1e6
commit
e3b6ab8eb3
1 changed files with 32 additions and 0 deletions
32
Il2CppDumper/hopper-py3.py
Normal file
32
Il2CppDumper/hopper-py3.py
Normal file
|
@ -0,0 +1,32 @@
|
|||
import codecs
|
||||
import json
|
||||
|
||||
def deserializeJSON(script_file):
|
||||
if script_file is not None:
|
||||
f = codecs.open(script_file, "r","utf-8")
|
||||
|
||||
# Reading from file
|
||||
data = json.loads(f.read())
|
||||
f.close()
|
||||
|
||||
return data
|
||||
|
||||
def changeAddressNames(script):
|
||||
for i in script['ScriptMethod']:
|
||||
addr = i['Address']
|
||||
name = i['Name']
|
||||
#sig = i['Signature']
|
||||
#typesig = i['TypeSignature']
|
||||
|
||||
#print(addr, name)
|
||||
doc.setNameAtAddress(addr, name)
|
||||
|
||||
return
|
||||
|
||||
def main():
|
||||
script_file = doc.askFile('Select script.py', None, None)
|
||||
script = deserializeJSON(script_file)
|
||||
changeAddressNames(script)
|
||||
|
||||
doc = Document.getCurrentDocument()
|
||||
main()
|
Loading…
Reference in a new issue