From 77da98d11f935d3bd5013ec9ae6d2637186e6b2c Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Tue, 25 Nov 2025 11:28:39 -0500 Subject: Add SectionMap with bulk operations and batch section APIs. --- python/binaryview.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'python') diff --git a/python/binaryview.py b/python/binaryview.py index 637868b3..2f190375 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -10054,6 +10054,16 @@ to a the type "tagRECT" found in the typelibrary "winX64common" info_data ) + def add_auto_sections(self, sections: List[core.BNSectionInfo]) -> None: + """ + ``add_auto_sections`` Adds analysis sections that specify semantic information about regions of the binary + + :param List[core.BNSectionInfo] sections: list of sections to add + :rtype: None + """ + section_list = (core.BNSectionInfo * len(sections))(*sections) + core.BNAddAutoSections(self.handle, section_list, len(sections)) + def remove_auto_section(self, name: str) -> None: core.BNRemoveAutoSection(self.handle, name) @@ -10083,6 +10093,16 @@ to a the type "tagRECT" found in the typelibrary "winX64common" info_data ) + def add_user_sections(self, sections: List[core.BNSectionInfo]) -> None: + """ + ``add_user_sections`` Adds user-defined sections that specify semantic information about regions of the binary + + :param List[core.BNSectionInfo] sections: list of sections to add + :rtype: None + """ + section_list = (core.BNSectionInfo * len(sections))(*sections) + core.BNAddUserSections(self.handle, section_list, len(sections)) + def remove_user_section(self, name: str) -> None: core.BNRemoveUserSection(self.handle, name) -- cgit v1.3.1