python类FUNC_LIB的实例源码

Util.py 文件源码 项目:VMAttack 作者: anatolikalysch 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def is_import_or_lib_func(ea):
    """
    Is ea part of an imported function or a known library?
    @param ea: any ea within the function scope
    @return: True if function is either imported or a known library function.
    """

    return Functions(ea).flags & (idaapi.FUNC_LIB | idaapi.FUNC_THUNK)
function_LOCAL_1076.py 文件源码 项目:idascripts 作者: ctfhacker 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def is_library(cls, func):
        '''Return True if the function ``func`` is considered a library function.'''
        fn = by(func)
        return fn.flags & idaapi.FUNC_LIB == idaapi.FUNC_LIB
function_REMOTE_1076.py 文件源码 项目:idascripts 作者: ctfhacker 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def is_library(cls, func):
        '''Return True if the function ``func`` is considered a library function.'''
        fn = by(func)
        return fn.flags & idaapi.FUNC_LIB == idaapi.FUNC_LIB
function_LOCAL_3024.py 文件源码 项目:idascripts 作者: ctfhacker 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def is_library(cls, func):
        '''Return True if the function ``func`` is considered a library function.'''
        fn = by(func)
        return fn.flags & idaapi.FUNC_LIB == idaapi.FUNC_LIB
function_BASE_3024.py 文件源码 项目:idascripts 作者: ctfhacker 项目源码 文件源码 阅读 31 收藏 0 点赞 0 评论 0
def is_library(cls, func):
        '''Return True if the function ``func`` is considered a library function.'''
        fn = by(func)
        return fn.flags & idaapi.FUNC_LIB == idaapi.FUNC_LIB
function_REMOTE_3024.py 文件源码 项目:idascripts 作者: ctfhacker 项目源码 文件源码 阅读 31 收藏 0 点赞 0 评论 0
def is_library(cls, func):
        '''Return True if the function ``func`` is considered a library function.'''
        fn = by(func)
        return fn.flags & idaapi.FUNC_LIB == idaapi.FUNC_LIB
function_BASE_1076.py 文件源码 项目:idascripts 作者: ctfhacker 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def is_library(cls, func):
        '''Return True if the function ``func`` is considered a library function.'''
        fn = by(func)
        return fn.flags & idaapi.FUNC_LIB == idaapi.FUNC_LIB
ida_func_ptr.py 文件源码 项目:ida_func_ptr 作者: HandsomeMatt 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def graph_down(ea, path=set()):
    """
    Recursively collect all function calls.

    Copied with minor modifications from
    http://hooked-on-mnemonics.blogspot.com/2012/07/renaming-subroutine-blocks-and.html
    """
    path.add(ea)

    #
    # iterate through all the instructions in the target function (ea) and
    # inspect all the call instructions
    #

    for x in [x for x in idautils.FuncItems(ea) if idaapi.is_call_insn(x)]:

        #  TODO
        for r in idautils.XrefsFrom(x, idaapi.XREF_FAR):
            #print "0x%08X" % h, "--calls-->", "0x%08X" % r.to
            if not r.iscode:
                    continue

            # get the function pointed at by this call
            func = idaapi.get_func(r.to)
            if not func:
                continue

            # ignore calls to imports / library calls / thunks
            if (func.flags & (idaapi.FUNC_THUNK | idaapi.FUNC_LIB)) != 0:
                continue

            #
            # if we have not traversed to the destination function that this
            # call references, recurse down to it to continue our traversal
            #

            if r.to not in path:
                graph_down(r.to, path)

    return path


问题


面经


文章

微信
公众号

扫码关注公众号