diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/binaryview.py | 13 | ||||
| -rw-r--r-- | python/filemetadata.py | 6 |
2 files changed, 17 insertions, 2 deletions
diff --git a/python/binaryview.py b/python/binaryview.py index 2732a8d7..b55f9aae 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -4749,8 +4749,8 @@ class BinaryView(object): def add_user_section(self, name, start, length, semantics = SectionSemantics.DefaultSectionSemantics, type = "", align = 1, entry_size = 1, linked_section = "", info_section = "", info_data = 0): """ - ``add_user_section`` creates a user-defined section that can help inform analysis by clarifying what types of - data exist in what ranges. Note that all data specified must already be mapped by an existing segment. + ``add_user_section`` creates a user-defined section that can help inform analysis by clarifying what types of + data exist in what ranges. Note that all data specified must already be mapped by an existing segment. :param str name: name of the section :param int start: virtual address of the start of the section @@ -4905,6 +4905,15 @@ class BinaryView(object): """ core.BNBinaryViewRemoveMetadata(self.handle, key) + def get_load_settings_type_names(self): + result = [] + count = ctypes.c_ulonglong(0) + names = core.BNBinaryViewGetLoadSettingsTypeNames(self.handle, count) + for i in range(count.value): + result.append(names[i]) + core.BNFreeStringList(names, count) + return result + def get_load_settings(self, type_name): settings_handle = core.BNBinaryViewGetLoadSettings(self.handle, type_name) if settings_handle is None: diff --git a/python/filemetadata.py b/python/filemetadata.py index 8c6b2cb7..f95c1142 100644 --- a/python/filemetadata.py +++ b/python/filemetadata.py @@ -344,6 +344,12 @@ class FileMetadata(object): return None return binaryninja.binaryview.BinaryView(file_metadata = self, handle = view) + def open_database_for_configuration(self, filename): + view = core.BNOpenDatabaseForConfiguration(self.handle, str(filename)) + if view is None: + return None + return binaryninja.binaryview.BinaryView(file_metadata = self, handle = view) + def save_auto_snapshot(self, progress_func = None): if progress_func is None: return core.BNSaveAutoSnapshot(self.raw.handle) |
