binaryninjaapi.h File Reference

Classes

class  BinaryNinja::RefCountObject
 
class  BinaryNinja::CoreRefCountObject< T, AddObjectReference, FreeObjectReference >
 
class  BinaryNinja::StaticCoreRefCountObject< T >
 
class  BinaryNinja::Ref< T >
 
class  BinaryNinja::ConfidenceBase
 
class  BinaryNinja::Confidence< T >
 
class  BinaryNinja::Confidence< Ref< T > >
 
class  BinaryNinja::LogListener
 
class  BinaryNinja::Logger
 
class  BinaryNinja::LogRegistry
 
class  BinaryNinja::DataBuffer
 
class  BinaryNinja::TemporaryFile
 
class  BinaryNinja::NavigationHandler
 
class  BinaryNinja::User
 
struct  BinaryNinja::DatabaseException
 
class  BinaryNinja::KeyValueStore
 
class  BinaryNinja::Snapshot
 
class  BinaryNinja::Database
 
struct  BinaryNinja::UndoAction
 
struct  BinaryNinja::UndoEntry
 
struct  BinaryNinja::MergeResult
 
class  BinaryNinja::SaveSettings
 
class  BinaryNinja::FileMetadata
 
class  BinaryNinja::BinaryDataNotification
 
class  BinaryNinja::FileAccessor
 
class  BinaryNinja::CoreFileAccessor
 
class  BinaryNinja::NameList
 
class  BinaryNinja::QualifiedName
 
class  BinaryNinja::NameSpace
 
class  BinaryNinja::Symbol
 
struct  BinaryNinja::ReferenceSource
 
struct  BinaryNinja::TypeFieldReference
 
struct  BinaryNinja::ILReferenceSource
 
struct  BinaryNinja::TypeReferenceSource
 
struct  BinaryNinja::InstructionTextToken
 
struct  BinaryNinja::DisassemblyTextLineTypeInfo
 
struct  BinaryNinja::DisassemblyTextLine
 
struct  BinaryNinja::LinearDisassemblyLine
 
struct  BinaryNinja::TypeDefinitionLine
 
class  BinaryNinja::AnalysisCompletionEvent
 
struct  BinaryNinja::ActiveAnalysisInfo
 
struct  BinaryNinja::AnalysisInfo
 
struct  BinaryNinja::DataVariable
 
struct  BinaryNinja::DataVariableAndName
 
class  BinaryNinja::TagType
 
class  BinaryNinja::Tag
 
struct  BinaryNinja::TagReference
 
class  BinaryNinja::Segment
 
class  BinaryNinja::Section
 
class  BinaryNinja::QueryMetadataException
 
class  BinaryNinja::BinaryView
 BinaryView is the base class for creating views on binary data (e.g. More...
 
class  BinaryNinja::Relocation
 
class  BinaryNinja::BinaryData
 
class  BinaryNinja::BinaryViewType
 
class  BinaryNinja::CoreBinaryViewType
 
class  BinaryNinja::ReadException
 
class  BinaryNinja::BinaryReader
 
class  BinaryNinja::WriteException
 
class  BinaryNinja::BinaryWriter
 
struct  BinaryNinja::TransformParameter
 
class  BinaryNinja::Transform
 
class  BinaryNinja::CoreTransform
 
struct  BinaryNinja::InstructionInfo
 
struct  BinaryNinja::NameAndType
 
class  BinaryNinja::Architecture
 The Architecture class is the base class for all CPU architectures. More...
 
class  BinaryNinja::CoreArchitecture
 
class  BinaryNinja::ArchitectureExtension
 
class  BinaryNinja::ArchitectureHook
 
struct  BinaryNinja::Variable
 
struct  BinaryNinja::VariableReferenceSource
 
struct  BinaryNinja::FunctionParameter
 
struct  BinaryNinja::QualifiedNameAndType
 
struct  BinaryNinja::TypeAndId
 
struct  BinaryNinja::ParsedType
 
struct  BinaryNinja::TypeParserResult
 
struct  BinaryNinja::TypeParserError
 
class  BinaryNinja::Type
 
class  BinaryNinja::TypeBuilder
 
class  BinaryNinja::NamedTypeReference
 
class  BinaryNinja::NamedTypeReferenceBuilder
 
struct  BinaryNinja::StructureMember
 
class  BinaryNinja::Structure
 
class  BinaryNinja::StructureBuilder
 
struct  BinaryNinja::EnumerationMember
 
class  BinaryNinja::Enumeration
 
class  BinaryNinja::EnumerationBuilder
 
class  BinaryNinja::AnalysisContext
 
class  BinaryNinja::Activity
 
class  BinaryNinja::Workflow
 
class  BinaryNinja::DisassemblySettings
 
struct  BinaryNinja::BasicBlockEdge
 
class  BinaryNinja::BasicBlock
 
struct  BinaryNinja::VariableNameAndType
 
struct  BinaryNinja::StackVariableReference
 
struct  BinaryNinja::IndirectBranchInfo
 
struct  BinaryNinja::ArchAndAddr
 
struct  BinaryNinja::LookupTableEntry
 
struct  BinaryNinja::RegisterValue
 
struct  BinaryNinja::PossibleValueSet
 
class  BinaryNinja::Function
 
class  BinaryNinja::AdvancedFunctionAnalysisDataRequestor
 
struct  BinaryNinja::FlowGraphEdge
 
class  BinaryNinja::FlowGraphNode
 
class  BinaryNinja::FlowGraphLayoutRequest
 
class  BinaryNinja::FlowGraph
 
class  BinaryNinja::CoreFlowGraph
 
struct  BinaryNinja::LowLevelILLabel
 
struct  BinaryNinja::ILSourceLocation
 
class  BinaryNinja::LowLevelILFunction
 
struct  BinaryNinja::MediumLevelILLabel
 
class  BinaryNinja::MediumLevelILFunction
 
class  BinaryNinja::HighLevelILFunction
 
class  BinaryNinja::LanguageRepresentationFunction
 
class  BinaryNinja::FunctionRecognizer
 
class  BinaryNinja::RelocationHandler
 
class  BinaryNinja::CoreRelocationHandler
 
class  BinaryNinja::UpdateException
 
struct  BinaryNinja::UpdateChannel
 
struct  BinaryNinja::UpdateVersion
 UpdateVersion documentation. More...
 
struct  BinaryNinja::PluginCommandContext
 
class  BinaryNinja::PluginCommand
 
class  BinaryNinja::CallingConvention
 
class  BinaryNinja::CoreCallingConvention
 
class  BinaryNinja::Platform
 Platform base class. More...
 
class  BinaryNinja::TypeParser
 
class  BinaryNinja::CoreTypeParser
 
class  BinaryNinja::TypePrinter
 
class  BinaryNinja::CoreTypePrinter
 
class  BinaryNinja::DownloadInstance
 
struct  BinaryNinja::DownloadInstance::Response
 
class  BinaryNinja::CoreDownloadInstance
 
class  BinaryNinja::DownloadProvider
 
class  BinaryNinja::CoreDownloadProvider
 
class  BinaryNinja::WebsocketClient
 
class  BinaryNinja::CoreWebsocketClient
 
class  BinaryNinja::WebsocketProvider
 
class  BinaryNinja::CoreWebsocketProvider
 
class  BinaryNinja::ScriptingOutputListener
 
class  BinaryNinja::ScriptingInstance
 
class  BinaryNinja::CoreScriptingInstance
 
class  BinaryNinja::ScriptingProvider
 
class  BinaryNinja::CoreScriptingProvider
 
class  BinaryNinja::MainThreadAction
 
class  BinaryNinja::MainThreadActionHandler
 
class  BinaryNinja::BackgroundTask
 
struct  BinaryNinja::FormInputField
 
class  BinaryNinja::ReportCollection
 
class  BinaryNinja::InteractionHandler
 
class  BinaryNinja::RepoPlugin
 
class  BinaryNinja::Repository
 
class  BinaryNinja::RepositoryManager
 
class  BinaryNinja::Settings
 
class  BinaryNinja::Metadata
 
class  BinaryNinja::DataRenderer
 
class  BinaryNinja::DataRendererContainer
 
class  BinaryNinja::DisassemblyTextRenderer
 
struct  BinaryNinja::LinearViewObjectIdentifier
 
class  BinaryNinja::LinearViewObject
 
class  BinaryNinja::LinearViewCursor
 
class  BinaryNinja::SimplifyName
 
struct  BinaryNinja::FindParameters
 
struct  BinaryNinja::DebugFunctionInfo
 
class  BinaryNinja::DebugInfo
 
class  BinaryNinja::DebugInfoParser
 
class  BinaryNinja::CustomDebugInfoParser
 
class  BinaryNinja::SecretsProvider
 Class for storing secrets (e.g. More...
 
class  BinaryNinja::CoreSecretsProvider
 

Namespaces

namespace  BinaryNinja
 

Macros

#define NOEXCEPT   noexcept
 

Typedefs

typedef size_t BinaryNinja::ExprId
 
typedef BNPluginOrigin BinaryNinja::PluginOrigin
 
typedef BNPluginStatus BinaryNinja::PluginStatus
 
typedef BNPluginType BinaryNinja::PluginType
 
typedef BNMetadataType BinaryNinja::MetadataType
 

Enumerations

enum  BinaryNinja::ReferenceType {
  BinaryNinja::UnspecifiedReferenceType = 0x0 , BinaryNinja::ReadReferenceType = 0x1 , BinaryNinja::WriteReferenceType = 0x2 , BinaryNinja::ExecuteReferenceType = 0x4 ,
  BinaryNinja::DataVariableReferenceType = 0x8 , BinaryNinja::DirectTypeReferenceType = 0x10 , BinaryNinja::IndirectTypeReferenceType = 0x20
}
 

Functions

void BinaryNinja::Log (BNLogLevel level, const char *fmt,...)
 Logs to the error console with the given BNLogLevel. More...
 
void BinaryNinja::LogTrace (const char *fmt,...)
 LogTrace only writes text to the error console if the console is set to log level: DebugLog Log level and the build is not a DEBUG build (i.e. More...
 
void BinaryNinja::LogDebug (const char *fmt,...)
 LogDebug only writes text to the error console if the console is set to log level: DebugLog Log level DebugLog is the most verbose logging level in release builds. More...
 
void BinaryNinja::LogInfo (const char *fmt,...)
 LogInfo always writes text to the error console, and corresponds to the log level: InfoLog. More...
 
void BinaryNinja::LogWarn (const char *fmt,...)
 LogWarn writes text to the error console including a warning icon, and also shows a warning icon in the bottom pane. More...
 
void BinaryNinja::LogError (const char *fmt,...)
 LogError writes text to the error console and pops up the error console. More...
 
void BinaryNinja::LogAlert (const char *fmt,...)
 LogAlert pops up a message box displaying the alert message and logs to the error console. More...
 
void BinaryNinja::LogToStdout (BNLogLevel minimumLevel)
 
void BinaryNinja::LogToStderr (BNLogLevel minimumLevel)
 
bool BinaryNinja::LogToFile (BNLogLevel minimumLevel, const std::string &path, bool append=false)
 
void BinaryNinja::CloseLogs ()
 
std::string BinaryNinja::EscapeString (const std::string &s)
 
std::string BinaryNinja::UnescapeString (const std::string &s)
 
bool BinaryNinja::PreprocessSource (const std::string &source, const std::string &fileName, std::string &output, std::string &errors, const std::vector< std::string > &includeDirs=std::vector< std::string >())
 
void BinaryNinja::DisablePlugins ()
 
bool BinaryNinja::IsPluginsEnabled ()
 
bool BinaryNinja::InitPlugins (bool allowUserPlugins=true)
 
void BinaryNinja::InitCorePlugins ()
 
void BinaryNinja::InitUserPlugins ()
 
void BinaryNinja::InitRepoPlugins ()
 
std::string BinaryNinja::GetBundledPluginDirectory ()
 
void BinaryNinja::SetBundledPluginDirectory (const std::string &path)
 
std::string BinaryNinja::GetUserDirectory ()
 
std::string BinaryNinja::GetSettingsFileName ()
 
std::string BinaryNinja::GetRepositoriesDirectory ()
 
std::string BinaryNinja::GetInstallDirectory ()
 
std::string BinaryNinja::GetUserPluginDirectory ()
 
std::string BinaryNinja::GetPathRelativeToBundledPluginDirectory (const std::string &path)
 
std::string BinaryNinja::GetPathRelativeToUserPluginDirectory (const std::string &path)
 
std::string BinaryNinja::GetPathRelativeToUserDirectory (const std::string &path)
 
bool BinaryNinja::ExecuteWorkerProcess (const std::string &path, const std::vector< std::string > &args, const DataBuffer &input, std::string &output, std::string &errors, bool stdoutIsText=false, bool stderrIsText=true)
 
std::string BinaryNinja::GetVersionString ()
 
std::string BinaryNinja::GetLicensedUserEmail ()
 
std::string BinaryNinja::GetProduct ()
 
std::string BinaryNinja::GetProductType ()
 
std::string BinaryNinja::GetSerialNumber ()
 
int BinaryNinja::GetLicenseCount ()
 
bool BinaryNinja::IsUIEnabled ()
 
uint32_t BinaryNinja::GetBuildId ()
 
bool BinaryNinja::AreAutoUpdatesEnabled ()
 
void BinaryNinja::SetAutoUpdatesEnabled (bool enabled)
 
uint64_t BinaryNinja::GetTimeSinceLastUpdateCheck ()
 
void BinaryNinja::UpdatesChecked ()
 
std::string BinaryNinja::GetActiveUpdateChannel ()
 
void BinaryNinja::SetActiveUpdateChannel (const std::string &channel)
 
void BinaryNinja::SetCurrentPluginLoadOrder (BNPluginLoadOrder order)
 
void BinaryNinja::AddRequiredPluginDependency (const std::string &name)
 
void BinaryNinja::AddOptionalPluginDependency (const std::string &name)
 
Ref< BinaryViewBinaryNinja::OpenView (const std::string &filename, bool updateAnalysis=true, std::function< bool(size_t, size_t)> progress={}, Json::Value options=Json::Value(Json::objectValue))
 OpenView opens a file on disk and returns a BinaryView, attempting to use the most relevant BinaryViewType and generating default load options (which are overridable). More...
 
Ref< BinaryViewBinaryNinja::OpenView (const DataBuffer &rawData, bool updateAnalysis=true, std::function< bool(size_t, size_t)> progress={}, Json::Value options=Json::Value(Json::objectValue))
 Open a BinaryView from a raw data buffer, initializing data views and loading settings. More...
 
Ref< BinaryViewBinaryNinja::OpenView (Ref< BinaryView > rawData, bool updateAnalysis=true, std::function< bool(size_t, size_t)> progress={}, Json::Value options=Json::Value(Json::objectValue), bool isDatabase=false)
 Open a BinaryView from a raw BinaryView, initializing data views and loading settings. More...
 
bool BinaryNinja::DemangleMS (Architecture *arch, const std::string &mangledName, Type **outType, QualifiedName &outVarName, const bool simplify=false)
 
bool BinaryNinja::DemangleMS (Architecture *arch, const std::string &mangledName, Type **outType, QualifiedName &outVarName, const Ref< BinaryView > &view)
 
bool BinaryNinja::DemangleGNU3 (Ref< Architecture > arch, const std::string &mangledName, Type **outType, QualifiedName &outVarName, const bool simplify=false)
 
bool BinaryNinja::DemangleGNU3 (Ref< Architecture > arch, const std::string &mangledName, Type **outType, QualifiedName &outVarName, const Ref< BinaryView > &view)
 
void BinaryNinja::RegisterMainThread (MainThreadActionHandler *handler)
 
Ref< MainThreadAction > BinaryNinja::ExecuteOnMainThread (const std::function< void()> &action)
 
void BinaryNinja::ExecuteOnMainThreadAndWait (const std::function< void()> &action)
 
bool BinaryNinja::IsMainThread ()
 
void BinaryNinja::WorkerEnqueue (const std::function< void()> &action)
 
void BinaryNinja::WorkerEnqueue (RefCountObject *owner, const std::function< void()> &action)
 
void BinaryNinja::WorkerPriorityEnqueue (const std::function< void()> &action)
 
void BinaryNinja::WorkerPriorityEnqueue (RefCountObject *owner, const std::function< void()> &action)
 
void BinaryNinja::WorkerInteractiveEnqueue (const std::function< void()> &action)
 
void BinaryNinja::WorkerInteractiveEnqueue (RefCountObject *owner, const std::function< void()> &action)
 
size_t BinaryNinja::GetWorkerThreadCount ()
 
void BinaryNinja::SetWorkerThreadCount (size_t count)
 
std::string BinaryNinja::MarkdownToHTML (const std::string &contents)
 
void BinaryNinja::RegisterInteractionHandler (InteractionHandler *handler)
 
void BinaryNinja::ShowPlainTextReport (const std::string &title, const std::string &contents)
 
void BinaryNinja::ShowMarkdownReport (const std::string &title, const std::string &contents, const std::string &plainText="")
 
void BinaryNinja::ShowHTMLReport (const std::string &title, const std::string &contents, const std::string &plainText="")
 
void BinaryNinja::ShowGraphReport (const std::string &title, FlowGraph *graph)
 
void BinaryNinja::ShowReportCollection (const std::string &title, ReportCollection *reports)
 
bool BinaryNinja::GetTextLineInput (std::string &result, const std::string &prompt, const std::string &title)
 
bool BinaryNinja::GetIntegerInput (int64_t &result, const std::string &prompt, const std::string &title)
 
bool BinaryNinja::GetAddressInput (uint64_t &result, const std::string &prompt, const std::string &title)
 
bool BinaryNinja::GetChoiceInput (size_t &idx, const std::string &prompt, const std::string &title, const std::vector< std::string > &choices)
 
bool BinaryNinja::GetOpenFileNameInput (std::string &result, const std::string &prompt, const std::string &ext="")
 
bool BinaryNinja::GetSaveFileNameInput (std::string &result, const std::string &prompt, const std::string &ext="", const std::string &defaultName="")
 
bool BinaryNinja::GetDirectoryNameInput (std::string &result, const std::string &prompt, const std::string &defaultName="")
 
bool BinaryNinja::GetFormInput (std::vector< FormInputField > &fields, const std::string &title)
 
BNMessageBoxButtonResult BinaryNinja::ShowMessageBox (const std::string &title, const std::string &text, BNMessageBoxButtonSet buttons=OKButtonSet, BNMessageBoxIcon icon=InformationIcon)
 
bool BinaryNinja::OpenUrl (const std::string &url)
 
std::function< bool(size_t, size_t)> BinaryNinja::SplitProgress (std::function< bool(size_t, size_t)> originalFn, size_t subpart, size_t subpartCount)
 Split a single progress function into equally sized subparts. More...
 
std::function< bool(size_t, size_t)> BinaryNinja::SplitProgress (std::function< bool(size_t, size_t)> originalFn, size_t subpart, std::vector< double > subpartWeights)
 Split a single progress function into subparts. More...
 
std::string BinaryNinja::GetUniqueIdentifierString ()
 
std::map< std::string, uint64_t > BinaryNinja::GetMemoryUsageInfo ()
 
template<>
std::vector< std::string > BinaryNinja::Settings::QueryProperty< std::vector< std::string > > (const std::string &key, const std::string &property)
 
template<>
std::string BinaryNinja::Settings::Get< std::string > (const std::string &key, Ref< BinaryView > view, BNSettingsScope *scope)
 
template<>
std::vector< std::string > BinaryNinja::Settings::Get< std::vector< std::string > > (const std::string &key, Ref< BinaryView > view, BNSettingsScope *scope)
 

Class Documentation

◆ BinaryNinja::UndoEntry

struct BinaryNinja::UndoEntry
Class Members
vector< UndoAction > actions
string hash
uint64_t timestamp
Ref< User > user

◆ BinaryNinja::ReferenceSource

struct BinaryNinja::ReferenceSource
Class Members
uint64_t addr
Ref< Architecture > arch
Ref< Function > func

◆ BinaryNinja::TypeFieldReference

struct BinaryNinja::TypeFieldReference
Class Members
uint64_t addr
Ref< Architecture > arch
Ref< Function > func
Confidence< Ref< Type > > incomingType
size_t size

◆ BinaryNinja::ILReferenceSource

struct BinaryNinja::ILReferenceSource
Class Members
uint64_t addr
Ref< Architecture > arch
size_t exprId
Ref< Function > func
BNFunctionGraphType type

◆ BinaryNinja::TypeReferenceSource

struct BinaryNinja::TypeReferenceSource
Class Members
QualifiedName name
uint64_t offset
BNTypeReferenceType type

◆ BinaryNinja::AnalysisInfo

struct BinaryNinja::AnalysisInfo
Class Members
vector< ActiveAnalysisInfo > activeInfo
uint64_t analysisTime
BNAnalysisState state

◆ BinaryNinja::TransformParameter

struct BinaryNinja::TransformParameter
Class Members
size_t fixedLength
string longName
string name

◆ BinaryNinja::VariableReferenceSource

struct BinaryNinja::VariableReferenceSource
Class Members
ILReferenceSource source
Variable var

◆ BinaryNinja::TypeParserResult

struct BinaryNinja::TypeParserResult
Class Members
vector< ParsedType > functions
vector< ParsedType > types
vector< ParsedType > variables

◆ BinaryNinja::TypeParserError

struct BinaryNinja::TypeParserError
Class Members
uint64_t column
string fileName
uint64_t line
string message
BNTypeParserErrorSeverity severity

◆ BinaryNinja::StructureMember

struct BinaryNinja::StructureMember
Class Members
BNMemberAccess access
string name
uint64_t offset
BNMemberScope scope
Ref< Type > type

◆ BinaryNinja::EnumerationMember

struct BinaryNinja::EnumerationMember
Class Members
bool isDefault
string name
uint64_t value

◆ BinaryNinja::BasicBlockEdge

struct BinaryNinja::BasicBlockEdge
Class Members
bool backEdge
bool fallThrough
Ref< BasicBlock > target
BNBranchType type

◆ BinaryNinja::StackVariableReference

struct BinaryNinja::StackVariableReference
Class Members
string name
int64_t referencedOffset
size_t size
uint32_t sourceOperand
Confidence< Ref< Type > > type
Variable var

◆ BinaryNinja::IndirectBranchInfo

struct BinaryNinja::IndirectBranchInfo
Class Members
bool autoDefined
uint64_t destAddr
Ref< Architecture > destArch
uint64_t sourceAddr
Ref< Architecture > sourceArch

◆ BinaryNinja::LookupTableEntry

struct BinaryNinja::LookupTableEntry
Class Members
vector< int64_t > fromValues
int64_t toValue

◆ BinaryNinja::FlowGraphEdge

struct BinaryNinja::FlowGraphEdge
Class Members
bool backEdge
vector< BNPoint > points
BNEdgeStyle style
Ref< FlowGraphNode > target
BNBranchType type

◆ BinaryNinja::DownloadInstance::Response

struct BinaryNinja::DownloadInstance::Response
Class Members
unordered_map< string, string > headers
uint16_t statusCode

◆ BinaryNinja::FindParameters

struct BinaryNinja::FindParameters
Class Members
bool findAll
DataBuffer findBuffer
uint64_t findConstant
BNFindFlag flags
BNFunctionGraphType ilType
vector< BNAddressRange > ranges
BNFindRangeType rangeType
string string
uint64_t totalLength
BNFindType type

Macro Definition Documentation

◆ NOEXCEPT

#define NOEXCEPT   noexcept