parseELF.py 文件源码

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

项目:firmflaws 作者: Ganapati 项目源码 文件源码
def parse_elf(workspace, file):
    r2 = r2pipe.open(file.filepath)
    r2.cmd("aa")
    r2.cmd("afl")
    result = r2.cmd("agC")
    output_dir = os.path.join(workspace, "graphs")
    if not os.path.exists(output_dir):
        os.makedirs(output_dir)

    out_file = os.path.join(output_dir, file.hash)
    graph = pydot.graph_from_dot_data(result)
    graph[0].write_png(out_file)
    file.graph_file = out_file
    file.save()
    print("%s parsed" % file.filepath)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号