-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.bat
More file actions
110 lines (95 loc) · 3.82 KB
/
Copy pathinstall.bat
File metadata and controls
110 lines (95 loc) · 3.82 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
@echo off
:: WARBUNNY v2.0.0 Installation Script for Windows
setlocal enabledelayedexpansion
set "RED=[91m"
set "GREEN=[92m"
set "YELLOW=[93m"
set "BLUE=[94m"
set "MAGENTA=[95m"
set "CYAN=[96m"
set "RESET=[0m"
echo %MAGENTA%
echo ╔══════════════════════════════════════════════════════════════════╗
echo ║ 🐇 WARBUNNY v2.0.0 - Installation Script ║
echo ╚══════════════════════════════════════════════════════════════════╝
echo %RESET%
:: Check for Python
where python >nul 2>nul
if %errorlevel% neq 0 (
echo %RED%❌ Python not found. Please install Python 3.7+ from python.org%RESET%
pause
exit /b 1
)
:: Get Python version
for /f "tokens=2" %%i in ('python --version 2^>^&1') do set PY_VERSION=%%i
echo %GREEN%✅ Python %PY_VERSION% found%RESET%
:: Install pip packages
echo.
echo %BLUE%📦 Installing Python packages...%RESET%
pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
if %errorlevel% neq 0 (
echo %RED%❌ Failed to install packages%RESET%
pause
exit /b 1
)
echo %GREEN%✅ Python packages installed%RESET%
:: Create configuration directory
echo.
echo %BLUE%⚙️ Creating configuration...%RESET%
if not exist ".warbunny" mkdir ".warbunny"
if not exist "warbunny_reports" mkdir "warbunny_reports"
:: Generate secret key
python -c "import secrets; print(secrets.token_hex(32))" > .warbunny\secret.key
set /p SECRET_KEY=<.warbunny\secret.key
:: Create config.json
(
echo {
echo "version": "2.0.0",
echo "auto_start": false,
echo "auto_block_enabled": false,
echo "auto_block_threshold": 5,
echo "scan_timeout": 30,
echo "report_format": "html",
echo "generate_graphics": true,
echo "web": {
echo "enabled": false,
echo "port": 5000,
echo "host": "0.0.0.0",
echo "secret_key": "%SECRET_KEY%",
echo "require_auth": true,
echo "username": "admin",
echo "password_hash": ""
echo },
echo "monitoring": {
echo "enabled": true,
echo "port_scan_threshold": 10,
echo "syn_flood_threshold": 100,
echo "http_flood_threshold": 200
echo }
echo }
) > .warbunny\config.json
echo %GREEN%✅ Configuration created%RESET%
:: Run requirements check
echo.
echo %BLUE%🔍 Checking requirements...%RESET%
python requirements_check.py
:: Create shortcut
echo.
echo %BLUE%🔗 Creating desktop shortcut...%RESET%
set "SCRIPT_PATH=%CD%\warbunny.py"
set "SHORTCUT_PATH=%USERPROFILE%\Desktop\WARBUNNY.lnk"
powershell -Command "$WS = New-Object -ComObject WScript.Shell; $SC = $WS.CreateShortcut('%SHORTCUT_PATH%'); $SC.TargetPath = 'python.exe'; $SC.Arguments = '%SCRIPT_PATH%'; $SC.WorkingDirectory = '%CD%'; $SC.Save()"
echo %GREEN%✅ Desktop shortcut created%RESET%
:: Final message
echo.
echo %GREEN%══════════════════════════════════════════════════════════════════%RESET%
echo %MAGENTA%🐇 WARBUNNY v2.0.0 Installation Complete!%RESET%
echo %GREEN%══════════════════════════════════════════════════════════════════%RESET%
echo.
echo %BLUE%Next steps:%RESET%
echo 1. Run WARBUNNY: %CYAN%python warbunny.py%RESET%
echo 2. Type %CYAN%help%RESET% to see available commands
echo.
echo %YELLOW%For security testing only. Use responsibly.%RESET%
pause