trexcheng / miasm Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/miasm
Automatically exported from code.google.com/p/miasm
* What steps will reproduce the problem?
1. Install "fresh" Ubuntu 12.04
2. Follow documented installation procedure
3. tcc & miasm will not compile
* What is the expected output? What do you see instead?
Various error messages during configure and make.
* What version of the product are you using? On what operating system?
Latest version as of June 6th 2014.
* Please provide any additional information below.
The following packages are at least required:
$ sudo apt-get install python-dev clang
This list is non-exhaustive, as not all tests succeed in my configuration.
Original issue reported on code.google.com by [email protected]
on 7 Jun 2014 at 5:30
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 [email protected]
on 17 Mar 2014 at 7:50
What steps will reproduce the problem?
1.
MOV AX, 0x1337
ROL AX, 0x83
AX not simplified (0x1337 <<< 0x83)
2.
MOV AX, 0x1337
ROR AX, 0x83
AX = 0 (should not !)
Fix available at:
http://code.google.com/r/fperigaud-miasmclone/source/detail?r=b6e5f285eac3d4cbae
18c0e2847688bf6a22b717
Original issue reported on code.google.com by [email protected]
on 9 Jun 2014 at 2:06
What steps will reproduce the problem?
1. Open miasm2/arch/sh4/arch.py (
https://code.google.com/p/miasm/source/browse/miasm2/arch/sh4/arch.py?r=6e3a0c50
15c91e33fa78beb208db092bd3db00b3#410 )
2. Go to the definition of the __init__ method of class instruction_sh4
What is the expected output?
super(instruction_sh4, self).__init__(*args, **kargs)
What do you see instead?
super(instruction_arm, self).__init__(*args, **kargs)
What version of the product are you using? latest mercurial commit.
On what operating system? Arch Linux
Please provide any additional information below.
I'm currently implementing AVR architecture in Miasm2 (to reverse-engineer an
Arduino firmware) and while reading the code used for SH4 I found the typo
reported above.
Original issue reported on code.google.com by [email protected]
on 13 Jul 2014 at 7:24
LDR R2, #pcoffset was incorrect
Before :
>>> from miasm2.arch.arm.arch import mn_armt
>>> print mn_armt.dis('\xc8\x4A')
LDR R2, [PC, 0xC8]
After:
>>> from miasm2.arch.arm.arch import mn_armt
>>> print mn_armt.dis('\xc8\x4A')
LDR R2, [PC, 0x320]
Patch provided
Original issue reported on code.google.com by [email protected]
on 26 Jun 2014 at 2:46
Attachments:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.