(hopefully) lower python requirement to 3.8
This commit is contained in:
@@ -71,7 +71,7 @@ class BinaryNinjaDisassemblerInterface(BaseDisassemblerInterface):
|
||||
self._type_cache[type] = parsed
|
||||
return parsed
|
||||
|
||||
def _parse_type_source(self, types: str, filename: str | None = None):
|
||||
def _parse_type_source(self, types: str, filename: Union[str, None] = None):
|
||||
parsed_types, errors = TypeParser.default.parse_types_from_source(
|
||||
types,
|
||||
filename if filename else "types.hpp",
|
||||
@@ -127,7 +127,7 @@ class BinaryNinjaDisassemblerInterface(BaseDisassemblerInterface):
|
||||
self._view.set_analysis_hold(False)
|
||||
self._view.update_analysis()
|
||||
|
||||
def define_function(self, address: int, end: int | None = None):
|
||||
def define_function(self, address: int, end: Union[int, None] = None):
|
||||
if self._view.get_function_at(address) is not None:
|
||||
return
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ class GhidraDisassemblerInterface(BaseDisassemblerInterface):
|
||||
def on_finish(self):
|
||||
pass
|
||||
|
||||
def define_function(self, address: int, end: int | None = None):
|
||||
def define_function(self, address: int, end: Union[int, None] = None):
|
||||
address = self._to_address(address)
|
||||
# Don't override existing functions
|
||||
fn = getFunctionAt(address)
|
||||
|
||||
@@ -118,7 +118,7 @@ class IDADisassemblerInterface(BaseDisassemblerInterface):
|
||||
def on_finish(self):
|
||||
ida_ida.inf_set_genflags(self._cached_genflags)
|
||||
|
||||
def define_function(self, address: int, end: int | None = None):
|
||||
def define_function(self, address: int, end: Union[int, None] = None):
|
||||
if self._skip_function_creation:
|
||||
return
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
import json
|
||||
import os
|
||||
from datetime import datetime
|
||||
from typing import Union
|
||||
import abc
|
||||
|
||||
class BaseStatusHandler(abc.ABC):
|
||||
@@ -31,7 +32,7 @@ class BaseDisassemblerInterface(abc.ABC):
|
||||
def on_finish(self): pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def define_function(self, address: int, end: int | None = None): pass
|
||||
def define_function(self, address: int, end: Union[int, None] = None): pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def define_data_array(self, address: int, type: str, count: int): pass
|
||||
@@ -111,7 +112,7 @@ class ScriptContext:
|
||||
self._backend.set_data_name(addr, definition['name'])
|
||||
self._backend.set_data_comment(addr, definition['string'])
|
||||
|
||||
def define_field(self, addr: str, name: str, type: str, il_type: str | None = None):
|
||||
def define_field(self, addr: str, name: str, type: str, il_type: Union[str, None] = None):
|
||||
address = self.from_hex(addr)
|
||||
self._backend.set_data_type(address, type)
|
||||
self._backend.set_data_name(address, name)
|
||||
|
||||
@@ -332,9 +332,9 @@ The `--seperate-attributes` switch directs Il2CppInspector to put assembly-level
|
||||
|
||||
### Adding metadata to your IDA workflow
|
||||
|
||||
**NOTE:** IDA 7.6+ is required, but 7.7 is recommended.
|
||||
**NOTE:** IDA 7.6+ is required, but 7.7 is recommended. You also need to use Python 3.8+ to be able to run the script.
|
||||
|
||||
**NOTE:** Run script as-soon-as-possible after IDA loads binary into database
|
||||
**NOTE:** Run script as-soon-as-possible after IDA loads binary into database!
|
||||
|
||||
Simply run Il2CppInspector with the `-p` switch to choose the IDA script output file. Load your binary file into IDA, press Alt+F7 and select the generated script. Observe the Output Window while IDA analyzes the file - this may take a long time.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user