From 22df70de9fb343f5106b8da7c8c16a4dde5ea96c Mon Sep 17 00:00:00 2001 From: Ajax Date: Thu, 5 Mar 2015 16:02:23 +0100 Subject: Example/IDA: Replace /tmp/ by tempfile.gettempdir (credits Joel Eriksson) --- example/ida/graph_ir.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'example/ida/graph_ir.py') diff --git a/example/ida/graph_ir.py b/example/ida/graph_ir.py index 3a936e37..e7fd39d0 100644 --- a/example/ida/graph_ir.py +++ b/example/ida/graph_ir.py @@ -1,4 +1,6 @@ import sys +import os +import tempfile # Set your path first! sys.path.append("/home/serpilliere/tools/pyparsing/pyparsing-2.0.1/build/lib.linux-x86_64-2.7") @@ -144,7 +146,7 @@ for irb in ir_arch.blocs.values(): ir_arch.gen_graph() out = ir_arch.graph() -open('/tmp/graph.txt', 'w').write(out) +open(os.path.join(tempfile.gettempdir(), 'graph.txt'), 'wb').write(out) # ir_arch.dead_simp() -- cgit 1.4.1