Add Hopper Disassembler Script (#680)

* Add Hopper Disassembler Script

* Update hopper-py3.py

Remove tkinter import
This commit is contained in:
hliriano03 2023-02-02 21:25:27 -05:00 committed by GitHub
parent 5689cfb1e6
commit e3b6ab8eb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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()