about summary refs log tree commit diff stats
path: root/example/ida/depgraph.py
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2015-03-05 16:34:36 +0100
committerserpilliere <serpilliere@users.noreply.github.com>2015-03-05 16:34:36 +0100
commit8f3f666795a8f7c2292092987529036b513250d0 (patch)
tree6aad3cb6f08261bbe3e2a746829afc9b8f0f9389 /example/ida/depgraph.py
parent49e17c7e0f96ecf79d0a0d66d3ba162536c81d78 (diff)
parent22df70de9fb343f5106b8da7c8c16a4dde5ea96c (diff)
downloadmiasm-8f3f666795a8f7c2292092987529036b513250d0.tar.gz
miasm-8f3f666795a8f7c2292092987529036b513250d0.zip
Merge pull request #98 from commial/ida-platform-indep
Example/IDA: Replace /tmp/ by tempfile.gettempdir (credits @OwariDa)
Diffstat (limited to 'example/ida/depgraph.py')
-rw-r--r--example/ida/depgraph.py4
1 files changed, 3 insertions, 1 deletions
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())