feat: Add HackGpt Enterprise features

- 6-Phase pentest methodology UI (Recon, Scanning, Vuln, Exploit, Report, Retest)
- Phase-aware AI prompts with context from current phase
- Attack chain analysis and visualization
- CVSS-style severity badges (CRITICAL/HIGH/MEDIUM/LOW)
- Findings sidebar with severity counts
- Phase-specific tools and quick actions
This commit is contained in:
2025-11-28 10:54:25 -05:00
parent 8b89e27b68
commit b9428df6df
32 changed files with 4641 additions and 1 deletions

84
scripts/init.sh Normal file
View File

@@ -0,0 +1,84 @@
#!/bin/bash
echo "=================================================="
echo " StrikePackageGPT - Initialization Script"
echo "=================================================="
echo ""
# Check for Docker
if ! command -v docker &> /dev/null; then
echo "❌ Docker is not installed. Please install Docker first."
exit 1
fi
if ! command -v docker-compose &> /dev/null; then
echo "❌ Docker Compose is not installed. Please install Docker Compose first."
exit 1
fi
echo "✅ Docker and Docker Compose are installed"
# Create .env if not exists
if [ ! -f .env ]; then
echo "📄 Creating .env file from template..."
cp .env.example .env
echo "✅ Created .env file. Edit it to add API keys if needed."
else
echo "✅ .env file already exists"
fi
# Create data directory
mkdir -p data
echo "✅ Created data directory"
# Start services
echo ""
echo "🚀 Starting services..."
docker-compose up -d --build
# Wait for services to be ready
echo ""
echo "⏳ Waiting for services to start..."
sleep 10
# Check service health
echo ""
echo "🔍 Checking service health..."
check_service() {
local url=$1
local name=$2
if curl -s "$url" > /dev/null 2>&1; then
echo "$name is healthy"
return 0
else
echo "$name is starting..."
return 1
fi
}
check_service "http://localhost:8000/health" "LLM Router"
check_service "http://localhost:8001/health" "HackGPT API"
check_service "http://localhost:8080/health" "Dashboard"
# Pull default Ollama model
echo ""
echo "📥 Pulling default LLM model (llama3.2)..."
echo " This may take a few minutes on first run..."
docker exec strikepackage-ollama ollama pull llama3.2
echo ""
echo "=================================================="
echo " ✅ StrikePackageGPT is ready!"
echo "=================================================="
echo ""
echo " Dashboard: http://localhost:8080"
echo " API Docs: http://localhost:8001/docs"
echo " LLM Router: http://localhost:8000/docs"
echo ""
echo " To access Kali container:"
echo " docker exec -it strikepackage-kali bash"
echo ""
echo " To view logs:"
echo " docker-compose logs -f"
echo ""

88
scripts/preflight.ps1 Normal file
View File

@@ -0,0 +1,88 @@
# StrikePackageGPT Pre-flight Check
$AllPassed = $true
function Show-Check {
param([string]$Name, [bool]$Passed, [string]$Message)
if ($Passed) {
Write-Host " [OK] $Name" -ForegroundColor Green
if ($Message) { Write-Host " $Message" -ForegroundColor DarkGray }
} else {
Write-Host " [X] $Name" -ForegroundColor Red
if ($Message) { Write-Host " $Message" -ForegroundColor Yellow }
$script:AllPassed = $false
}
}
Write-Host ""
Write-Host "========================================================" -ForegroundColor Cyan
Write-Host " StrikePackageGPT Pre-flight Check " -ForegroundColor Cyan
Write-Host "========================================================" -ForegroundColor Cyan
Write-Host ""
# Hardware
Write-Host " HARDWARE" -ForegroundColor White
Write-Host " --------" -ForegroundColor DarkGray
$os = Get-CimInstance Win32_OperatingSystem
$ram = [math]::Round($os.TotalVisibleMemorySize / 1MB, 1)
Show-Check "RAM: ${ram}GB" ($ram -ge 8) ""
$disk = [math]::Round((Get-PSDrive (Get-Location).Drive.Name).Free / 1GB, 1)
Show-Check "Disk: ${disk}GB free" ($disk -ge 20) ""
Write-Host ""
# Docker
Write-Host " DOCKER" -ForegroundColor White
Write-Host " ------" -ForegroundColor DarkGray
$dockerOk = $null -ne (Get-Command docker -ErrorAction SilentlyContinue)
Show-Check "Docker installed" $dockerOk ""
$dockerRun = $false
if ($dockerOk) { try { docker info 2>$null | Out-Null; $dockerRun = $true } catch {} }
Show-Check "Docker running" $dockerRun ""
Write-Host ""
# Containers
Write-Host " CONTAINERS" -ForegroundColor White
Write-Host " ----------" -ForegroundColor DarkGray
if ($dockerRun) {
$containers = @("dashboard","hackgpt-api","llm-router","kali","kali-executor")
foreach ($c in $containers) {
$name = "strikepackage-$c"
$status = docker ps --filter "name=$name" --format "{{.Status}}" 2>$null
if ($status) {
Show-Check $name $true $status
} else {
Write-Host " [ ] $name - Not running" -ForegroundColor DarkGray
}
}
}
Write-Host ""
# Ollama
Write-Host " OLLAMA" -ForegroundColor White
Write-Host " ------" -ForegroundColor DarkGray
try {
$r = Invoke-RestMethod -Uri "http://localhost:11434/api/tags" -TimeoutSec 3 -ErrorAction Stop
$m = ($r.models | ForEach-Object { $_.name }) -join ", "
Show-Check "Local Ollama" $true $m
} catch {
Write-Host " [ ] Local Ollama - Not running" -ForegroundColor DarkGray
}
try {
$r = Invoke-RestMethod -Uri "http://192.168.1.50:11434/api/tags" -TimeoutSec 3 -ErrorAction Stop
$m = ($r.models | ForEach-Object { $_.name }) -join ", "
Show-Check "Dell LLM Box" $true $m
} catch {
Write-Host " [ ] Dell LLM Box - Not reachable" -ForegroundColor DarkGray
}
Write-Host ""
Write-Host "========================================================" -ForegroundColor DarkGray
if ($AllPassed) {
Write-Host " ALL CHECKS PASSED!" -ForegroundColor Green
} else {
Write-Host " Some checks failed" -ForegroundColor Yellow
}
Write-Host ""