v2.3
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
@echo off
|
||||
REM ============================================================
|
||||
REM Build AuditTool.exe for Windows Server 2012+
|
||||
REM Requires: Python 3.8+, pip
|
||||
REM ============================================================
|
||||
|
||||
echo [1/3] Installing dependencies...
|
||||
python -m pip install pycryptodome colorama unidecode pyinstaller
|
||||
if %errorlevel% neq 0 (
|
||||
echo ERROR: pip install failed. Check Python installation.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo [2/3] Copying PowerShell audit script...
|
||||
copy /Y ..\audit_check_script\audit_cis_windows.ps1 audit_cis_windows.ps1
|
||||
if %errorlevel% neq 0 (
|
||||
echo ERROR: audit_cis_windows.ps1 not found at ..\audit_check_script\
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo [3/3] Building AuditTool.exe with PyInstaller...
|
||||
python -m PyInstaller --onefile --console --name AuditTool ^
|
||||
--add-data "audit_cis_windows.ps1;." ^
|
||||
--hidden-import Crypto.Cipher ^
|
||||
--hidden-import Crypto.PublicKey ^
|
||||
--hidden-import Crypto.Util.Padding ^
|
||||
windows_audit.py
|
||||
|
||||
if %errorlevel% neq 0 (
|
||||
echo ERROR: PyInstaller build failed
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo.
|
||||
echo ========================================
|
||||
echo Build complete!
|
||||
echo Output: dist\AuditTool.exe
|
||||
echo.
|
||||
echo Deploy to Windows Server:
|
||||
echo 1. Copy dist\AuditTool.exe to target server
|
||||
echo 2. Copy keys\public_key.pem to same folder as AuditTool.exe
|
||||
echo 3. Run: AuditTool.exe
|
||||
echo ========================================
|
||||
|
||||
pause
|
||||
Reference in New Issue
Block a user