Exemplo n.º 1
0
def iter_exit_nodes(ea):
    for block in get_flowchart(ea):
        # Check if there are successors
        for successor in block.next:
            break
        else:
            yield block
Exemplo n.º 2
0
def mark_unreachable_nodes(ea, source_color=COLOR_SOURCE, other_color=COLOR_UNREACHABLE):
    graph = get_nx_graph(ea)
    block_ea = get_block_start(ea)
    descendants = nx.descendants(graph, block_ea)
    for block in get_flowchart(ea):
        if block.startEA not in descendants:
            block.color = other_color

    get_codeblock(ea).color = source_color
Exemplo n.º 3
0
def clear_func(ea):
    for block in get_flowchart(ea):
        block.color = COLOR_NONE