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/depgraph.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'example/ida/depgraph.py') diff --git a/example/ida/depgraph.py b/example/ida/depgraph.py index 33aaa6cb..edf4ce0b 100644 --- a/example/ida/depgraph.py +++ b/example/ida/depgraph.py @@ -1,4 +1,6 @@ import sys +import os +import tempfile from idaapi import GraphViewer from miasm2.core.bin_stream_ida import bin_stream_ida @@ -175,7 +177,7 @@ def treat_element(): sol_nb += 1 print "Get graph number %02d" % sol_nb - filename = "/tmp/solution_0x%08x_%02d.dot" % (addr, sol_nb) + filename = os.path.join(tempfile.gettempdir(), "solution_0x%08x_%02d.dot" % (addr, sol_nb)) print "Dump the graph to %s" % filename open(filename, "w").write(graph.graph.dot()) -- cgit 1.4.1