about summary refs log tree commit diff stats
path: root/example/asm_x86.py
diff options
context:
space:
mode:
authorPierre LALET <pierre.lalet@cea.fr>2011-09-05 14:13:52 +0200
committerPierre LALET <pierre.lalet@cea.fr>2011-09-05 14:13:52 +0200
commitfdb869856b6d83962935379044dc4e577cd8b933 (patch)
treeb654a58aaf93abae217f4c598162b2de3301be8e /example/asm_x86.py
parent2daacc428034d3a5f364800e24e2b8bcb01cf440 (diff)
parentef7c41c81f612fb225b79cb646f1d6eb8c8b722e (diff)
downloadmiasm-fdb869856b6d83962935379044dc4e577cd8b933.tar.gz
miasm-fdb869856b6d83962935379044dc4e577cd8b933.zip
merge
Diffstat (limited to 'example/asm_x86.py')
-rwxr-xr-xexample/asm_x86.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/example/asm_x86.py b/example/asm_x86.py
index 8e911676..79b61886 100755
--- a/example/asm_x86.py
+++ b/example/asm_x86.py
@@ -16,7 +16,7 @@ my_mn = x86_mn
 my_mn = x86_mn
 
 e = pe_init.PE()
-e.SHList.add_section(name = "text", addr = 0x1000, rawsize = 0x4000)
+s_text = e.SHList.add_section(name = "text", addr = 0x1000, rawsize = 0x4000)
 
 ####filelogger sc####
 all_bloc, symbol_pool = parse_asm.parse_txt(my_mn,r'''
@@ -56,6 +56,7 @@ eend:
 #fix shellcode addr
 symbol_pool.add(asmbloc.asm_label('base_address', 0x400000))
 symbol_pool.getby_name("main").offset = 0x401000
+e.Opthdr.AddressOfEntryPoint = s_text.addr
 
 for b in all_bloc[0]:
     print b