-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
64 lines (58 loc) · 1.95 KB
/
build.bat
File metadata and controls
64 lines (58 loc) · 1.95 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
@echo off
REM GhostSecure 2.1 - Build Script - Coded by Egyan
echo.
echo ================================================================
echo GhostSecure 2.1 - Build .exe
echo ================================================================
echo.
python --version >nul 2>&1
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] Python not found. Install Python 3.8+
pause & exit /b 1
)
echo [1] Installing deps ...
pip install pywin32 ldap3 pyinstaller >nul 2>&1
python -m pywin32_postinstall -install >nul 2>&1
echo [2] Self-test ...
python main.py --test
echo.
echo [3] Building with PyInstaller ...
pyinstaller --onefile --name GhostSecure2 ^
--hidden-import win32timezone ^
--hidden-import win32serviceutil ^
--hidden-import win32service ^
--hidden-import win32event ^
--hidden-import servicemanager ^
--hidden-import win32evtlog ^
--hidden-import win32con ^
--hidden-import ldap3 ^
--hidden-import config ^
--hidden-import core.alert_manager ^
--hidden-import core.event_reader ^
--hidden-import core.detector_engine ^
--hidden-import detectors.kerberoasting ^
--hidden-import detectors.pass_the_hash ^
--hidden-import detectors.dcsync ^
--hidden-import detectors.golden_ticket ^
--hidden-import detectors.ldap_recon ^
--hidden-import detectors.asrep_roasting ^
--hidden-import detectors.skeleton_key ^
--hidden-import utils.ad_helpers ^
--hidden-import utils.time_helpers ^
--hidden-import gui.status_dashboard ^
--add-data "config.py;." ^
--add-data "core;core" ^
--add-data "detectors;detectors" ^
--add-data "utils;utils" ^
--add-data "gui;gui" ^
--console main.py
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] Build failed.
pause & exit /b 1
)
echo.
echo ================================================================
echo Built: dist\GhostSecure2.exe
echo Run Install.bat to deploy as service.
echo ================================================================
pause