@璐村惂鐢ㄦ埛_000076K馃惥 OFF
TITLE %~n0
IF NOT "%1" == "/s" MSHTA vbscript:createobject("shell.application").shellexecute("%~0","/s","","runas",1)(window.close)&GOTO :eof
set hostsfile=%SYSTEMRoot%\system32\drivers\etc\hosts
IF NOT EXIST %hostsfile% CD.>%hostsfile%
ECHO Stop DNS Client Server...
NET STOP "Dnscache"
ECHO Start DNS Client Server...
NET START "Dnscache"
ECHO Flush Dns Cache...
IPCONFIG /flushdns
ECHO Write Hosts Data...
FIND "182.22.16.251" %hostsfile% >nul && (ECHO EXIST. &GOTO :end)
:loop
COPY /y %hostsfile% %hostsfile%.%date:~2,2%%date:~5,2%%date:~8,2%.bak > nul
(ECHO #yahoo.co.jp
ECHO 182.22.16.251 search.yahoo.co.jp
ECHO 183.79.249.124 extsearch.yahoo.co.jp
ECHO #yahoo.co.jp
)>> %hostsfile%
FIND "182.22.16.251" %hostsfile% >nul && GOTO :end || GOTO :loop
:end
ECHO Finished.
TIMEOUT /t 3 /nobreak
GOTO :eof
TITLE %~n0
IF NOT "%1" == "/s" MSHTA vbscript:createobject("shell.application").shellexecute("%~0","/s","","runas",1)(window.close)&GOTO :eof
set hostsfile=%SYSTEMRoot%\system32\drivers\etc\hosts
IF NOT EXIST %hostsfile% CD.>%hostsfile%
ECHO Stop DNS Client Server...
NET STOP "Dnscache"
ECHO Start DNS Client Server...
NET START "Dnscache"
ECHO Flush Dns Cache...
IPCONFIG /flushdns
ECHO Write Hosts Data...
FIND "182.22.16.251" %hostsfile% >nul && (ECHO EXIST. &GOTO :end)
:loop
COPY /y %hostsfile% %hostsfile%.%date:~2,2%%date:~5,2%%date:~8,2%.bak > nul
(ECHO #yahoo.co.jp
ECHO 182.22.16.251 search.yahoo.co.jp
ECHO 183.79.249.124 extsearch.yahoo.co.jp
ECHO #yahoo.co.jp
)>> %hostsfile%
FIND "182.22.16.251" %hostsfile% >nul && GOTO :end || GOTO :loop
:end
ECHO Finished.
TIMEOUT /t 3 /nobreak
GOTO :eof