From ed5c3668cc9f545b52674ad699fc2b0ed1ccb575 Mon Sep 17 00:00:00 2001 From: serpilliere Date: Tue, 3 Jun 2014 10:27:56 +0200 Subject: Miasm v2 * 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 ! --- example/expression/manip_expression7.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 example/expression/manip_expression7.py (limited to 'example/expression/manip_expression7.py') diff --git a/example/expression/manip_expression7.py b/example/expression/manip_expression7.py new file mode 100644 index 00000000..d1cbb73b --- /dev/null +++ b/example/expression/manip_expression7.py @@ -0,0 +1,21 @@ +from miasm2.core.graph import DiGraph +from miasm2.expression.expression import * + +print "Simple Expression grapher demo" + +a = ExprId("A") +b = ExprId("B") +c = ExprId("C") +d = ExprId("D") +m = ExprMem(a + b + c + a) + +e1 = ExprCompose([(a + b - (c * a) / m | b, 0, 32), (a + m, 32, 64)]) +e2 = ExprInt64(15) +e = ExprCond(d, e1, e2)[0:32] + +print "[+] Expression:" +print e + +g = e.graph() +print "[+] Graph:" +print g.dot() -- cgit 1.4.1