本文整理汇总了Python中keystone.KS_MODE_LITTLE_ENDIAN属性的典型用法代码示例。如果您正苦于以下问题:Python keystone.KS_MODE_LITTLE_ENDIAN属性的具体用法?Python keystone.KS_MODE_LITTLE_ENDIAN怎么用?Python keystone.KS_MODE_LITTLE_ENDIAN使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类keystone
的用法示例。
在下文中一共展示了keystone.KS_MODE_LITTLE_ENDIAN属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import keystone [as 别名]
# 或者: from keystone import KS_MODE_LITTLE_ENDIAN [as 别名]
def __init__(self):
super(AsmBase, self).__init__()
# Initialize keystone and capstone as soon as an instance
# of this plugin will be created.
if not keystone:
self.log.debug('Keystone is required for ' + self.__class__.__name__)
return
if not capstone:
self.log.debug('Capstone is required for ' + self.__class__.__name__)
return
if getattr(self, 'args', None) and self.args and getattr(self.args, 'bigendian', None) \
and self.args.bigendian:
self.ks = keystone.Ks(self.keystone_arch,
self.keystone_mode + keystone.KS_MODE_BIG_ENDIAN)
self.cs = capstone.Cs(self.capstone_arch,
capstone.CS_MODE_BIG_ENDIAN)
else:
self.ks = keystone.Ks(self.keystone_arch,
self.keystone_mode + keystone.KS_MODE_LITTLE_ENDIAN)
self.cs = capstone.Cs(self.capstone_arch,
capstone.CS_MODE_LITTLE_ENDIAN)