BinaryView class is the primary interface for interacting with binary files in Binary Ninja. It provides methods for reading data, navigating segments, accessing functions, and managing analysis.
Class Declaration
Defined inbinaryninjaapi.h:5541
Creating and Loading Binary Views
Load a Binary File
Get View Type
Reading Binary Data
Read Bytes
len bytes from virtual address offset into the buffer dest.
Parameters:
dest- Destination bufferoffset- Virtual address to read fromlen- Number of bytes to read
Write Bytes
len bytes from data to virtual address offset.
Address Information
Get Entry Point
Get Start Address
Get Length
Address Validation
Function Access
Get All Functions
Get Function at Address
Get Entry Functions
Platform and Architecture
Get Default Platform
Get Default Architecture
Segments and Sections
Get Segments
Get Sections
Strings
Get String References
Symbols
Get Symbol
Get All Symbols
Analysis Control
Update Analysis
UpdateAnalysisAndWait() blocks until analysis completes.
Abort Analysis
Add Function
File Metadata
Get File Metadata
Custom BinaryView Subclasses
You can create custom binary view types by subclassingBinaryView:
Complete Example
From the bin-info example:See Also
- Function Class - Working with functions
- Architecture Class - CPU architecture support
- Type Class - Type system integration