summaryrefslogtreecommitdiff
path: root/python/binaryview.py
AgeCommit message (Collapse)Author
2026-02-17Handle Universal binaries through container transform system.Brian Potchik
2026-02-16Fix TypeError when slicing FunctionList/BasicBlockList with [:], [n:], [:n]3rdit
2026-01-28Fix a fundamental problem with TypeBuilder.handle by deleting itPeter LaFosse
TypeBuilder.handle creates an immutable_type gets the handle and then deletes the object to which the handle belonged to. This was fundamentally a UAF. immutable_copy is an error prone api as its very easy to misuse. We should consider a re-architecture of this API. `TypeBuilder.immutable_copy().<anything>` or `Type.mutable_copy().<anything>` should be considered sketchy and immutable_copy().handle is just a straight up UAF. Prior to this commit the following would cause a crash: current_data_variable.type = PointerBuilder.create(FunctionType.create())
2026-01-16fix pydoc formatting for recent metadata API changesJordan Wiens
2026-01-16Add get_metadata() method and make query_metadata() raise KeyError consistentlyPeter LaFosse
Introduces a Pythonic get_metadata() method to BinaryView, Function, Project, TypeArchive, and TypeLibrary classes. This method behaves like dict.get(), returning a default value (None by default) when a key doesn't exist, instead of raising a KeyError. Additionally, updates query_metadata() in TypeArchive and TypeLibrary to raise KeyError when a key is not found, making them consistent with BinaryView, Function, and Project. Previously these two classes returned None on missing keys. This breaking change is documented in the method docstrings. This provides a more consistent and Pythonic API for querying metadata across all metadata-supporting classes. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-15Make add_user/auto_segments/sections more pythonic.Peter LaFosse
This introduces two new dataclasses SegmentInfo and SectionInfo which hold information about their respective objects. These are used for specifying information to a BinaryView while class Segment and Section are still the objects used after registration. Additionally I've created two helper functions in Segment/Section which return the respective Info structure which could be useful if you wanted to modify existing Segments/Sections Currently these two APIs are only used by the add_segments/add_sections APIs but maybe more useful in the future.
2026-01-01update copyrights for 2026Jordan Wiens
2025-12-11Specify fixed underlying types for enums exposed by coreMark Rowe
This allows a few widely-used enums to be shrunk from 4 bytes to 1 byte, improving packing when they're used as struct members. To remain compatible with C, we follow CoreFoundation's approach and use a macro when defining the enum: ``` #if defined(__cplusplus) || __has_extension(c_fixed_enum) #define BN_ENUM(type, name) enum name : type #else #define BN_ENUM(type, name) typedef type name; enum #endif BN_ENUM(uint8_t, SomeEnum) { ... } ``` In C++ and C23 this will expand to an enum with a fixed underlying type. In older C language versions, this will result in the enum type being a typedef of the underlying type, with an unnamed enum providing the enum values. Minor changes were needed within the Python bindings to update places that made assumptions about the underlying type of the enums.
2025-12-01[Python] Add `BinaryView.is_offset_backed_by_file`Mason Reed
Seems we forgot to expose this one
2025-11-25Add SectionMap with bulk operations and batch section APIs.Brian Potchik
2025-11-23Add IsOffsetReadOnlySemantics API.Brian Potchik
2025-11-23Unify SettingsCache and MemoryMap access under immutable snapshots for ↵Brian Potchik
consistent, lock-free AnalysisContext queries.
2025-11-21Add get and __contains__ methods to all *MetaClassPeter LaFosse
Fixes: https://github.com/Vector35/binaryninja-api/issues/7588
2025-11-19Fix BinaryView.set_manual_type_source_overrideJosh Ferrell
2025-11-19Improve python api type hintsJosh Ferrell
2025-11-10improved indentation and update formatting detectionJordan Wiens
2025-11-10fix missing newlines breaking listsJordan Wiens
2025-11-10fix small formatting in memorymap api docsJordan Wiens
2025-11-04Update MemoryMap documentation. (skip-ci)Brian Potchik
2025-11-02add more keywords to search APIJordan Wiens
2025-11-02additional error handling for utf8 decodingJordan Wiens
2025-10-31Add optional display name field for memory regions.Brian Potchik
2025-10-27Add documentation to the constant renderer and string recognizer APIsRusty Wagner
2025-10-21fix documentation indentationJordan Wiens
2025-10-21Add derived strings and string recognizer APIRusty Wagner
2025-10-21Add missing rebased notification to Python APIRusty Wagner
2025-10-16Add GetTypeCount APIPeter LaFosse
Add note about type_names not being sorted anymore
2025-10-15Fix some python type hintsJosh Ferrell
2025-09-02Do not change symbol type when setting data variable nameJosh Ferrell
2025-08-27Revise the documentation on how multiple symbols at the same address are handledMark Rowe
To avoid non-determinism and provide consistent behavior in all cases, now only confidence, symbol type, and name are considered when disambiguating multiple symbols at the same address. The previously documented behavior was not what was implemented. While recency was considered in some cases for disambiguating symbols at the same address, respecting it consistetly results in non-deterministic behavior when symbols are being added concurrently by multiple sources.
2025-08-27Revert "Clarify the documentation on how multiple symbols at the same ↵Mark Rowe
address are handled" This reverts commit 6293afcb4e10997838f94c38430feba9742bea75.
2025-08-27Clarify the documentation on how multiple symbols at the same address are ↵Mark Rowe
handled
2025-08-18Add ability to rebase the current view through the UIContext.Brian Potchik
2025-08-01Use log_error_for_exception in the Python API to pass tracebacks in the ↵Rusty Wagner
stack trace associated with log messages, instead of creating large mutli-line messages for every exception
2025-07-29Add support for declarative downstream dependencies to workflow system.Brian Potchik
2025-07-22Update define_auto_symbol_and_var_or_function API to pass confidence type.Brian Potchik
2025-07-15Add the ability to limit the number of results in the cross reference APIsRusty Wagner
2025-07-15Expose analysis' system call type and name retrievalMason Reed
Previously we only really had a way to access the platform system call information, this was missing the system call information found in type libraries Fixes https://github.com/Vector35/binaryninja-api/issues/7089
2025-07-14Change return type of parse_types_from_string to BasicTypeParserResultAlexander Khosrowshahi
2025-07-12Add support for unbacked memory regions directly in the memory map.Brian Potchik
2025-07-09reimplement llil validation for caller_sites and implement plural IL forms ↵Jordan Wiens
on references
2025-07-03Expose Add/RemoveDataReference and ensure BinaryViews use this API instead ↵Peter LaFosse
of the _user_ variant
2025-07-02Add outlining support for wmemcpy.Brian Potchik
2025-07-02must use double backquotes instead of single in RSTJordan Wiens
2025-06-30Fix busted stringify_unicode_data python API.Brian Potchik
2025-06-23Perform BB analysis from Architecture C++ APIBrandon Miller
This commit moves AnalyzeBasicBlocks from the binary ninja core to the API and allows architecture plugins to optionally override AnalyzeBasicBlocks for a custom implementation Supply ABB inputs in BNBasicBlockAnalysisContext Register default analyze basic blocks callback This allows the nanomips and rust core architecture plugins to work again while using the C++ API DefaultAnalyzeBasicBlocks Use default ABB from Python plugins Fix bug in API ArchAndAddr operator overload Python APIs for basic block analysis
2025-06-16Don't yield None in BinaryView hlil|mlil_functionsBrandon Miller
2025-06-06Option to ignore whitespace in searchesGlenn Smith
2025-06-06Handle None when querying IL in Python generatorsBrandon Miller
2025-05-26Fix analysis state properties to return enums instead of integers.Brian Potchik