Simplify implant setup - no venv or pip packages needed

This commit is contained in:
creinky committed 2026-11-08 20:53:23 -07:00
1 parent 6daeae1653
commit a82bc6fd68
1 file changed
+3 -31
+3 -31
View File
@@ -1,12 +1,9 @@
#!/bin/bash #!/bin/bash
# Agentic Pentest MCP - Implant Setup Script # Agentic Pentest MCP - Implant Setup Script
# Creates a Python virtual environment and installs dependencies for the implant. # Checks that Python 3 is available (no pip packages needed).
set -e set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
VENV_DIR="$SCRIPT_DIR/.venv"
echo "=== Agentic Pentest MCP Implant Setup ===" echo "=== Agentic Pentest MCP Implant Setup ==="
echo "" echo ""
@@ -18,38 +15,13 @@ fi
PYTHON_VERSION=$(python3 --version | cut -d' ' -f2) PYTHON_VERSION=$(python3 --version | cut -d' ' -f2)
echo "Found Python $PYTHON_VERSION" echo "Found Python $PYTHON_VERSION"
# Create virtual environment if it doesn't exist
if [ ! -d "$VENV_DIR" ]; then
echo "" echo ""
echo "Creating virtual environment at .venv/" echo "The implant only uses Python standard library modules."
echo "No virtual environment or pip packages required."
# Try to create venv, install python3-venv package if needed (Debian/Ubuntu)
if ! python3 -m venv "$VENV_DIR" 2>/dev/null; then
echo "Trying to install python3-venv package..."
if command -v apt-get &> /dev/null; then
sudo apt-get update && sudo apt-get install -y python3-venv
elif command -v dnf &> /dev/null; then
sudo dnf install -y python3-venv
fi
python3 -m venv "$VENV_DIR"
fi
else
echo "Virtual environment already exists at .venv/"
fi
# Activate and install dependencies
echo ""
echo "Installing dependencies..."
source "$VENV_DIR/bin/activate"
pip install --upgrade pip > /dev/null 2>&1
pip install -r "$SCRIPT_DIR/requirements.txt"
echo "" echo ""
echo "=== Implant Setup Complete ===" echo "=== Implant Setup Complete ==="
echo "" echo ""
echo "To start the implant:" echo "To start the implant:"
echo " source .venv/bin/activate"
echo " export IMPLANT_API_KEY='your-secret-key'" echo " export IMPLANT_API_KEY='your-secret-key'"
echo " export MCP_SERVER_URL='http://<server-ip>:8001'" echo " export MCP_SERVER_URL='http://<server-ip>:8001'"
echo " python3 implant.py --id <implant-id> --interval 60" echo " python3 implant.py --id <implant-id> --interval 60"