label_functions.py 文件源码

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

项目:shannonRE 作者: Comsecuris 项目源码 文件源码
def str_fun_xrefs():
    str_fun_xref = {}
    for s in IDAStrings:
        for ref in idautils.DataRefsTo(s.ea):
            f = idaapi.get_func(ref)
            if not f:
                continue

            if idc.GetMnem(ref) == "":
                continue

            f_ea = f.startEA
            try:
                #because we are only carrying the string value itself, duplications should be removed.
                #This is important because of OFFS/ADR instruction double references being very typical,
                #and multiple allocations/frees in same function causing extra references too.
                str_fun_xref[f_ea].add(str(s))
            except:
                str_fun_xref[f_ea] = set([str(s)])

    return str_fun_xref
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号