Files
emby-proxy-helper/shell/win.cmd
2026-04-05 18:07:31 +03:00

142 lines
3.9 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.
chcp 65001 >nul
@echo off
net session >nul 2>&1
if %errorlevel% neq 0 (
powershell -NoProfile -ExecutionPolicy Bypass -Command "Start-Process -FilePath '%~f0' -Verb RunAs"
exit /b
)
cls
set "RED=[31m"
set "GREEN=[32m"
set "YELLOW=[33m"
set "CYAN=[36m"
set "RESET=[0m"
for /F "delims=" %%e in ('echo prompt $E^| cmd') do set "ESC=%%e"
echo %ESC%%CYAN%
echo -----------------------------------------------------------
echo ^| ^|
echo ^| Emby Unlocker for Lifetime Premiere ^|
echo ^| https://github.com/arg0WAK ^|
echo ^| ^|
echo -----------------------------------------------------------
echo %ESC%%RESET%
echo %ESC%%YELLOW%[ℹ ]%ESC%%RESET% Checking for administrative privileges...
net session >nul 2>&1
if %errorlevel% neq 0 (
echo %ESC%%RED%[✖ ]%ESC%%RESET% This script must be run as Administrator!
pause
exit /b
) else (
echo %ESC%%GREEN%[✔ ]%ESC%%RESET% Admin privileges confirmed.
)
set HOST_FILE=C:\Windows\System32\drivers\etc\hosts
for /f "tokens=2 delims=:" %%A in ('nslookup arg0.dev ^| find "Address"') do (
set IP_ARG0=%%A
)
set IP_ARG0=%IP_ARG0: =%
if "%IP_ARG0%"=="" (
echo %ESC%%RED%[✖ ]%ESC%%RESET% Failed to resolve fake validation server.
pause
exit /b
)
echo %ESC%%YELLOW%[ℹ ]%ESC%%RESET% Adding entry to %HOST_FILE%...
timeout /t 2 >nul
set PROXY=%IP_ARG0% mb3admin.com
findstr /C:"%PROXY%" %HOST_FILE% >nul
if %errorlevel% neq 0 (
echo %PROXY% >> %HOST_FILE%
echo %ESC%%GREEN%[✔ ]%ESC%%RESET% Entry successfully added: %PROXY%
) else (
echo %ESC%%CYAN%[✔ ]%ESC%%RESET% Entry already exists, skipping.
)
set CERT_URL=https://arg0.dev/emby/mb3admin.crt
set TEMP_CERT=%TEMP%\mb3admin.crt
echo %ESC%%YELLOW%[ℹ ]%ESC%%RESET% Downloading certificate...
timeout /t 2 >nul
pushd "%TEMP%" >nul
curl -L -O "%CERT_URL%" >nul 2>&1
set CURL_EXIT=%errorlevel%
popd >nul
if not exist "%TEMP_CERT%" (
echo %ESC%%YELLOW%[!]%ESC%%RESET% Download failed, trying local fallback...
if exist "%~dp0mb3admin.crt" (
copy "%~dp0mb3admin.crt" "%TEMP_CERT%" >nul
echo %ESC%%GREEN%[✔ ]%ESC%%RESET% Local certificate used.
) else (
echo %ESC%%RED%[✖ ]%ESC%%RESET% Certificate not found.
pause
exit /b
)
) else (
echo %ESC%%GREEN%[✔ ]%ESC%%RESET% Certificate downloaded.
)
echo %ESC%%YELLOW%[ℹ ]%ESC%%RESET% Installing certificate...
timeout /t 2 >nul
certutil -addstore -f "Root" "%TEMP_CERT%" >nul 2>&1
if %errorlevel% neq 0 (
echo %ESC%%RED%[✖ ]%ESC%%RESET% Failed to install certificate.
pause
exit /b
) else (
echo %ESC%%GREEN%[✔ ]%ESC%%RESET% Certificate successfully added.
)
echo %ESC%%YELLOW%[ℹ ]%ESC%%RESET% Cleaning up...
timeout /t 2 >nul
del "%TEMP_CERT%" >nul
echo %ESC%%GREEN%[✔ ]%ESC%%RESET% Temporary file removed.
echo %ESC%%YELLOW%[ℹ ]%ESC%%RESET% Flushing DNS cache...
ipconfig /flushdns >nul
echo %ESC%%YELLOW%[ℹ ]%ESC%%RESET% Testing network connectivity...
timeout /t 5 >nul
ping -n 1 mb3admin.com >nul
if %errorlevel% neq 0 (
echo %ESC%%RED%[✖ ]%ESC%%RESET% Network test failed.
pause
exit /b
)
echo %ESC%%GREEN%[✔ ]%ESC%%RESET% Network OK.
timeout /t 2 >nul
cls
echo %ESC%%CYAN%
echo ---------------------------------------------------------------
echo ^| ^|
echo ^| Emby Premiere is now fully unlocked. ^|
echo ^| You can use any license key and enjoy all features! ^|
echo ^| ^|
echo ---------------------------------------------------------------
echo %ESC%%RESET%
echo %ESC%%YELLOW%[ℹ ]%ESC%%RESET% If you want to support, star the repo!
echo %ESC%%CYAN%[ℹ ]%ESC%%RESET% telegram: @arg0WAK
timeout /t 3 >nul
start https://github.com/arg0WAK