3
3
# Cross Platform and Multi Architecture Advanced Binary Emulation Framework
4
4
#
5
5
6
- from ctypes import Union
7
6
import 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
9
8
10
9
from unicorn import UC_PROT_NONE , UC_PROT_READ , UC_PROT_WRITE , UC_PROT_EXEC , UC_PROT_ALL
11
10
@@ -65,6 +64,7 @@ def __write_string(self, addr: int, s: str, encoding: str):
65
64
self .write (addr , bytes (s , encoding ) + b'\x00 ' )
66
65
67
66
def __getitem__ (self , key : Union [slice , int ]) -> bytearray :
67
+ print (key )
68
68
if isinstance (key , slice ):
69
69
start = key .start
70
70
stop = key .stop
@@ -81,6 +81,8 @@ def __getitem__(self, key: Union[slice, int]) -> bytearray:
81
81
raise KeyError ("Wrong type of key" )
82
82
83
83
def __setitem__ (self , key : Union [slice , int ], value : Union [bytes , bytearray ]):
84
+ print (key )
85
+ print (value )
84
86
if isinstance (key , int ):
85
87
self .ql .mem .write (key , value )
86
88
else :
0 commit comments