about summary refs log tree commit diff stats
path: root/miasm/analysis/sandbox.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2019-09-20 17:31:27 +0200
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2019-09-22 20:11:28 +0200
commit1902c27e796277ab495afe3d39bf17d882eda062 (patch)
tree6fb49e1321fe1f4e35d936cbe4ffbe420536d790 /miasm/analysis/sandbox.py
parent5a039ca675a60d6de201cb0b89291ee2bd2304c4 (diff)
downloadfocaccia-miasm-1902c27e796277ab495afe3d39bf17d882eda062.tar.gz
focaccia-miasm-1902c27e796277ab495afe3d39bf17d882eda062.zip
Fix bytes dllname
Diffstat (limited to 'miasm/analysis/sandbox.py')
-rw-r--r--miasm/analysis/sandbox.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/miasm/analysis/sandbox.py b/miasm/analysis/sandbox.py
index e5595071..b8aaf788 100644
--- a/miasm/analysis/sandbox.py
+++ b/miasm/analysis/sandbox.py
@@ -51,6 +51,8 @@ class Sandbox(object):
         """
 
         # Initialize
+        if not isinstance(fname, bytes):
+            fname = fname.encode('utf8')
         self.fname = fname
         self.options = options
         if custom_methods is None:
@@ -185,7 +187,7 @@ class OS_Win(OS):
                    "ole32.dll", "urlmon.dll",
                    "ws2_32.dll", 'advapi32.dll', "psapi.dll",
                    ]
-    modules_path = "win_dll"
+    modules_path = b"win_dll"
 
     def __init__(self, custom_methods, *args, **kwargs):
         from miasm.jitter.loader.pe import vm_load_pe, vm_load_pe_libs,\