Lightweight Vulnerability Scanner for Resourced-constrained Organizations

setup_manual.sh 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/bin/bash
  2. echo "Starting manual setup for OpenVAS dashboard..."
  3. # Ensure we're running on Ubuntu with sudo
  4. if [[ $EUID -ne 0 ]]; then
  5. echo "This script must be run with sudo: sudo ./setup_manual.sh"
  6. exit 1
  7. fi
  8. # ---- 1. System Dependencies ----
  9. echo "Installing system dependencies..."
  10. apt update && apt install -y \
  11. nmap \
  12. python3 \
  13. python3-pip \
  14. python3-venv \
  15. libxslt1-dev \
  16. libxml2-dev \
  17. libffi-dev \
  18. build-essential \
  19. virtualenv \
  20. unzip \
  21. net-tools \
  22. curl
  23. # ---- 2. Python Virtual Environment ----
  24. PROJECT_DIR=$(pwd)
  25. echo "Creating virtual environment in: $PROJECT_DIR/venv"
  26. python3 -m venv venv
  27. source venv/bin/activate
  28. # ---- 3. Install Python Packages ----
  29. echo "Installing Python dependencies in virtual environment..."
  30. pip install --upgrade pip
  31. pip install dash dash-bootstrap-components pandas plotly psutil python-nmap lxml tabulate python-dotenv schedule gvm-tools
  32. echo "Manual setup complete!"
  33. echo "To activate your virtual environment later, run:"
  34. echo "source $PROJECT_DIR/venv/bin/activate"
  35. echo ""
  36. echo "To run the scheduler:"
  37. echo " sudo $PROJECT_DIR/venv/bin/python3 $PROJECT_DIR/scheduler.py"