:: by 小樓一夜聽春雨
:loop
setlocal EnableDelayedExpansion
set wjm=C:\WINDOWS\system
set
set
set
cls&%xsxx%
echo\&echo 以下是已經被屏蔽的網址&echo ======================&echo\
for /f
if
if !xs! geq
set /a num+=
set !num!=%%b&echo ^(!num!^) %%b
)
set no=%%a %%b
)
echo\
if
echo =====================&echo\&echo\&echo\&echo\)
if defined pinbi goto jiec
if defined pinbi
echo\&echo 請選擇
set /p xuan=請選擇 [
if
if
cls&%xsxx%
echo\&echo 請輸入需要
echo\&echo 或 先在
echo\&echo 再在這裡輸入
echo\&echo 按
set /p wdm=請輸入文檔名或網址
if
if not exist %wdm% set wdm=
for /f
color cf&echo !str!%%a>>%wjm%\hosts
)
cls&echo\&echo 屏蔽成功
endlocal&set pinbi=
goto loop
:jiec
echo\&echo 輸入已經屏蔽的網址前面的序號
echo\&echo 解除屏蔽
echo\&echo 按
set /p wz=請輸入序號
if not defined wz exit
:quan
cd
color
if defined pinbi
for /f
set pin=
for %%i in (%wz%) do if
if not defined pin echo %%a>>%wjm%\hosts
)
del/q %wjm%\hosts
ren %wjm%\hosts
del/q %wjm%\hosts
cls&echo\&echo 解除屏蔽成功
endlocal&set pinbi=&set pinbi
goto loop
From:http://tw.wingwit.com/Article/program/qrs/201404/30409.html