miasm
Reverse engineering framework
|
Classes | |
class | CGen |
class | CGenArray |
class | CGenDeref |
class | CGenField |
class | CGenId |
class | CGenInt |
class | CHandler |
class | CLeafTypes |
class | CTypesManager |
class | CTypesManagerNotPacked |
class | CTypesManagerPacked |
class | ExprCToExpr |
class | ExprToAccessC |
class | ObjC |
class | ObjCArray |
class | ObjCDecl |
class | ObjCEllipsis |
class | ObjCFunc |
class | ObjCInt |
class | ObjCPtr |
class | ObjCStruct |
class | ObjCUnion |
Functions | |
def | missing_definition (objtype) |
def | objc_to_str (objc, result=None) |
def | access_simplifier (expr) |
def | access_str (expr) |
def | ast_get_c_access_expr (ast, expr_types, lvl=0) |
def | parse_access (c_access) |
Variables | |
string | PADDING_TYPE_NAME = "___padding___" |
dictionary | OBJC_PRIO |
C helper for Miasm: * raw C to Miasm expression * Miasm expression to raw C * Miasm expression to C type
def miasm.core.objc.access_simplifier | ( | expr | ) |
Expression visitor to simplify a C access represented in Miasm @expr: Miasm expression representing the C access Example: IN: (In c: ['*(&((&((*(ptr_Test)).a))[0]))']) [ExprOp('deref', ExprOp('addr', ExprOp('[]', ExprOp('addr', ExprOp('field', ExprOp('deref', ExprId('ptr_Test', 64)), ExprId('a', 64))), ExprInt(0x0, 64))))] OUT: (In c: ['(ptr_Test)->a']) [ExprOp('->', ExprId('ptr_Test', 64), ExprId('a', 64))]
def miasm.core.objc.access_str | ( | expr | ) |
Return the C string of a C access represented in Miasm @expr: Miasm expression representing the C access In: ExprOp('->', ExprId('ptr_Test', 64), ExprId('a', 64)) OUT: '(ptr_Test)->a'
def miasm.core.objc.ast_get_c_access_expr | ( | ast, | |
expr_types, | |||
lvl = 0 |
|||
) |
Transform C ast object into a C Miasm expression @ast: parsed pycparser.c_ast object @expr_types: a dictionary linking ID names to their types @lvl: actual recursion level Example: IN: StructRef: -> ID: ptr_Test ID: a OUT: ExprOp('->', ExprId('ptr_Test', 64), ExprId('a', 64))
def miasm.core.objc.missing_definition | ( | objtype | ) |
def miasm.core.objc.objc_to_str | ( | objc, | |
result = None |
|||
) |
def miasm.core.objc.parse_access | ( | c_access | ) |
Parse C access @c_access: C access string
dictionary miasm.core.objc.OBJC_PRIO |
string miasm.core.objc.PADDING_TYPE_NAME = "___padding___" |