Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binary Ninja plugin: Switch from define_user_type to define_types #753

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions Il2CppDumper/Il2CppBinaryNinja/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,14 @@ def __init__(self, bv: BinaryView, script_path: str,
self.has_types = False

def process_header(self):
self.progress = "Il2Cpp types (1/3)"
self.progress = "Il2Cpp types (1/3): parsing header"
with open(self.header_path) as f:
result = self.bv.parse_types_from_string(f.read())
length = len(result.types)
i = 0
for name in result.types:
i += 1
if i % 100 == 0:
percent = i / length * 100
self.progress = f"Il2Cpp types: {percent:.2f}%"
if self.bv.get_type_by_name(name):
continue
self.bv.define_user_type(name, result.types[name])

type_list = [(Type.generate_auto_type_id("il2cppdumper", name), name, result.types[name]) for name in result.types]

self.progress = "Il2Cpp types (1/3): defining types"
self.bv.define_types(type_list)

def process_methods(self, data: dict):
self.progress = f"Il2Cpp methods (2/3)"
Expand Down