You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
from miasm.arch.ia32_arch import x86_mn
from miasm.core import parse_asm
from miasm.core import asmbloc
from elfesteem.pe_init import PE
e=PE()
s_text= e.SHList.add_section(name='.text',addr=0x1000,rawsize=0x1000)
t='''
entry_point:
repz movsb
ret
'''
all_bloc, symbol_pool = parse_asm.parse_txt(x86_mn,t)
symbol_pool.set_offset(symbol_pool.getby_name("entry_point"),
e.rva2virt(s_text.addr))
resolved_b, patches = asmbloc.asm_resolve_final(x86_mn, all_bloc[0],
symbol_pool)
for p in patches:
e.virt[p] = patches[p]
e.Opthdr.AddressOfEntryPoint = 0x1000
open ('bug.exe','wb').write(str(e))
What is the expected output? What do you see instead?
Traceback (most recent call last):
File "beta.py", line 13, in <module>
all_bloc, symbol_pool = parse_asm.parse_txt(x86_mn,t)
File "/usr/local/lib/python2.7/dist-packages/miasm/core/parse_asm.py", line 164, in parse_txt
c+=mnemo.prefix2hex(prefix)
File "/usr/local/lib/python2.7/dist-packages/miasm/arch/ia32_arch.py", line 1397, in prefix2hex
return reduce(lambda x,y:x+chr(y), prefix, "")
File "/usr/local/lib/python2.7/dist-packages/miasm/arch/ia32_arch.py", line 1397, in <lambda>
return reduce(lambda x,y:x+chr(y), prefix, "")
TypeError: an integer is required
Please provide any additional information below.
miasm/core/parse_asm.py
comment out line 164
c+=mnemo.prefix2hex(prefix)
for a quick fix
Original issue reported on code.google.com by christos...@gmail.com on 17 Mar 2014 at 7:50
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
christos...@gmail.com
on 17 Mar 2014 at 7:50The text was updated successfully, but these errors were encountered: