about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--example/disasm/file.py18
-rw-r--r--example/disasm/function.py16
2 files changed, 0 insertions, 34 deletions
diff --git a/example/disasm/file.py b/example/disasm/file.py
deleted file mode 100644
index 196e1b1a..00000000
--- a/example/disasm/file.py
+++ /dev/null
@@ -1,18 +0,0 @@
-import sys
-from miasm2.arch.x86.disasm import dis_x86_32
-from miasm2.analysis.binary import Container
-from pdb import pm
-
-if len(sys.argv) != 3:
-    print 'Example:'
-    print "%s samples/box_upx.exe 0x407570" % sys.argv[0]
-    sys.exit(0)
-
-addr = int(sys.argv[2], 0)
-cont = Container.from_stream(open(sys.argv[1]))
-mdis = dis_x86_32(cont.bin_stream)
-# Inform the engine to avoid disassembling null instructions
-mdis.dont_dis_nulstart_bloc = True
-asmcfg = mdis.dis_multiblock(addr)
-
-open('graph.dot', 'w').write(asmcfg.dot())
diff --git a/example/disasm/function.py b/example/disasm/function.py
deleted file mode 100644
index 10495dbc..00000000
--- a/example/disasm/function.py
+++ /dev/null
@@ -1,16 +0,0 @@
-from miasm2.arch.x86.disasm import dis_x86_32
-
-# MOV        EAX, 0x1337BEEF
-# MOV        ECX, 0x4
-# loop:
-# ROL        EAX, 0x8
-# LOOP       loop
-# RET
-shellcode = '\xb8\xef\xbe7\x13\xb9\x04\x00\x00\x00\xc1\xc0\x08\xe2\xfb\xc3'
-mdis = dis_x86_32(shellcode)
-asmcfg = mdis.dis_multiblock(0)
-
-for block in asmcfg.blocks:
-    print block
-
-open('graph.dot', 'w').write(asmcfg.dot())