Add setup scripts for server and implant
This commit is contained in:
1 parent
89325b054d
commit
a9cfec0b1a
3 files changed
+94
No files matched your search
@@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
# Agentic Pentest MCP - Setup Script
|
||||
# Creates a Python virtual environment and installs dependencies.
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
VENV_DIR="$SCRIPT_DIR/.venv"
|
||||
|
||||
echo "=== Agentic Pentest MCP Setup ==="
|
||||
echo ""
|
||||
|
||||
# Check for Python 3
|
||||
if ! command -v python3 &> /dev/null; then
|
||||
echo "Error: python3 not found. Please install Python 3 first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PYTHON_VERSION=$(python3 --version | cut -d' ' -f2)
|
||||
echo "Found Python $PYTHON_VERSION"
|
||||
|
||||
# Create virtual environment if it doesn't exist
|
||||
if [ ! -d "$VENV_DIR" ]; then
|
||||
echo ""
|
||||
echo "Creating virtual environment at .venv/"
|
||||
python3 -m venv "$VENV_DIR"
|
||||
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 "=== Setup Complete ==="
|
||||
echo ""
|
||||
echo "To start the server:"
|
||||
echo " source .venv/bin/activate"
|
||||
echo " export IMPLANT_API_KEY='your-secret-key'"
|
||||
echo " python3 server.py --http 8000"
|
||||
echo ""
|
||||
echo "Or run everything in one command:"
|
||||
echo " source .venv/bin/activate && export IMPLANT_API_KEY='your-secret-key' && python3 server.py --http 8000"
|
||||
Reference in new issue
Block a user