def invoke(self, arg, from_tty):
contents_recv = receive_from_pince()
hex_byte_list = []
address = contents_recv[0]
offset = contents_recv[1]
with open(ScriptUtils.mem_file, "rb") as FILE:
FILE.seek(address)
for item in range(offset):
try:
current_item = " ".join(format(n, '02x') for n in FILE.read(1))
except IOError:
current_item = "??"
FILE.seek(1, io.SEEK_CUR) # Necessary since read() failed to execute
hex_byte_list.append(current_item)
send_to_pince(hex_byte_list)
评论列表
文章目录