miasm
Reverse engineering framework
test_types.py File Reference

Classes

class  test_types.OtherStruct
 
class  test_types.MyStruct
 
class  test_types.MyStruct2
 
class  test_types.InStruct
 
class  test_types.ContStruct
 
class  test_types.UniStruct
 
class  test_types.BitStruct
 
class  test_types.BitStruct
 
class  test_types.BitStruct
 
class  test_types.UnhealthyIdeas
 
class  test_types.A
 
class  test_types.B
 
class  test_types.Anon
 

Namespaces

 test_types
 

Variables

 test_types.loc_db = LocationDB()
 
 test_types.jitter = Machine("x86_32").jitter(loc_db, "python")
 
int test_types.addr = 0x1000
 
int test_types.size = 0x1000
 
int test_types.addr_str = 0x1100
 
int test_types.addr_str2 = 0x1200
 
int test_types.addr_str3 = 0x1300
 
 test_types.mstruct = MyStruct(jitter.vm, addr)
 Creation Use manual allocation with explicit addr for the first example. More...
 
 test_types.num
 Fields are read from the virtual memory. More...
 
 test_types.memval = struct.unpack("I", jitter.vm.get_mem(mstruct.get_addr(), 4))[0]
 
 test_types.my_heap = heap()
 Memset sets the whole structure. More...
 
 test_types.other = OtherStruct(jitter.vm)
 Setup for Ptr tests the addr field can now be omitted since allocator is set. More...
 
 test_types.foo
 
 test_types.val
 Basic usage. More...
 
 test_types.other2 = OtherStruct(jitter.vm)
 Deref assignment. More...
 
 test_types.deref
 
 test_types.alloc_addr
 Same stuff for Ptr to MemField. More...
 
 test_types.i
 
 test_types.memstr = Str().lval(jitter.vm, addr_str)
 Basic tests. More...
 
 test_types.memstr2 = Str().lval(jitter.vm, addr_str2)
 Other address, same value, same encoding. More...
 
 test_types.memstr3 = Str("utf16").lval(jitter.vm, addr_str3)
 Same value, other encoding. More...
 
 test_types.memarray = Array(Num("I")).lval(jitter.vm, alloc_addr)
 
 test_types.s = bytes(memarray)
 
 test_types.memsarray = Array(Num("I"), 10).lval(jitter.vm)
 Slice assignment. More...
 
 test_types.ms2 = MyStruct2(jitter.vm)
 
 test_types.s2
 RawStruct. More...
 
 test_types.array2 = Array(Num("B"), 10).lval(jitter.vm)
 Field assignment (MemSizedArray) More...
 
 test_types.cont = ContStruct(jitter.vm)
 
 test_types.one
 
 test_types.bar
 
 test_types.last
 
 test_types.uni = UniStruct(jitter.vm)
 
 test_types.bit = BitStruct(jitter.vm)
 
 test_types.f1_1
 
 test_types.f2_5
 
 test_types.f3_8
 
 test_types.flags_num
 
int test_types.p_size = Ptr("I", Void()).size
 
 test_types.ideas = UnhealthyIdeas(jitter.vm)
 
 test_types.pself
 
 test_types.ppself
 
 test_types.pppself
 
 test_types.a = A(jitter.vm)
 
 test_types.b = B(jitter.vm)
 
 test_types.MemInt = Num("I").lval
 
 test_types.MemShort = Num("H").lval
 
 test_types.dword = MemInt(jitter.vm)
 
 test_types.MemPtrVoid = Ptr("I", Void()).lval
 
 test_types.p = MemPtrVoid(jitter.vm)
 
 test_types.anon = Anon(jitter.vm)
 
 test_types.b2
 
 test_types.c1
 
 test_types.c2
 
 test_types.d
 
 test_types.arr_t = Array(Num("H"))