FunctionMatrix.py 文件源码

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

项目:IDAPython-Scripts 作者: razygon 项目源码 文件源码
def _feature_syscalls(self,f_ea):
        '''
        get how many system calls are made within current function, which include (may not limited)
        1.direct sys call
        2.indirect call from callee recursively

        prior feature: null
        '''
        calleetree = {}   
        syscallcount = []
        calleetree[f_ea] = get_callees(f_ea)
        for ea in calleetree[f_ea]:
            fname = idc.GetFunctionName(ea)
            if fname in self.syscalls:#
                syscallcount.append(fname) #better record the syscalls name of address

        return len(syscallcount), syscallcount

#         for ea in function_eas:
#           xrefs = idautils.CodeRefsFrom(ea, False)
#           for xref in xrefs:
#             if not (xref in function_eas):
#               callees.append(xref)
        '''
        the above commented is one level, below is recursively
        '''
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号