about summary refs log tree commit diff stats
path: root/example
diff options
context:
space:
mode:
authorserpilliere <devnull@localhost>2011-09-05 13:16:58 +0200
committerserpilliere <devnull@localhost>2011-09-05 13:16:58 +0200
commit271cc69e7f8f4411b2021830efbddca305cd690f (patch)
treee567ca2e523a545c6644d8288edc17cb71381aec /example
parent24308ec5980e38f0870e9487b63c6d2704899d23 (diff)
downloadmiasm-271cc69e7f8f4411b2021830efbddca305cd690f.tar.gz
miasm-271cc69e7f8f4411b2021830efbddca305cd690f.zip
fix x86_asm ep
Diffstat (limited to 'example')
-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