EmpireProject / Empire

Empire is a PowerShell and Python post-exploitation agent.
http://www.powershellempire.com/
BSD 3-Clause "New" or "Revised" License
7.41k stars 2.81k forks source link

Issue with TAB - OSX High Sierra #900

Closed Kaicastledine closed 6 years ago

Kaicastledine commented 6 years ago

Empire Version

2.3

OS Information (Linux flavor, Python version)

OSX High sierra Python 2.7.10

Expected behavior and description of the error, including any actions taken immediately prior to the error. The more detail the better.

listeners
uselistener [TAB] [TAB]  or uselistener [space] [TAB] [TAB]

Does not show listeners list

878

595

573

Screenshot of error, embedded text output, or Pastebin link to the error

uselisteners [TAB] [TAB] + uselisteners [TAB] [TAB] [ENTER]

image

uselistener [space] [TAB] [TAB] image

Any additional information

Multiple issues with install

Was going to make a laughable walkthrough/guide of the install :) Will add it here

  1. gitclone empire
  2. sudo ./install.sh

Issue 1 -     Uninstalling six-1.4.1 operation denied https://github.com/pypa/pip/issues/3165 pip install 'pyopenssl==17.2.0' 

Solved by Sudo pip install 'pyopenssl==17.2.0' --ignore-installed six

issue 2 - M2Crypto - Openssl error https://stackoverflow.com/questions/33005354/trouble-installing-m2crypto-with-pip-on-os-x-macos

    swig -python -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -includeall -modern -builtin -outdir /private/tmp/pip-build-zdg5Ar/M2Crypto/M2Crypto -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
    SWIG/_m2crypto.i:43: Error: Unable to find 'openssl/opensslv.h'
    SWIG/_m2crypto.i:49: Error: Unable to find 'openssl/safestack.h'
    SWIG/_evp.i:12: Error: Unable to find 'openssl/opensslconf.h'
    SWIG/_rc4.i:5: Error: Unable to find 'openssl/opensslconf.h'
    SWIG/_ec.i:7: Error: Unable to find 'openssl/opensslconf.h'
    error: command 'swig' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-zdg5Ar/M2Crypto/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-Wx203p-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-zdg5Ar/M2Crypto/

Solved by

brew install openssl
brew install swig
env LDFLAGS="-L$(brew --prefix openssl)/lib" \
CFLAGS="-I$(brew --prefix openssl)/include" \
SWIG_FEATURES="-cpperraswarn -includeall -I$(brew --prefix openssl)/include" \
Sudo pip install m2crypto

Issue 3 - TypeError: 'NoneType' object is not iterable https://github.com/EmpireProject/Empire/issues/539 sudo ./Empire Traceback (most recent call last):   File "./Empire", line 1381, in <module>     main = empire.MainMenu(args=args)   File "/Users/USER/Empire/lib/common/empire.py", line 79, in __init__     (self.isroot, self.installPath, self.ipWhiteList, self.ipBlackList, self.obfuscate, self.obfuscateCommand) = helpers.get_config('rootuser, install_path,ip_whitelist,ip_blacklist,obfuscate,obfuscate_command') TypeError: 'NoneType' object is not iterable

Solved by

sudo ./reset.sh

Not sure what to do to get the tab working however ?

Kaicastledine commented 6 years ago

Selecting specific listeners works uselistener http image

ThePirateWhoSmellsOfSunflowers commented 6 years ago

@Kaicastledine If I remember correctly, autocompletion with [TAB] is currently not supported on OSX, it's a known issue, see #475.

xorrior commented 6 years ago

@Kaicastledine also we don't officially support macOS at all, but I'd be happy to help as much as I can. IIRC there was a PR in dev that modified the install script for macOS.

Kaicastledine commented 6 years ago

Ah not to worry !

Been trying to get it to work with CME via the API with issues also. https://github.com/byt3bl33d3r/CrackMapExec/issues/226

We've got linux servers but wanted to try setup something more portable for onsite Ptests.