miasm
Reverse engineering framework
miasm.expression.expression_helper.ExprRandom Class Reference
Inheritance diagram for miasm.expression.expression_helper.ExprRandom:
Collaboration diagram for miasm.expression.expression_helper.ExprRandom:

Public Member Functions

def identifier (cls, size=32)
 
def number (cls, size=32)
 
def atomic (cls, size=32)
 
def operation (cls, size=32, depth=1)
 
def slice (cls, size=32, depth=1)
 
def compose (cls, size=32, depth=1)
 
def memory (cls, size=32, depth=1)
 
def get (cls, size=32, depth=1, clean=True)
 

Public Attributes

 generated_elements
 

Static Public Attributes

int identifier_len = 5
 
 identifier_charset = string.ascii_letters
 
int number_max = 0xFFFFFFFF
 
dictionary operations_by_args_number
 
int operations_max_args_number = 5
 
bool perfect_tree = True
 
int slice_add_size = 10
 
int compose_max_layer = 5
 
int memory_max_address_size = 32
 
bool reuse_element = True
 
dictionary generated_elements = {}
 

Detailed Description

Return an expression randomly generated

Member Function Documentation

◆ atomic()

def miasm.expression.expression_helper.ExprRandom.atomic (   cls,
  size = 32 
)
Return an atomic Expression
@size: (optional) Expr size
Here is the call graph for this function:
Here is the caller graph for this function:

◆ compose()

def miasm.expression.expression_helper.ExprRandom.compose (   cls,
  size = 32,
  depth = 1 
)
Return an ExprCompose
@size: (optional) Operation size
@depth: (optional) Expression depth
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get()

def miasm.expression.expression_helper.ExprRandom.get (   cls,
  size = 32,
  depth = 1,
  clean = True 
)
Return a randomly generated expression
@size: (optional) Operation size
@depth: (optional) Expression depth
@clean: (optional) Clean expression cache between two calls
Here is the caller graph for this function:

◆ identifier()

def miasm.expression.expression_helper.ExprRandom.identifier (   cls,
  size = 32 
)
Return a random identifier
@size: (optional) identifier size
Here is the caller graph for this function:

◆ memory()

def miasm.expression.expression_helper.ExprRandom.memory (   cls,
  size = 32,
  depth = 1 
)
Return an ExprMem
@size: (optional) Operation size
@depth: (optional) Expression depth
Here is the call graph for this function:
Here is the caller graph for this function:

◆ number()

def miasm.expression.expression_helper.ExprRandom.number (   cls,
  size = 32 
)
Return a random number
@size: (optional) number max bits
Here is the caller graph for this function:

◆ operation()

def miasm.expression.expression_helper.ExprRandom.operation (   cls,
  size = 32,
  depth = 1 
)
Return an ExprOp
@size: (optional) Operation size
@depth: (optional) Expression depth
Here is the call graph for this function:
Here is the caller graph for this function:

◆ slice()

def miasm.expression.expression_helper.ExprRandom.slice (   cls,
  size = 32,
  depth = 1 
)
Return an ExprSlice
@size: (optional) Operation size
@depth: (optional) Expression depth
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ compose_max_layer

int miasm.expression.expression_helper.ExprRandom.compose_max_layer = 5
static

◆ generated_elements [1/2]

dictionary miasm.expression.expression_helper.ExprRandom.generated_elements = {}
static

◆ generated_elements [2/2]

miasm.expression.expression_helper.ExprRandom.generated_elements

◆ identifier_charset

miasm.expression.expression_helper.ExprRandom.identifier_charset = string.ascii_letters
static

◆ identifier_len

int miasm.expression.expression_helper.ExprRandom.identifier_len = 5
static

◆ memory_max_address_size

int miasm.expression.expression_helper.ExprRandom.memory_max_address_size = 32
static

◆ number_max

int miasm.expression.expression_helper.ExprRandom.number_max = 0xFFFFFFFF
static

◆ operations_by_args_number

dictionary miasm.expression.expression_helper.ExprRandom.operations_by_args_number
static
Initial value:
= {1: ["-"],
2: ["<<", "<<<", ">>", ">>>"],
"2+": ["+", "*", "&", "|", "^"],
}

◆ operations_max_args_number

int miasm.expression.expression_helper.ExprRandom.operations_max_args_number = 5
static

◆ perfect_tree

bool miasm.expression.expression_helper.ExprRandom.perfect_tree = True
static

◆ reuse_element

bool miasm.expression.expression_helper.ExprRandom.reuse_element = True
static

◆ slice_add_size

int miasm.expression.expression_helper.ExprRandom.slice_add_size = 10
static

The documentation for this class was generated from the following file: