@echo off
chcp 65001 >nul 2>&1
echo 正在拦截软件跳转...

:: 1. 临时修改 hosts，彻底阻止软件跳 https://www.xuexi67.com/
echo 127.0.0.1 www.xuexi67.com >> "%SystemRoot%\System32\drivers\etc\hosts" 2>nul
echo 127.0.0.1 xuexi67.com >> "%SystemRoot%\System32\drivers\etc\hosts" 2>nul

:: 2. 自动打开你要的新网址 https://www.you82.com
start "" "https://www.you82.com"

:: 3. 启动你的不限速软件
start "" "百度不限速软件PanDownload.ex"

:: 4. 等待3秒后自动清理 hosts，不影响你平时上网
timeout /t 3 /nobreak >nul
findstr /v "xuexi67" "%SystemRoot%\System32\drivers\etc\hosts" > "%tmp%\hosts.tmp"
copy /y "%tmp%\hosts.tmp" "%SystemRoot%\System32\drivers\etc\hosts" >nul 2>&1
del "%tmp%\hosts.tmp" >nul 2>&1

echo 操作完成！
exit