zapret-discord-youtube/service_discord_youtube.bat
Shurik24 fd12bde277 Requested changes
Fixed Cyrillic search in the path
2024-10-09 13:24:22 +02:00

60 lines
2.6 KiB
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
chcp 65001 >nul
:: 65001 - UTF-8
:: Path check
set scriptPath=%~dp0
set "path_no_spaces=%scriptPath: =%"
if not "%scriptPath%"=="%path_no_spaces%" (
echo Путь содержит пробелы.
echo Пожалуйста, переместите скрипт в директорию без пробелов.
pause
exit /b
)
:: Cyrillic check
setlocal enabledelayedexpansion
set "cyrillic_found=0"
for /l %%i in (0,1,127) do (
set "char=!scriptPath:~%%i,1!"
for %%c in (А Б В Г Д Е Ё Ж З И Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Ъ Ы Ь Э Ю Я а б в г д е ё ж з и й к л м н о п р с т у ф х ц ч ш щ ъ ы ь э ю я) do (
if "!char!"=="%%c" set "cyrillic_found=1"
)
)
:: This is only way what i found to check if cyrillic character is in string
:: If you know better way, please let me know
if %cyrillic_found% equ 1 (
echo Путь содержит кириллицу.
echo Пожалуйста, переместите скрипт в директорию без кириллических символов.
echo Кириллица - Русский алфавит.
pause
exit /b
)
:: Admin rights check
net session >nul 2>&1
if %errorLevel% neq 0 (
echo Скрипт запущен без прав администратора.
echo Запустите от имени администратора.
pause
exit /b
)
set ARGS=--wf-tcp=443-65535 --wf-udp=443-65535 ^
--wf-tcp=80,443,50000-65535 --wf-udp=443,50000-65535 ^
--filter-udp=443 --hostlist=\"%~dp0list-general.txt\" --dpi-desync=fake --dpi-desync-udplen-increment=10 --dpi-desync-repeats=6 --dpi-desync-udplen-pattern=0xDEADBEEF --dpi-desync-fake-quic=\"%~dp0quic_initial_www_google_com.bin\" --new ^
--filter-udp=50000-65535 --dpi-desync=fake,tamper --dpi-desync-any-protocol --dpi-desync-fake-quic=\"%~dp0quic_initial_www_google_com.bin\" --new ^
--filter-tcp=80 --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^
--filter-tcp=443 --hostlist=\"%~dp0list-general.txt\" --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --dpi-desync-fake-tls=\"%~dp0tls_clienthello_www_google_com.bin\" --new ^
--dpi-desync=fake,disorder2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig
set SRVCNAME=zapret
net stop "%SRVCNAME%"
sc delete "%SRVCNAME%"
sc create "%SRVCNAME%" binPath= "%~dp0winws.exe %ARGS%" DisplayName= "zapret DPI bypass : winws1" start= auto
sc description "%SRVCNAME%" "zapret DPI bypass software"
sc start "%SRVCNAME%"
pause