-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-run.sh
More file actions
71 lines (61 loc) · 2.81 KB
/
docker-run.sh
File metadata and controls
71 lines (61 loc) · 2.81 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
#!/bin/bash
# Docker Quick Start Script for SPOOF53
set -e
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m'
echo -e "${BLUE}╔═══════════════════════════════════════════════════════════════╗${NC}"
echo -e "${BLUE}║${GREEN} SPOOF53 - Docker Quick Start ${BLUE}║${NC}"
echo -e "${BLUE}╚═══════════════════════════════════════════════════════════════╝${NC}"
echo ""
# Check if docker is installed
if ! command -v docker &> /dev/null; then
echo -e "${RED}❌ Docker is not installed${NC}"
echo -e "${YELLOW}Please install Docker first:${NC}"
echo " curl -fsSL https://get.docker.com | sh"
exit 1
fi
# Check if docker-compose is installed
if ! command -v docker-compose &> /dev/null; then
echo -e "${YELLOW}⚠️ docker-compose not found, using docker run instead${NC}"
USE_COMPOSE=false
else
USE_COMPOSE=true
fi
# Create directories
echo -e "${BLUE}📁 Creating directories...${NC}"
mkdir -p reports whatsapp_session signal_session logs ssh_keys
# Build and run
if [ "$USE_COMPOSE" = true ]; then
echo -e "${BLUE}🐳 Using docker-compose...${NC}"
docker-compose up -d --build
echo -e "${GREEN}✅ SPOOF53 is running in Docker${NC}"
echo -e "${BLUE}📊 View logs: docker-compose logs -f spoof53${NC}"
else
echo -e "${BLUE}🐳 Building Docker image...${NC}"
docker build -t spoof53:latest .
echo -e "${BLUE}🚀 Running SPOOF53 container...${NC}"
docker run -d \
--name spoof53 \
--privileged \
--network host \
-v $(pwd)/reports:/home/spoof53/spoof53_reports \
-v $(pwd)/whatsapp_session:/home/spoof53/.spoof53/whatsapp_session \
-v $(pwd)/signal_session:/home/spoof53/.spoof53/signal_session \
-v $(pwd)/logs:/home/spoof53/.spoof53/logs \
-v $(pwd)/ssh_keys:/home/spoof53/.spoof53/ssh_keys \
spoof53:latest
echo -e "${GREEN}✅ SPOOF53 is running in Docker${NC}"
echo -e "${BLUE}📊 View logs: docker logs -f spoof53${NC}"
fi
echo ""
echo -e "${YELLOW}📝 Useful commands:${NC}"
echo -e " ${GREEN}• Stop:${NC} docker-compose down (or docker stop spoof53)"
echo -e " ${GREEN}• Start:${NC} docker-compose up -d (or docker start spoof53)"
echo -e " ${GREEN}• Shell:${NC} docker exec -it spoof53 bash"
echo -e " ${GREEN}• Logs:${NC} docker logs -f spoof53"
echo ""
echo -e "${GREEN}Access the interactive console with:${NC}"
echo -e " ${BLUE}docker exec -it spoof53 python3 spoof53.py${NC}"