コード例 #1
0
 def read_struct(self, address, struct):
     size = self._ctypes.sizeof(struct)
     instance = struct.from_buffer_copy(self.read_bytes(address, size))
     instance._orig_address_ = address
     return instance
コード例 #2
0
 def read_struct(self, addr, struct):
     size = self._target_platform.get_target_ctypes().sizeof(struct)
     instance = struct.from_buffer_copy(self._backend.zread(addr, size))
     instance._orig_address_ = addr
     return instance
コード例 #3
0
ファイル: file.py プロジェクト: trolldbois/python-haystack
 def read_struct(self, addr, struct):
     size = self._ctypes.sizeof(struct)
     self._backend.seek(self.offset + addr - self.start, 0)
     instance = struct.from_buffer_copy(self._backend.read(size))
     instance._orig_address_ = addr
     return instance
コード例 #4
0
ファイル: file.py プロジェクト: larytet/python-haystack
 def read_struct(self, addr, struct):
     size = self._ctypes.sizeof(struct)
     self._backend.seek(self.offset + addr - self.start, 0)
     instance = struct.from_buffer_copy(self._backend.read(size))
     instance._orig_address_ = addr
     return instance
コード例 #5
0
ファイル: rek.py プロジェクト: cy-fir/python-haystack
 def read_struct(self, addr, struct):
     size = self._target_platform.get_target_ctypes().sizeof(struct)
     instance = struct.from_buffer_copy(self._backend.read(addr, size))
     instance._orig_address_ = addr
     return instance
コード例 #6
0
ファイル: vol.py プロジェクト: cy-fir/python-haystack
 def read_struct(self, addr, struct):
     size = self._ctypes.sizeof(struct)
     instance = struct.from_buffer_copy(self._backend.zread(addr, size))
     instance._orig_address_ = addr
     return instance
コード例 #7
0
 def read_struct(self, address, struct):
     size = self._ctypes.sizeof(struct)
     instance = struct.from_buffer_copy(self.read_bytes(address, size))
     instance._orig_address_ = address
     return instance