From 586aeca80c0d5182048176281a0665c8d480cffd Mon Sep 17 00:00:00 2001 From: Flowseal Date: Tue, 9 Sep 2025 17:15:41 +0300 Subject: [PATCH] Timestamps enable implementation --- service.bat | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/service.bat b/service.bat index 0194d20..e3d0b2f 100644 --- a/service.bat +++ b/service.bat @@ -4,6 +4,7 @@ set "LOCAL_VERSION=1.8.3" :: External commands if "%~1"=="status_zapret" ( call :test_service zapret soft + call :tcp_enable exit /b ) @@ -63,6 +64,12 @@ if "%menu_choice%"=="0" exit /b goto menu +:: TCP ENABLE ========================== +:tcp_enable +netsh interface tcp show global | findstr /i "timestamps" | findstr /i "enabled" > nul || netsh interface tcp set global timestamps=enabled > nul 2>&1 +exit /b + + :: STATUS ============================== :service_status cls @@ -260,6 +267,8 @@ for /f "tokens=*" %%a in ('type "!selectedFile!"') do ( ) :: Creating service with parsed args +call :tcp_enable + set ARGS=%args% echo Final args: !ARGS! set SRVCNAME=zapret @@ -342,6 +351,21 @@ if !errorlevel!==0 ( ) echo: +:: TCP timestamps check +netsh interface tcp show global | findstr /i "timestamps" | findstr /i "enabled" > nul +if !errorlevel!==0 ( + call :PrintGreen "TCP timestamps check passed" +) else ( + call :PrintYellow "[?] TCP timestamps are disabled. Enabling timestamps..." + netsh interface tcp set global timestamps=enabled > nul 2>&1 + if !errorlevel!==0 ( + call :PrintGreen "TCP timestamps successfully enabled" + ) else ( + call :PrintRed "[X] Failed to enable TCP timestamps" + ) +) +echo: + :: AdguardSvc.exe tasklist /FI "IMAGENAME eq AdguardSvc.exe" | find /I "AdguardSvc.exe" > nul if !errorlevel!==0 (