mirror of
https://github.com/cea-sec/miasm
synced 2026-06-21 13:48:18 +00:00
ed5c3668cc
* API has changed, so old scripts need updates * See example for API usage * Use tcc or llvm for jit emulation * Go to test and run test_all.py to check install Enjoy !
19 lines
365 B
Python
19 lines
365 B
Python
from miasm2.core.graph import *
|
|
|
|
g = DiGraph()
|
|
g.add_node('a')
|
|
g.add_node('b')
|
|
|
|
g.add_edge('a', 'b')
|
|
g.add_edge('a', 'c')
|
|
g.add_edge('a', 'c')
|
|
g.add_edge('c', 'c')
|
|
|
|
print g
|
|
|
|
print [x for x in g.successors('a')]
|
|
print [x for x in g.predecessors('a')]
|
|
print [x for x in g.predecessors('b')]
|
|
print [x for x in g.predecessors('c')]
|
|
print [x for x in g.successors('c')]
|