about summary refs log tree commit diff stats
path: root/example/asm
diff options
context:
space:
mode:
Diffstat (limited to 'example/asm')
-rwxr-xr-xexample/asm/shellcode.py12
-rw-r--r--example/asm/simple.py10
2 files changed, 11 insertions, 11 deletions
diff --git a/example/asm/shellcode.py b/example/asm/shellcode.py
index 3ff11489..20fa02d8 100755
--- a/example/asm/shellcode.py
+++ b/example/asm/shellcode.py
@@ -64,7 +64,7 @@ else:
 with open(args.source) as fstream:
     source = fstream.read()
 
-blocs, symbol_pool = parse_asm.parse_txt(machine.mn, attrib, source)
+blocks, symbol_pool = parse_asm.parse_txt(machine.mn, attrib, source)
 
 # Fix shellcode addrs
 symbol_pool.set_offset(symbol_pool.getby_name("main"), addr_main)
@@ -73,14 +73,14 @@ if args.PE:
     symbol_pool.set_offset(symbol_pool.getby_name_create("MessageBoxA"),
                            pe.DirImport.get_funcvirt('USER32.dll', 'MessageBoxA'))
 
-# Print and graph firsts blocs before patching it
-for bloc in blocs:
-    print bloc
-open("graph.dot", "w").write(blocs.dot())
+# Print and graph firsts blocks before patching it
+for block in blocks:
+    print block
+open("graph.dot", "w").write(blocks.dot())
 
 # Apply patches
 patches = asmbloc.asm_resolve_final(machine.mn,
-                                    blocs,
+                                    blocks,
                                     symbol_pool,
                                     dst_interval)
 if args.encrypt:
diff --git a/example/asm/simple.py b/example/asm/simple.py
index d7623908..7ab403f4 100644
--- a/example/asm/simple.py
+++ b/example/asm/simple.py
@@ -6,7 +6,7 @@ from miasm2.core import parse_asm, asmbloc
 
 
 # Assemble code
-blocs, symbol_pool = parse_asm.parse_txt(mn_x86, 32, '''
+blocks, symbol_pool = parse_asm.parse_txt(mn_x86, 32, '''
 main:
    MOV    EAX, 1
    MOV    EBX, 2
@@ -25,11 +25,11 @@ 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, symbol_pool)
+patches = asmbloc.asm_resolve_final(mn_x86, blocks, symbol_pool)
 
-# Show resolved blocs
-for bloc in blocs:
-    print bloc
+# Show resolved blocks
+for block in blocks:
+    print block
 
 # Print offset -> bytes
 pprint(patches)