miasm
Reverse engineering framework
example_types Namespace Reference

Classes

class  DataArray
 
class  DataStr
 
class  LinkedList
 
class  ListNode
 

Variables

 loc_db = LocationDB()
 
 my_heap = heap()
 
 jitter = Machine("x86_32").jitter(loc_db, "python")
 
 vm = jitter.vm
 
 link = LinkedList(vm)
 
 raw_size
 
 real_data = data.cast(DataArray)
 
 data = link.pop(DataArray)
 
 arrayptr
 
 datastr = data.cast(DataStr)
 
 val1
 
 val2
 
 valshort
 
 memstr = datastr.data.deref
 
 val
 
string raw_miams = 'Miams'.encode('utf-16le') + b'\x00'*2
 
list raw_miams_array = [ord(c) for c in iterbytes(raw_miams)]
 
 argv_t = Array(Ptr("<I", Str()), 4)
 
 argv = argv_t.lval(vm)
 
 MemStrAnsi = Str().lval
 

Detailed Description

This script is just a short example of common usages for miasm.core.types.
For a more complete view of what is possible, tests/core/types.py covers
most of the module possibilities, and the module doc gives useful information
as well.

Variable Documentation

◆ argv

example_types.argv = argv_t.lval(vm)

◆ argv_t

example_types.argv_t = Array(Ptr("<I", Str()), 4)

◆ arrayptr

example_types.arrayptr

◆ data

example_types.data = link.pop(DataArray)

◆ datastr

example_types.datastr = data.cast(DataStr)

◆ jitter

example_types.jitter = Machine("x86_32").jitter(loc_db, "python")

◆ link

example_types.link = LinkedList(vm)

◆ loc_db

example_types.loc_db = LocationDB()

◆ memstr

example_types.memstr = datastr.data.deref

◆ MemStrAnsi

example_types.MemStrAnsi = Str().lval

◆ my_heap

example_types.my_heap = heap()

◆ raw_miams

string example_types.raw_miams = 'Miams'.encode('utf-16le') + b'\x00'*2

◆ raw_miams_array

list example_types.raw_miams_array = [ord(c) for c in iterbytes(raw_miams)]

◆ raw_size

example_types.raw_size
Initial value:
1 = vm.get_mem(link.get_addr("size"), link.get_type()
2  .get_field_type("size").size)

◆ real_data

example_types.real_data = data.cast(DataArray)

◆ val

example_types.val

◆ val1

example_types.val1

◆ val2

example_types.val2

◆ valshort

example_types.valshort

◆ vm

example_types.vm = jitter.vm