about summary refs log tree commit diff stats
path: root/example/asm
diff options
context:
space:
mode:
Diffstat (limited to 'example/asm')
-rw-r--r--example/asm/shellcode.py6
-rw-r--r--example/asm/simple.py4
2 files changed, 5 insertions, 5 deletions
diff --git a/example/asm/shellcode.py b/example/asm/shellcode.py
index 3f3aa877..945cac8c 100644
--- a/example/asm/shellcode.py
+++ b/example/asm/shellcode.py
@@ -76,14 +76,14 @@ if args.PE:
                            pe.DirImport.get_funcvirt('MessageBoxA'))
 
 # Print and graph firsts blocs before patching it
-for bloc in blocs[0]:
+for bloc in blocs:
     print bloc
-graph = asmbloc.bloc2graph(blocs[0])
+graph = asmbloc.bloc2graph(blocs)
 open("graph.txt", "w").write(graph)
 
 # Apply patches
 patches = asmbloc.asm_resolve_final(machine.mn,
-                                    blocs[0],
+                                    blocs,
                                     symbol_pool,
                                     dst_interval)
 if args.encrypt:
diff --git a/example/asm/simple.py b/example/asm/simple.py
index 1929961f..45954f91 100644
--- a/example/asm/simple.py
+++ b/example/asm/simple.py
@@ -27,10 +27,10 @@ loop:
 symbol_pool.set_offset(symbol_pool.getby_name("main"), 0x0)
 
 # Spread information and resolve instructions offset
-patches = asmbloc.asm_resolve_final(mn_x86, blocs[0], symbol_pool)
+patches = asmbloc.asm_resolve_final(mn_x86, blocs, symbol_pool)
 
 # Show resolved blocs
-for bloc in blocs[0]:
+for bloc in blocs:
     print bloc
 
 # Print offset -> bytes