本文整理汇总了Python中unicorn.UC_MODE_64属性的典型用法代码示例。如果您正苦于以下问题:Python unicorn.UC_MODE_64属性的具体用法?Python unicorn.UC_MODE_64怎么用?Python unicorn.UC_MODE_64使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类unicorn
的用法示例。
在下文中一共展示了unicorn.UC_MODE_64属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import unicorn [as 别名]
# 或者: from unicorn import UC_MODE_64 [as 别名]
def __init__(self, trace=True, sca_mode=False, local_vars={}):
super().__init__(trace, sca_mode)
self.emu = uc.Uc(uc.UC_ARCH_X86, uc.UC_MODE_64)
self.disasm = cs.Cs(cs.CS_ARCH_X86, cs.CS_MODE_64)
self.disasm.detail = True
self.word_size = 8
self.endianness = "little"
self.page_size = self.emu.query(uc.UC_QUERY_PAGE_SIZE)
self.page_shift = self.page_size.bit_length() - 1
self.pc = uc.x86_const.UC_X86_REG_RIP
# workaround for capstone 4
uc.x86_const.UC_X86_REG_RFLAGS = uc.x86_const.UC_X86_REG_EFLAGS
known_regs = [i[len('UC_X86_REG_'):] for i in dir(uc.x86_const) if '_REG' in i]
self.reg_map = {r.lower(): getattr(uc.x86_const, 'UC_X86_REG_'+r) for r in known_regs}
self.stubbed_functions = local_vars
self.setup(sca_mode)
self.reset_stack()
示例2: __init__
# 需要导入模块: import unicorn [as 别名]
# 或者: from unicorn import UC_MODE_64 [as 别名]
def __init__(self):
Emulator.__init__(self, "X86",
unicorn.UC_ARCH_X86,
unicorn.UC_MODE_64,
"rip",
64,
["rsp", "cs", "ss", "rbx", "si", "ip"])
self.syscall_regnames = ["rdi", "rsi", "rcx", "r8", "rdx",
"r9", "rbx", "rax"]
self.stackbot = "rbp"
self.stacktop = "rsp"