33# Cross Platform and Multi Architecture Advanced Binary Emulation Framework
44#
55
6- from ctypes import Union
76import os , re
8- from typing import Any , Callable , List , MutableSequence , Optional , Sequence , Tuple
7+ from typing import Any , Callable , List , MutableSequence , Optional , Sequence , Tuple , Union
98
109from unicorn import UC_PROT_NONE , UC_PROT_READ , UC_PROT_WRITE , UC_PROT_EXEC , UC_PROT_ALL
1110
@@ -65,6 +64,7 @@ def __write_string(self, addr: int, s: str, encoding: str):
6564 self .write (addr , bytes (s , encoding ) + b'\x00 ' )
6665
6766 def __getitem__ (self , key : Union [slice , int ]) -> bytearray :
67+ print (key )
6868 if isinstance (key , slice ):
6969 start = key .start
7070 stop = key .stop
@@ -81,6 +81,8 @@ def __getitem__(self, key: Union[slice, int]) -> bytearray:
8181 raise KeyError ("Wrong type of key" )
8282
8383 def __setitem__ (self , key : Union [slice , int ], value : Union [bytes , bytearray ]):
84+ print (key )
85+ print (value )
8486 if isinstance (key , int ):
8587 self .ql .mem .write (key , value )
8688 else :
0 commit comments