diff options
| author | Camille Mougey <camille.mougey@cea.fr> | 2014-11-03 19:12:35 +0100 |
|---|---|---|
| committer | Camille Mougey <camille.mougey@cea.fr> | 2014-11-03 19:34:32 +0100 |
| commit | acb866d6d401e5cfbdb01c4a888fe8017c472281 (patch) | |
| tree | 8ea852ff0dd90a9a779eca035ce133dbfd1f1759 /example/disasm_03.py | |
| parent | d224bd8b0e75afb551f8e94d8e4036c9f5132e79 (diff) | |
| download | miasm-acb866d6d401e5cfbdb01c4a888fe8017c472281.tar.gz miasm-acb866d6d401e5cfbdb01c4a888fe8017c472281.zip | |
TestDis: update example to use Container
Diffstat (limited to 'example/disasm_03.py')
| -rw-r--r-- | example/disasm_03.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/example/disasm_03.py b/example/disasm_03.py index 08b209a1..72c08c0d 100644 --- a/example/disasm_03.py +++ b/example/disasm_03.py @@ -11,10 +11,8 @@ if len(sys.argv) != 3: fname = sys.argv[1] ad = int(sys.argv[2], 16) -e = pe_init.PE(open(fname).read()) -bs = bin_stream_pe(e.virt) - -mdis = dis_x86_32(bs) +cont = Container.from_stream(open(sys.argv[1])) +mdis = dis_x86_32(cont.bin_stream) # inform the engine not to disasm nul instructions mdis.dont_dis_nulstart_bloc = True blocs = mdis.dis_multibloc(ad) |