本帖最后由 WHY 于 2015-9-19 21:13 编辑
- @echo off & setlocal enabledelayedexpansion
- set "file=%systemroot%\system32\drivers\etc\hosts"
- for /f "tokens=2" %%i in ('more +11 "%~0"') do set #%%i=1
- for /f "delims=" %%i in ('findstr /n .* %file%') do (
- set "s=%%i"
- set "s=!s:*:=!"
- for /f "tokens=1,2" %%j in ("#!s!") do if not defined #%%k echo;!s!
- )
- more +11 "%~0"
- pause & exit
-
- 127.0.0.1 mcfg.sandai.net
- 127.0.0.1 211.94.190.80
- 127.0.0.1 advstat.xunlei.com
- 123.87.86.5 biz5.sandai.net
- 527.66.13.125 cknum.sandai.net
- 110.45.215.113 cl.kankan.xunlei.com
- 127.0.0.1 float.sandai.net
- 127.0.0.1 mcfg.sandai.net
- 180.70.134.154 mtips.xunlei.com
- 127.0.0.1 pubstat.sandai.net
- 216.58.221.74 recommend.xunlei.com
- 127.0.0.1 wy.xunlei.com
- 110.45.229.148 buy.safe.xunlei.com
复制代码
|