diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/examples/mappedview.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/python/examples/mappedview.py b/python/examples/mappedview.py index d7b78ee1..3cde3c88 100644 --- a/python/examples/mappedview.py +++ b/python/examples/mappedview.py @@ -52,7 +52,7 @@ class MappedView(BinaryView): def get_load_settings_for_data(cls, data): # This method is optional. If provided this is where the Load Settings for a BinaryViewType are specified. Binary Ninja provides # some default read-only load settings which are: - # ["loader.architecture", "loader.platform", "loader.entryPoint", "loader.imageBase", "loader.segments", "loader.sections"] + # ["loader.architecture", "loader.platform", "loader.entryPointOffset", "loader.imageBase", "loader.segments", "loader.sections"] # The default load settings are provided for consistency and convenience. # The default load settings are always generated with a read-only indication which is respected by the UI. # The read-only indication is a property that consists of a JSON name/value pair ("readOnly" : true). @@ -72,14 +72,14 @@ class MappedView(BinaryView): load_settings = cls.registered_view_type.get_default_load_settings_for_data(view) # Specify default load settings that can be overridden (from the UI). - overrides = ["loader.architecture", "loader.platform", "loader.entryPoint", "loader.imageBase", "loader.segments", "loader.sections"] + overrides = ["loader.architecture", "loader.platform", "loader.entryPointOffset", "loader.imageBase", "loader.segments", "loader.sections"] for override in overrides: if load_settings.contains(override): load_settings.update_property(override, json.dumps({'readOnly': False})) # Override the default setting values. load_settings.update_property("loader.imageBase", json.dumps({'default': 0})) - load_settings.update_property("loader.entryPoint", json.dumps({'default': 0})) + load_settings.update_property("loader.entryPointOffset", json.dumps({'default': 0})) # Specify additional custom settings. load_settings.register_setting("loader.my_custom_arch.customLoadSetting", @@ -127,8 +127,8 @@ class MappedView(BinaryView): self.platform = Architecture[arch].standalone_platform self.load_address = load_settings.get_integer("loader.imageBase", self) self.add_auto_segment(self.load_address, len(self.parent_view), 0, len(self.parent_view), SegmentFlag.SegmentReadable | SegmentFlag.SegmentExecutable) - if load_settings.contains("loader.entryPoint"): - self.entry_point_offset = load_settings.get_integer("loader.entryPoint", self) + if load_settings.contains("loader.entryPointOffset"): + self.entry_point_offset = load_settings.get_integer("loader.entryPointOffset", self) self.add_entry_point(self.load_address + self.entry_point_offset) # Note: This MappedView (Python) BinaryView implementation is incomplete. It ignores platform, section, and segment settings. |
