plasma-disassembler / plasma

Plasma is an interactive disassembler for x86/ARM/MIPS. It can generates indented pseudo-code with colored syntax.
GNU General Public License v3.0
3.05k stars 275 forks source link

Need update Capstone supporting #89

Closed GH0st3rs closed 6 years ago

GH0st3rs commented 6 years ago
$ plasma -i /bin/ls
Traceback (most recent call last):
  File "/usr/local/bin/plasma", line 11, in <module>
    load_entry_point('plasma==1.0', 'console_scripts', 'plasma')()
  File "/usr/local/lib/python3.5/dist-packages/plasma-1.0-py3.5-linux-x86_64.egg/plasma/main.py", line 35, in console_entry
    if not gctx.load_file():
  File "/usr/local/lib/python3.5/dist-packages/plasma-1.0-py3.5-linux-x86_64.egg/plasma/lib/__init__.py", line 217, in load_file
    self.libarch = dis.load_arch_module()
  File "/usr/local/lib/python3.5/dist-packages/plasma-1.0-py3.5-linux-x86_64.egg/plasma/lib/disassembler.py", line 208, in load_arch_module
    import plasma.lib.arch.x86 as ARCH
  File "/usr/local/lib/python3.5/dist-packages/plasma-1.0-py3.5-linux-x86_64.egg/plasma/lib/arch/x86/__init__.py", line 1, in <module>
    import plasma.lib.arch.x86.output
  File "/usr/local/lib/python3.5/dist-packages/plasma-1.0-py3.5-linux-x86_64.egg/plasma/lib/arch/x86/output.py", line 20, in <module>
    from capstone.x86 import (X86_INS_ADD, X86_INS_AND, X86_INS_CMP, X86_INS_DEC,
ImportError: cannot import name 'X86_OP_FP'
plasma-disassembler commented 6 years ago

Thanks for the feedback. But which version of capstone do you use ? I see the last release is 3.0.5-rc3 and it's the version I've tested (the install.sh downloads this tag)

GH0st3rs commented 6 years ago
Python 3.5.2 (default, Nov 23 2017, 16:37:01) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import capstone
>>> capstone.__version__
'4.0.0'

The Capstone use many frameworks, and periodically it is updated regardless of your

$ pip3 show capstone
Name: capstone
Version: 4.0.0rc1
Summary: Capstone disassembly engine
Home-page: http://www.capstone-engine.org
Author: Nguyen Anh Quynh
Author-email: aquynh@gmail.com
License: UNKNOWN
Location: /usr/local/lib/python3.5/dist-packages
Requires: 
Required-by: shellen, ROPGadget, pwntools
plasma-disassembler commented 6 years ago

Ok, I've commited a fix. But actually there is no version 4.0.0rc1, the last tag on the official repo is 4.0-alpha5.