-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
46 lines (36 loc) · 1.07 KB
/
Copy pathsetup.sh
File metadata and controls
46 lines (36 loc) · 1.07 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
#!/bin/bash
echo "🚀 Setting up Vulnerability Scanner..."
echo "========================================"
# Check Python version
python_version=$(python3 --version 2>&1 | awk '{print $2}')
echo "✓ Python version: $python_version"
# Create virtual environment
echo "📦 Creating virtual environment..."
python3 -m venv venv
# Activate virtual environment
source venv/bin/activate
# Upgrade pip
echo "⬆️ Upgrading pip..."
pip install --upgrade pip
# Install requirements
echo "📥 Installing dependencies..."
pip install -r requirements.txt
# Create necessary directories
echo "📁 Creating directories..."
mkdir -p reports
mkdir -p logs
# Copy example config
if [ ! -f config.yaml ]; then
echo "⚙️ Creating config file..."
cp config.yaml.example config.yaml 2>/dev/null || touch config.yaml
fi
# Run tests
echo "🧪 Running tests..."
python -m pytest tests/ -v
echo ""
echo "✅ Setup complete!"
echo "========================================"
echo ""
echo "To start scanning:"
echo " source venv/bin/activate"
echo " python main.py --target example.com"