nettitude / PoshC2

A proxy aware C2 framework used to aid red teamers with post-exploitation and lateral movement.
BSD 3-Clause "New" or "Revised" License
1.83k stars 326 forks source link

ModuleNotFoundError: No module named 'yaml' #78

Closed sneezy-ladybug closed 4 years ago

sneezy-ladybug commented 4 years ago

Hey, I'm getting the following error when I try to run posh-server or any command, really.

Traceback (most recent call last): File "start.py", line 8, in run() File "/opt/PoshC2/poshc2/init.py", line 13, in run server.start() File "/opt/PoshC2/poshc2/server/init.py", line 6, in start from poshc2.server.C2Server import main File "/opt/PoshC2/poshc2/server/C2Server.py", line 7, in from poshc2.server.Implant import Implant File "/opt/PoshC2/poshc2/server/Implant.py", line 3, in from poshc2.server.Config import PayloadsDirectory, PayloadTemplatesDirectory, Jitter, ClockworkSMS_APIKEY, Pushover_APIToken, Pushover_APIUser, Sounds, ClockworkSMS_MobileNumbers, NotificationsProjectName File "/opt/PoshC2/poshc2/server/Config.py", line 1, in import os, yaml ModuleNotFoundError: No module named 'yaml'

I've tried severally to install the module using but it seems to be installed already.

This is the result after running: pip install pyyaml. Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (5.1.2)

HELP!

benpturner commented 4 years ago

Posh-server runs in its own python virtual environment and during the install it creates this and then adds the dependencies to that via pip.

Try running this and see what the output is.

cd /opt/PoshC2 python3 -m pipenv --python 3 run pip install -r requirements.txt

benpturner commented 4 years ago

So its this line "pyttsx3" in requirements.txt

benpturner commented 4 years ago

Remove that from requirements.txt and re-run the Install.sh

benpturner commented 4 years ago

I've updated this https://github.com/nettitude/PoshC2/commit/2a6407be3d4f3fd837e47a957aedbe497c66a974 for now. It only uses this library for the sound so as long as you don't want sound you will be ok.

sneezy-ladybug commented 4 years ago

Hey! Thanks. This worked.