-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathINSTALL.sh
More file actions
85 lines (72 loc) · 2.85 KB
/
INSTALL.sh
File metadata and controls
85 lines (72 loc) · 2.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/bin/bash
echo "╔════════════════════════════════════════════════════════════════════╗"
echo "║ KADEDEE SECURITY SCANNER ║"
echo "║ Installation Script ║"
echo "╚════════════════════════════════════════════════════════════════════╝"
echo ""
# Check Node.js version
echo "✓ Checking Node.js installation..."
if ! command -v node &> /dev/null; then
echo "✗ Node.js is not installed. Please install Node.js 18 or higher."
exit 1
fi
NODE_VERSION=$(node -v | cut -d'v' -f2 | cut -d'.' -f1)
if [ "$NODE_VERSION" -lt 18 ]; then
echo "✗ Node.js version 18 or higher is required. Current version: $(node -v)"
exit 1
fi
echo "✓ Node.js $(node -v) detected"
echo ""
# Install dependencies
echo "📦 Installing dependencies..."
echo "This may take a few minutes..."
echo ""
npm install \
commander@^11.1.0 \
chalk@^5.3.0 \
ora@^7.0.1 \
puppeteer@^21.5.2 \
cheerio@^1.0.0-rc.12 \
axios@^1.6.2 \
better-sqlite3@^9.2.2 \
cli-table3@^0.6.3 \
inquirer@^9.2.12 \
figlet@^1.7.0 \
gradient-string@^2.0.2 \
@tensorflow/tfjs-node@^4.15.0 \
natural@^6.10.4 \
compromise@^14.10.0
if [ $? -ne 0 ]; then
echo "✗ Failed to install dependencies"
exit 1
fi
echo ""
echo "✓ Dependencies installed successfully"
echo ""
# Make CLI executable
echo "🔧 Setting up CLI..."
chmod +x cli/index.js
# Create necessary directories
mkdir -p kadedee-reports
mkdir -p kadedee-data
mkdir -p kadedee-models
echo "✓ CLI configured"
echo ""
# Initialize database
echo "🗄️ Initializing database..."
node cli/index.js init
echo ""
echo "╔════════════════════════════════════════════════════════════════════╗"
echo "║ ✅ INSTALLATION COMPLETE ║"
echo "╚════════════════════════════════════════════════════════════════════╝"
echo ""
echo "📚 Usage:"
echo " node cli/index.js scan <url> # Basic scan"
echo " node cli/index.js scan <url> --ai-analysis # Scan with AI"
echo " node cli/index.js report --list # View history"
echo " node cli/index.js --help # Show help"
echo ""
echo "📖 Read README-KADEDEE.md for full documentation"
echo ""
echo "⚠️ Remember: Only scan systems you own or have permission to test!"
echo ""