merrychap / shellen

:cherry_blossom: Interactive shellcoding environment to easily craft shellcodes
MIT License
888 stars 97 forks source link

Fail to load dynamic library #10

Closed cybersins closed 6 years ago

cybersins commented 6 years ago

After installing the packages, I have received the following issue,

Error rishi@blackbox:~ ] shellen Traceback (most recent call last): File "/usr/local/bin/shellen", line 7, in from shellen.main import main File "/usr/local/lib/python3.6/site-packages/shellen/main.py", line 3, in from shell import Shellen File "/usr/local/lib/python3.6/site-packages/shellen/shell.py", line 18, in from asms.disasm import DisassemblerWrapper File "/usr/local/lib/python3.6/site-packages/shellen/asms/disasm.py", line 6, in from capstone import * File "/usr/local/lib/python3.6/site-packages/capstone/init.py", line 230, in raise ImportError("ERROR: fail to load the dynamic library.") ImportError: ERROR: fail to load the dynamic library.

Packages Install Validation: rishi@blackbox:~ ] sudo pip3 install shellen Requirement already satisfied: shellen in /usr/local/lib/python3.6/site-packages Requirement already satisfied: pygments in /usr/local/lib/python3.6/site-packages (from shellen) Requirement already satisfied: termcolor in /usr/local/lib/python3.6/site-packages (from shellen) Requirement already satisfied: requests in /usr/local/lib/python3.6/site-packages (from shellen) Requirement already satisfied: terminaltables in /usr/local/lib/python3.6/site-packages (from shellen) Requirement already satisfied: colorama in /usr/local/lib/python3.6/site-packages (from shellen) Requirement already satisfied: prompt-toolkit in /usr/local/lib/python3.6/site-packages (from shellen) Requirement already satisfied: keystone-engine in /usr/local/lib/python3.6/site-packages (from shellen) Requirement already satisfied: capstone in /usr/local/lib/python3.6/site-packages (from shellen) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/site-packages (from requests->shellen) Requirement already satisfied: urllib3<1.23,>=1.21.1 in /usr/local/lib/python3.6/site-packages (from requests->shellen) Requirement already satisfied: idna<2.7,>=2.5 in /usr/local/lib/python3.6/site-packages (from requests->shellen) Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/site-packages (from requests->shellen) Requirement already satisfied: six>=1.9.0 in /usr/local/lib/python3.6/site-packages (from prompt-toolkit->shellen) Requirement already satisfied: wcwidth in /usr/local/lib/python3.6/site-packages (from prompt-toolkit->shellen)

Thanks!

merrychap commented 6 years ago

Check out this issue. pip installed capstone's libraries in a wrong directory. Move this libraries in your /usr/local/lib/python3.6/site-packages/capstone/ path, or just install capstone manually.

cybersins commented 6 years ago

Thanks, that solved the capstone error I guess, but now this:

rishi@blackbox:~ ] shellen
Traceback (most recent call last):
  File "/usr/local/bin/shellen", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/shellen/main.py", line 9, in main
    shell = Shellen()
  File "/usr/local/lib/python3.6/site-packages/shellen/shell.py", line 54, in __init__
    self.__asm = AssemblerWrapper(X86_32)
  File "/usr/local/lib/python3.6/site-packages/shellen/asms/asm.py", line 57, in __init__
    self.executor = Assembler(self.arch)
  File "/usr/local/lib/python3.6/site-packages/shellen/asms/asm.py", line 16, in __init__
    super().__init__()
  File "/usr/local/lib/python3.6/site-packages/shellen/asms/baseexc.py", line 28, in __init__
    self._archs   = self.avail_archs()
  File "/usr/local/lib/python3.6/site-packages/shellen/asms/asm.py", line 28, in avail_archs
    ARM32:   (KS_ARCH_ARM,     KS_MODE_ARM),
NameError: name 'KS_ARCH_ARM' is not defined
merrychap commented 6 years ago

Try this issue. It suggests installing keystone manually as well :D Check these instructions for installing keystone manually.