def color_block(ea=None, color=0x55ff7f):
"""http://reverseengineering.stackexchange.com/questions/10662/change-block-node-color-with-idapython
and WanderingGlitch for the tip of refresh_idaview_anyway()"""
func_top = fn.top()
f = idaapi.get_func(ea)
g = idaapi.FlowChart(f, flags=idaapi.FC_PREDS)
bb_id = get_bb_id(g, ea)
p = idaapi.node_info_t()
p.bg_color = color
idaapi.set_node_info2(func_top, bb_id, p, idaapi.NIF_BG_COLOR | idaapi.NIF_FRAME_COLOR)
idaapi.refresh_idaview_anyway()
评论列表
文章目录