-
-
Save tmr232/8e1289425e46545accbe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_bb_id(graph, ea): | |
for block in graph: | |
if block.startEA <= ea and block.endEA > ea: | |
return block.id | |
start_ea = 0x15f9ad6 | |
base_block_ea = 0x15f9a60 | |
f = get_func(start_ea) | |
g = FlowChart(f, flags=FC_PREDS) #??? | |
bb_id = get_bb_id(g, start_ea) | |
p = idaapi.node_info_t() | |
p.bg_color = 0x00ff00 # green | |
print idaapi.set_node_info2(base_block_ea, bb_id, p, idaapi.NIF_BG_COLOR | idaapi.NIF_FRAME_COLOR) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment