EmpireProject / Empire

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

ImportError: No module named ordered_dict #1269

Closed hktalent closed 5 years ago

hktalent commented 5 years ago

in my kali linux i step by step run https://github.com/EmpireProject/Empire/blob/master/Dockerfile in bash shell

wget http://launchpadlibrarian.net/233789933/lsb-release_9.20160110_all.deb
apt install ./lsb-release_9.20160110_all.deb

#ls -la
lrwxrwxrwx 1 root root       15 Nov  5 01:00 Empire -> /mytools/Empire

/opt/Empire#pip2 install ordereddict
Requirement already satisfied: ordereddict in /usr/local/lib/python2.7/dist-packages (1.1)
/opt/Empire#python2.7 empire
[*] Loading stagers from: /root/mytools/Empire//lib/stagers/
[*] Loading modules from: /root/mytools/Empire//lib/modules/
[*] Loading listeners from: /root/mytools/Empire//lib/listeners/
/usr/local/lib/python2.7/dist-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.24.1) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)
Traceback (most recent call last):
  File "empire", line 1422, in <module>
    main = empire.MainMenu(args=args)
  File "/root/mytools/Empire/lib/common/empire.py", line 109, in __init__
    self.listeners = listeners.Listeners(self, args=args)
  File "/root/mytools/Empire/lib/common/listeners.py", line 38, in __init__
    self.load_listeners()
  File "/root/mytools/Empire/lib/common/listeners.py", line 63, in load_listeners
    self.loadedListeners[listenerName] = imp.load_source(listenerName, filePath).Listener(self.mainMenu, [])
  File "/root/mytools/Empire//lib/listeners/onedrive.py", line 12, in <module>
    from requests import Request, Session
  File "/usr/local/lib/python2.7/dist-packages/requests/__init__.py", line 97, in <module>
    from . import utils
  File "/usr/local/lib/python2.7/dist-packages/requests/utils.py", line 26, in <module>
    from ._internal_utils import to_native_string
  File "/usr/local/lib/python2.7/dist-packages/requests/_internal_utils.py", line 11, in <module>
    from .compat import is_py2, builtin_str, str
  File "/usr/local/lib/python2.7/dist-packages/requests/compat.py", line 47, in <module>
    from urllib3.packages.ordered_dict import OrderedDict
ImportError: No module named ordered_dict

/opt#pip2 install  urllib3
Requirement already satisfied: urllib3 in /usr/local/lib/python2.7/dist-packages (1.24.1)
/opt#cd Empire
/opt/Empire#pip3 install  urllib3
Requirement already satisfied: urllib3 in /usr/local/lib/python3.6/dist-packages
bisack commented 5 years ago

Have a look at #1268 - I submitted a pull request to the Dev branch to fix this and a couple other issues that were borking my install. However! you can also apply these changes to Master manually, and they will work - that's what I did my original fixes on.

peyu123 commented 5 years ago

Have a look at #1268 - I submitted a pull request to the Dev branch to fix this and a couple other issues that were borking my install. However! you can also apply these changes to Master manually, and they will work - that's what I did my original fixes on.

whats the status of this ? i have the same issue on ubuntu 16.x , how do i get this dev branch to fix this issue?

peyu123 commented 5 years ago

i solved error i was getting "ImportError: No module named ordered_dict" on my ubuntu 16.04 setup by running

pip uninstall urllib3

and then pip install urllib3==1.22