about summary refs log tree commit diff stats
path: root/example/jitter/sandbox_call.py
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2020-08-31 09:27:56 +0200
committerGitHub <noreply@github.com>2020-08-31 09:27:56 +0200
commit06239dde95cd984548deb40e9945d8bd85d83425 (patch)
tree2fb59bca2aada9280fb1aecd2ebdd633a23cdc4b /example/jitter/sandbox_call.py
parent5d8beb271d9890241a6d61dd476fab26ca37ebbf (diff)
parent24ce193b8bad352853a9c5589f6fdcf5177d5466 (diff)
downloadmiasm-06239dde95cd984548deb40e9945d8bd85d83425.tar.gz
miasm-06239dde95cd984548deb40e9945d8bd85d83425.zip
Merge pull request #1274 from serpilliere/dont_gen_locationdb
Avoid generate default locationdb
Diffstat (limited to 'example/jitter/sandbox_call.py')
-rw-r--r--example/jitter/sandbox_call.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/example/jitter/sandbox_call.py b/example/jitter/sandbox_call.py
index 7d400b7d..6d24777a 100644
--- a/example/jitter/sandbox_call.py
+++ b/example/jitter/sandbox_call.py
@@ -5,16 +5,18 @@ from miasm.analysis.sandbox import Sandbox_Linux_arml
 from miasm.analysis.binary import Container
 from miasm.os_dep.linux_stdlib import linobjs
 from miasm.core.utils import hexdump
+from miasm.core.locationdb import LocationDB
 
 # Parse arguments
 parser = Sandbox_Linux_arml.parser(description="ELF sandboxer")
 parser.add_argument("filename", help="ELF Filename")
 options = parser.parse_args()
 
-sb = Sandbox_Linux_arml(options.filename, options, globals())
+loc_db = LocationDB()
+sb = Sandbox_Linux_arml(loc_db, options.filename, options, globals())
 
 with open(options.filename, "rb") as fdesc:
-    cont = Container.from_stream(fdesc)
+    cont = Container.from_stream(fdesc, loc_db)
     loc_key = cont.loc_db.get_name_location("md5_starts")
     addr_to_call = cont.loc_db.get_location_offset(loc_key)