Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // @ https://twitter.com/binpwn/status/1578861528153227264
- graph = FlowGraph()
- nodes = {}
- for fcn in bv.functions:
- node = FlowGraphNode(graph)
- node.lines = [fcn.name]
- nodes[fcn.name] = node
- graph.append(node)
- edge = EdgeStyle(EdgePenStyle.DashDotDotLine, 2, ThemeColor.AddressColor)
- for fcn in bv.functions:
- xrefs = bv.get_code_refs(fcn.start)
- for xref in xrefs:
- parent = nodes[xref.function.name]
- child = nodes[fcn.name]
- parent.add_outgoing_edge(BranchType.UserDefinedBranch, child, edge)
- print(f"{xref.function.name} -> {fcn.name}")
- bv.show_graph_report("Function Flow", graph)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement