forked from Iankulani/red-bunny
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
230 lines (200 loc) · 7.71 KB
/
Copy pathinstall.sh
File metadata and controls
230 lines (200 loc) · 7.71 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
#!/bin/bash
# ============================================
# 🐇 RED_BUNNY v2.0.0 - Bash Installer
# Author: Ian Carter Kulani, MSc
# ============================================
set -e
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
WHITE='\033[1;37m'
BLUE='\033[0;34m'
NC='\033[0m'
BANNER="
${RED}╔══════════════════════════════════════════════════════════════════════════════╗
║${WHITE} 🐇 RED_BUNNY v2.0.0 | Installation Script ${RED}║
╚══════════════════════════════════════════════════════════════════════════════╝${NC}
"
echo -e "$BANNER"
# Detect OS
detect_os() {
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
if [[ -f /etc/os-release ]]; then
. /etc/os-release
echo "$ID"
else
echo "linux"
fi
elif [[ "$OSTYPE" == "darwin"* ]]; then
echo "macos"
elif [[ "$OSTYPE" == "msys" ]] || [[ "$OSTYPE" == "cygwin" ]] || [[ "$OSTYPE" == "win32" ]]; then
echo "windows"
else
echo "unknown"
fi
}
OS=$(detect_os)
echo -e "${BLUE}🔍 Detected OS: ${OS}${NC}"
# Check Python
check_python() {
if command -v python3 &>/dev/null; then
PYTHON_VER=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
echo -e "${GREEN}✅ Python $PYTHON_VER found${NC}"
return 0
else
echo -e "${RED}❌ Python3 not found${NC}"
return 1
fi
}
# Install system dependencies
install_system_deps() {
echo -e "${BLUE}📦 Installing system dependencies...${NC}"
case $OS in
ubuntu|debian|linuxmint)
sudo apt-get update
sudo apt-get install -y \
python3 python3-pip python3-dev python3-venv \
nmap nikto traceroute dnsutils \
git curl wget build-essential \
iptables net-tools \
chromium-browser \
sshpass \
libpcap-dev \
python3-gi \
libssl-dev
;;
fedora|centos|rhel)
sudo yum install -y \
python3 python3-pip python3-devel \
nmap nikto traceroute bind-utils \
git curl wget gcc \
iptables net-tools \
chromium \
sshpass \
libpcap-devel \
openssl-devel
;;
macos)
if ! command -v brew &>/dev/null; then
echo -e "${YELLOW}⚠️ Homebrew not found. Installing...${NC}"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
brew install \
python3 nmap nikto traceroute \
git curl wget \
chromium \
sshpass \
libpcap \
openssl
;;
windows)
echo -e "${YELLOW}⚠️ Windows detected. Installing with pip only...${NC}"
;;
*)
echo -e "${YELLOW}⚠️ Unknown OS. Installing with pip only...${NC}"
;;
esac
}
# Create virtual environment
setup_venv() {
echo -e "${BLUE}🔧 Creating virtual environment...${NC}"
if [ -d "venv" ]; then
echo -e "${YELLOW}⚠️ Existing venv found. Removing...${NC}"
rm -rf venv
fi
python3 -m venv venv
source venv/bin/activate
}
# Install Python packages
install_python_packages() {
echo -e "${BLUE}📦 Installing Python packages...${NC}"
pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
}
# Install optional tools
install_optional_tools() {
echo -e "${BLUE}🔧 Installing optional tools...${NC}"
# Signal CLI
if [[ "$OS" == "ubuntu" ]] || [[ "$OS" == "debian" ]]; then
echo -e "${YELLOW}📱 Signal CLI (optional)...${NC}"
# Signal-cli installation instructions
echo -e "${YELLOW} Visit: https://github.com/AsamK/signal-cli${NC}"
fi
# WhatsApp Web Driver
if [[ "$OS" == "linux" ]] || [[ "$OS" == "macos" ]]; then
echo -e "${GREEN}✅ Chrome driver will be auto-installed${NC}"
fi
}
# Create configuration
create_config() {
echo -e "${BLUE}⚙️ Creating configuration...${NC}"
mkdir -p .red_bunny
if [ ! -f ".red_bunny/config.json" ]; then
cat > .red_bunny/config.json << 'EOF'
{
"monitoring": {"enabled": true, "port_scan_threshold": 10},
"scanning": {"default_ports": "1-1000", "timeout": 30},
"security": {"auto_block": false, "log_level": "INFO"},
"nikto": {"enabled": true, "timeout": 300},
"traffic_generation": {"enabled": true, "max_duration": 300, "allow_floods": false},
"social_engineering": {"enabled": true, "default_port": 8080, "capture_credentials": true},
"ssh": {"enabled": true, "default_timeout": 30, "max_connections": 5},
"discord": {"enabled": false, "token": "", "prefix": "!"},
"telegram": {"enabled": false, "api_id": "", "api_hash": "", "bot_token": ""},
"slack": {"enabled": false, "bot_token": "", "channel_id": "", "prefix": "!"},
"whatsapp": {"enabled": false, "phone_number": "", "prefix": "/"},
"imessage": {"enabled": false, "phone_numbers": [], "prefix": "!"},
"signal": {"enabled": false, "webhook_url": "", "prefix": "!"},
"web": {"enabled": true, "port": 8080},
"phishing": {"default_port": 8080, "capture_credentials": true},
"red_bunny": {"theme": "red", "version": "2.0.0"}
}
EOF
echo -e "${GREEN}✅ Config created at .red_bunny/config.json${NC}"
fi
}
# Create launcher script
create_launcher() {
echo -e "${BLUE}🚀 Creating launcher...${NC}"
cat > redbunny << 'EOF'
#!/bin/bash
source venv/bin/activate
python3 red_bunny.py "$@"
EOF
chmod +x redbunny
}
# Main installation
main() {
echo -e "${BLUE}🚀 Starting RedBunny installation...${NC}"
# Check Python
if ! check_python; then
echo -e "${RED}❌ Python3 is required. Please install Python 3.8+${NC}"
exit 1
fi
# Install system dependencies
install_system_deps
# Setup virtual environment
setup_venv
# Install Python packages
install_python_packages
# Install optional tools
install_optional_tools
# Create configuration
create_config
# Create launcher
create_launcher
echo -e "\n${GREEN}╔══════════════════════════════════════════════════════════════════════════════╗"
echo -e "║${WHITE} 🐇 RED_BUNNY v2.0.0 | Installation Complete! ${GREEN}║"
echo -e "╚══════════════════════════════════════════════════════════════════════════════╝${NC}"
echo -e "\n${WHITE}🎯 To run RedBunny:${NC}"
echo -e " ${GREEN}./redbunny${NC}"
echo -e " or"
echo -e " ${GREEN}source venv/bin/activate && python3 red_bunny.py${NC}"
echo -e "\n${WHITE}📁 Configuration: .red_bunny/config.json${NC}"
echo -e "${WHITE}📊 Logs: .red_bunny/red_bunny.log${NC}"
echo -e "${WHITE}💾 Database: .red_bunny/red_bunny.db${NC}"
echo -e "\n${YELLOW}💡 First run: ./redbunny${NC}"
}
main