GDBCommandExtensions.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:PINCE 作者: korcankaraokcu 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号