web_server.py 文件源码

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

项目:honeyd-python 作者: sookyp 项目源码 文件源码
def network():
    global network_graph
    try:
        graph_json = request.json
    except IndexError:
        pass

    # some network nodes could be removed from the graph to avoid confusing the user
    # the graph contains 
    network_json = loads(graph_json)
    G = json_graph.node_link_graph(network_json)
    fig = plt.figure()
    plt.axis('off')
    networkx.draw_networkx(G, node_size=80, node_color='c', font_size=8)
    network_graph = BytesIO()
    fig.savefig(network_graph, format='png')

# redirect any attempts to non-existing pages to the main page
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号