warp.warp module

Class

Description

binaryninja.warp.warp.BasicBlockGUID

binaryninja.warp.warp.ConstraintGUID

binaryninja.warp.warp.FunctionGUID

binaryninja.warp.warp.Source

binaryninja.warp.warp.TypeGUID

binaryninja.warp.warp.WarpChunk

binaryninja.warp.warp.WarpConstraint

binaryninja.warp.warp.WarpContainer

binaryninja.warp.warp.WarpContainerResponse

binaryninja.warp.warp.WarpContainerSearchItem

binaryninja.warp.warp.WarpContainerSearchQuery

binaryninja.warp.warp.WarpFile

binaryninja.warp.warp.WarpFunction

binaryninja.warp.warp.WarpFunctionComment

binaryninja.warp.warp.WarpProcessor

binaryninja.warp.warp.WarpProcessorState

binaryninja.warp.warp.WarpTarget

binaryninja.warp.warp.WarpType

binaryninja.warp.warp.WarpUUID

Function

Description

binaryninja.warp.warp.get_basic_block_guid

binaryninja.warp.warp.get_function_guid

binaryninja.warp.warp.is_instruction_blacklisted

binaryninja.warp.warp.is_instruction_computed_variant

Checks to see if the instruction is variant due to some computed value. Must use LLIL.

binaryninja.warp.warp.is_instruction_variant

binaryninja.warp.warp.run_matcher

BasicBlockGUID

class BasicBlockGUID[source]

Bases: WarpUUID

ConstraintGUID

class ConstraintGUID[source]

Bases: WarpUUID

FunctionGUID

class FunctionGUID[source]

Bases: WarpUUID

Source

class Source[source]

Bases: WarpUUID

TypeGUID

class TypeGUID[source]

Bases: WarpUUID

WarpChunk

class WarpChunk[source]

Bases: object

__init__(handle: BNWARPChunk)[source]
Parameters:

handle (BNWARPChunk) –

property functions: List[WarpFunction]
property types: List[WarpType]

WarpConstraint

class WarpConstraint[source]

Bases: object

WarpConstraint(guid: binaryninja.warp.warp.ConstraintGUID, offset: Optional[int])

__init__(guid: ConstraintGUID, offset: int | None) None
Parameters:
Return type:

None

static from_api(constraint: BNWARPConstraint) WarpConstraint[source]
Parameters:

constraint (BNWARPConstraint) –

Return type:

WarpConstraint

guid: ConstraintGUID
offset: int | None

WarpContainer

class WarpContainer[source]

Bases: object

__init__(handle: BNWARPContainer)[source]
Parameters:

handle (BNWARPContainer) –

static add(name: str) WarpContainer[source]
Parameters:

name (str) –

Return type:

WarpContainer

add_functions(target: WarpTarget, source: Source, functions: List[Function]) bool[source]
Parameters:
Return type:

bool

add_source(source_path: str) Source | None[source]
Parameters:

source_path (str) –

Return type:

Source | None

add_types(source: Source, types: List[WarpType]) bool[source]
Parameters:
Return type:

bool

static all() List[WarpContainer][source]
Return type:

List[WarpContainer]

static by_name(name: str) WarpContainer | None[source]
Parameters:

name (str) –

Return type:

WarpContainer | None

commit_source(source: Source) bool[source]
Parameters:

source (Source) –

Return type:

bool

fetch_functions(target: WarpTarget, guids: List[FunctionGUID], source_tags: List[str] | None = None, constraints: List[ConstraintGUID] | None = None)[source]
Parameters:
get_functions_with_guid(target: WarpTarget, source: Source, guid: FunctionGUID) List[Function][source]
Parameters:
Return type:

List[Function]

get_source_path(source: Source) str | None[source]
Parameters:

source (Source) –

Return type:

str | None

get_sources_with_function_guid(target: WarpTarget, guid: FunctionGUID) List[Source][source]
Parameters:
Return type:

List[Source]

get_sources_with_type_guid(guid: TypeGUID) List[Source][source]
Parameters:

guid (TypeGUID) –

Return type:

List[Source]

get_type_guids_with_name(source: Source, name: str) List[TypeGUID][source]
Parameters:
Return type:

List[TypeGUID]

get_type_with_guid(source: Source, guid: TypeGUID) WarpType | None[source]
Parameters:
Return type:

WarpType | None

is_source_uncommitted(source: Source) bool[source]
Parameters:

source (Source) –

Return type:

bool

is_source_writable(source: Source) bool[source]
Parameters:

source (Source) –

Return type:

bool

remove_functions(target: WarpTarget, source: Source, functions: List[Function]) bool[source]
Parameters:
Return type:

bool

remove_types(source: Source, guids: List[TypeGUID]) bool[source]
Parameters:
Return type:

bool

search(query: WarpContainerSearchQuery) WarpContainerResponse | None[source]
Parameters:

query (WarpContainerSearchQuery) –

Return type:

WarpContainerResponse | None

property name: str
property sources: List[Source]

WarpContainerResponse

class WarpContainerResponse[source]

Bases: object

__init__(items: List[WarpContainerSearchItem], offset: int, total: int)[source]
Parameters:
static from_api(response: BNWARPContainerSearchResponse) WarpContainerResponse[source]
Parameters:

response (BNWARPContainerSearchResponse) –

Return type:

WarpContainerResponse

WarpContainerSearchItem

class WarpContainerSearchItem[source]

Bases: object

__init__(handle: BNWARPContainerSearchItem)[source]
Parameters:

handle (BNWARPContainerSearchItem) –

property function: WarpFunction | None
property kind: WARPContainerSearchItemKind
property name: str
property source: Source
property type: WarpType | None

WarpContainerSearchQuery

class WarpContainerSearchQuery[source]

Bases: object

__init__(query: str, offset: int | None = None, limit: int | None = None, source: Source | None = None, source_tags: List[str] | None = None)[source]
Parameters:
  • query (str) –

  • offset (int | None) –

  • limit (int | None) –

  • source (Source | None) –

  • source_tags (List[str] | None) –

WarpFile

class WarpFile[source]

Bases: object

__init__(handle: LP_BNWARPFile | str)[source]
Parameters:

handle (LP_BNWARPFile | str) –

to_data_buffer() DataBuffer[source]
Return type:

DataBuffer

property chunks: List[WarpChunk]

WarpFunction

class WarpFunction[source]

Bases: object

__init__(handle: BNWARPFunction | Function)[source]
Parameters:

handle (BNWARPFunction | Function) –

apply(function: Function)[source]
Parameters:

function (Function) –

static get_matched(function: Function) WarpFunction | None[source]
Parameters:

function (Function) –

Return type:

WarpFunction | None

get_symbol(function: Function) Symbol[source]
Parameters:

function (Function) –

Return type:

Symbol

static remove_matched(function: Function)[source]
Parameters:

function (Function) –

property comments: List[WarpFunctionComment]
property constraints: List[WarpConstraint]
property guid: FunctionGUID
property name: str
property type: WarpType | None

WarpFunctionComment

class WarpFunctionComment[source]

Bases: object

WarpFunctionComment(text: str, offset: int)

__init__(text: str, offset: int) None
Parameters:
  • text (str) –

  • offset (int) –

Return type:

None

static from_api(comment: BNWARPFunctionComment) WarpFunctionComment[source]
Parameters:

comment (BNWARPFunctionComment) –

Return type:

WarpFunctionComment

offset: int
text: str

WarpProcessor

class WarpProcessor[source]

Bases: object

__init__(included_data: WARPProcessorIncludedData = WARPProcessorIncludedData.WARPProcessorIncludedDataAll, included_functions: WARPProcessorIncludedFunctions = WARPProcessorIncludedFunctions.WARPProcessorIncludedFunctionsAnnotated, worker_count: int = 1)[source]
Parameters:
  • included_data (WARPProcessorIncludedData) –

  • included_functions (WARPProcessorIncludedFunctions) –

  • worker_count (int) –

add_binary_view(view: BinaryView)[source]
Parameters:

view (BinaryView) –

add_path(path: str)[source]
Parameters:

path (str) –

add_project(project: Project)[source]
Parameters:

project (Project) –

add_project_file(project_file: ProjectFile)[source]
Parameters:

project_file (ProjectFile) –

start() WarpFile | None[source]
Return type:

WarpFile | None

state() WarpProcessorState[source]
Return type:

WarpProcessorState

WarpProcessorState

class WarpProcessorState[source]

Bases: object

WarpProcessorState(cancelled: bool = False, unprocessed_file_count: int = 0, processed_file_count: int = 0, analyzing_files: List[str] = <factory>, processing_files: List[str] = <factory>)

__init__(cancelled: bool = False, unprocessed_file_count: int = 0, processed_file_count: int = 0, analyzing_files: ~typing.List[str] = <factory>, processing_files: ~typing.List[str] = <factory>) None
Parameters:
  • cancelled (bool) –

  • unprocessed_file_count (int) –

  • processed_file_count (int) –

  • analyzing_files (List[str]) –

  • processing_files (List[str]) –

Return type:

None

static from_api(state: BNWARPProcessorState) WarpProcessorState[source]
Parameters:

state (BNWARPProcessorState) –

Return type:

WarpProcessorState

analyzing_files: List[str]
cancelled: bool = False
processed_file_count: int = 0
processing_files: List[str]
unprocessed_file_count: int = 0

WarpTarget

class WarpTarget[source]

Bases: object

__init__(handle: BNWARPTarget | Platform)[source]
Parameters:

handle (BNWARPTarget | Platform) –

static from_platform(platform: Platform) WarpTarget | None[source]
Parameters:

platform (Platform) –

Return type:

WarpTarget | None

WarpType

class WarpType[source]

Bases: object

__init__(handle: BNWARPType)[source]
Parameters:

handle (BNWARPType) –

analysis_type(arch: Architecture | None = None) Type[source]
Parameters:

arch (Architecture | None) –

Return type:

Type

property confidence: int
property name: str

WarpUUID

class WarpUUID[source]

Bases: object

__init__(_uuid: BNWARPUUID | str | UUID)[source]
Parameters:

_uuid (BNWARPUUID | str | UUID) –

to_string() str[source]
Return type:

str

property uuid

get_basic_block_guid

get_basic_block_guid(basic_block: BasicBlock) BasicBlockGUID | None[source]
Parameters:

basic_block (BasicBlock) –

Return type:

BasicBlockGUID | None

get_function_guid

get_function_guid(function: Function) FunctionGUID | None[source]
Parameters:

function (Function) –

Return type:

FunctionGUID | None

is_instruction_blacklisted

is_instruction_blacklisted(function: LowLevelILFunction, variant: LowLevelILInstruction) bool[source]
Parameters:
Return type:

bool

is_instruction_computed_variant

is_instruction_computed_variant(function: LowLevelILFunction, variant: LowLevelILInstruction) bool[source]

Checks to see if the instruction is variant due to some computed value. Must use LLIL.

Parameters:
Return type:

bool

is_instruction_variant

is_instruction_variant(function: LowLevelILFunction, variant: LowLevelILInstruction) bool[source]
Parameters:
Return type:

bool

run_matcher

run_matcher(view: BinaryView)[source]
Parameters:

view (BinaryView) –