本文整理匯總了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"