当前位置: 首页>>代码示例>>Python>>正文


Python idc.get_inf_attr方法代码示例

本文整理汇总了Python中idc.get_inf_attr方法的典型用法代码示例。如果您正苦于以下问题:Python idc.get_inf_attr方法的具体用法?Python idc.get_inf_attr怎么用?Python idc.get_inf_attr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在idc的用法示例。


在下文中一共展示了idc.get_inf_attr方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: is_linked_ELF_program

# 需要导入模块: import idc [as 别名]
# 或者: from idc import get_inf_attr [as 别名]
def is_linked_ELF_program():
  global _NOT_ELF_BEGIN_EAS
  return IS_ELF and idc.get_inf_attr(INF_START_EA) not in _NOT_ELF_BEGIN_EAS 
开发者ID:lifting-bits,项目名称:mcsema,代码行数:5,代码来源:get_cfg.py

示例2: demangle

# 需要导入模块: import idc [as 别名]
# 或者: from idc import get_inf_attr [as 别名]
def demangle(cls, name):
        '''
        Demangles name.
        '''

        mask = idc.get_inf_attr(idc.INF_SHORT_DN)
        demangled = idc.demangle_name(name, mask)
        if demangled is None:
            return name
        return demangled 
开发者ID:ax330d,项目名称:functions-plus,代码行数:12,代码来源:functions_plus.py

示例3: __init__

# 需要导入模块: import idc [as 别名]
# 或者: from idc import get_inf_attr [as 别名]
def __init__(self):
        super(FunctionsPlus, self).__init__()
        if idc.get_inf_attr(idc.INF_PROCNAME).lower() != 'metapc':
            print('Functions+ warning: not tested in this configuration')
        self.tree = None
        self.icon = 135
        # Enable this if you want to see extra information about function
        self.show_extra_fields = False
        self.cols = Cols(self.show_extra_fields) 
开发者ID:ax330d,项目名称:functions-plus,代码行数:11,代码来源:functions_plus.py

示例4: update

# 需要导入模块: import idc [as 别名]
# 或者: from idc import get_inf_attr [as 别名]
def update(self, ctx):

			if (idc.get_inf_attr(idc.INF_PROCNAME) != "metapc"):
				return AST_DISABLE

			if (ctx.action == 'klfdb:run'):
				if (idc.get_process_state() == idc.DSTATE_SUSP):
					return AST_ENABLE
				return AST_DISABLE
	
			elif (ctx.action == 'klfdb:runnext'):
				if (idc.get_process_state() == idc.DSTATE_SUSP):
					return AST_ENABLE
				return AST_DISABLE
	
			elif (ctx.action == 'klfdb:delbpts'):
				return AST_ENABLE

			elif (ctx.action == 'klfdb:setbpts'):
				return AST_ENABLE
	
			elif (ctx.action == 'klfdb:ignore'):
				return AST_ENABLE

			elif (ctx.action == 'klfdb:loadmap'):
				return AST_ENABLE

			elif (ctx.action == 'klfdb:delmap'):
				return AST_ENABLE

			return AST_DISABLE 
开发者ID:KasperskyLab,项目名称:ActionScript3,代码行数:33,代码来源:klfdb.py

示例5: selRefLocByName

# 需要导入模块: import idc [as 别名]
# 或者: from idc import get_inf_attr [as 别名]
def selRefLocByName(self, name):
        if name[:6] == "selRef":
            addr = self.objcSelRefs[0]
            endAddr = self.objcSelRefs[1]
        else:
            addr = self.objcMsgRefs[0]
            endAddr = self.objcMsgRefs[1]
        while addr < endAddr:
            if idc.get_name(addr, idc.ida_name.GN_VISIBLE) == name:
                return addr
            addr = idc.next_head(addr, idc.get_inf_attr(idc.INF_MAX_EA)) 
开发者ID:fireeye,项目名称:flare-ida,代码行数:13,代码来源:objc2_analyzer.py

示例6: getIvarTypeFromFunc

# 需要导入模块: import idc [as 别名]
# 或者: from idc import get_inf_attr [as 别名]
def getIvarTypeFromFunc(self, eh, va):
        if va in self.ivarSetters:
            return self.ivarSetters[va]
        elif va in self.notIvarSetters:
            return UNKNOWN
        addr = va
        endVa = idc.get_func_attr(va, idc.FUNCATTR_END)
        if endVa - va < 0x20:
            ivarVa = None
            while addr <= endVa:
                srcOpnd = idc.print_operand(addr, 1)
                # if ivar is the src op for an instruction, assume this function will return it
                if eh.arch == unicorn.UC_ARCH_ARM and "_OBJC_IVAR_$_" in srcOpnd:
                    oploc = idc.get_name_ea_simple(
                        srcOpnd[srcOpnd.find("_OBJC_IVAR_$_"):srcOpnd.find(" ")])
                    if oploc != idc.BADADDR:
                        ivarVa = oploc
                        break
                elif eh.arch == unicorn.UC_ARCH_ARM64:
                    for x in idautils.XrefsFrom(addr):
                        if (idc.get_segm_name(x.to) == "__objc_ivar" and
                                idc.get_name(x.to, idc.ida_name.GN_VISIBLE)[:13] == "_OBJC_IVAR_$_"):
                            ivarVa = x.to
                            break
                elif eh.arch == unicorn.UC_ARCH_X86:
                    if "_OBJC_IVAR_$_" in srcOpnd:
                        ivarVa = idc.get_operand_value(addr, 1)
                        break

                addr = idc.next_head(addr, idc.get_inf_attr(idc.INF_MAX_EA))

            if ivarVa:
                for x in idautils.XrefsTo(ivarVa):
                    if x.frm >= self.objcConst[0] and x.frm < self.objcConst[1]:
                        typeStr = eh.getIDBString(
                            eh.derefPtr(x.frm + eh.size_pointer * 2))
                        self.ivarSetters[va] = typeStr[2:-1]
                        logging.debug("%s is an ivar getter function, returning type %s" % (
                            eh.hexString(va), typeStr[2:-1]))
                        return typeStr[2:-1]
            else:
                logging.debug(
                    "%s determined not to be an ivar getter function", eh.hexString(va))
                self.notIvarSetters.append(va)
        else:
            logging.debug(
                "%s determined not to be an ivar getter function", eh.hexString(va))
            self.notIvarSetters.append(va)
        return UNKNOWN


    # returns class or sel name from IDA name 
开发者ID:fireeye,项目名称:flare-ida,代码行数:54,代码来源:objc2_analyzer.py


注:本文中的idc.get_inf_attr方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。