Last active
December 15, 2015 01:29
-
-
Save Domon/5180629 to your computer and use it in GitHub Desktop.
Blocking ETtoday and NOWnews in hosts file on Windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
title Blocking ETtoday and NOWnews in hosts file | |
:q1 | |
set /P choice="Would you like to block ETtoday? (y/n)" | |
if "%choice%" == "y" goto ettoday | |
if "%choice%" == "n" goto q2 | |
goto q1 | |
:ettoday | |
echo 127.0.0.1 www.ettoday.net>> %WinDir%\system32\drivers\etc\hosts | |
:q2 | |
set /P choice="Would you like to block NOWnews? (y/n)" | |
if "%choice%" == "y" goto nownews | |
if "%choice%" == "n" goto flushdns | |
:nownews | |
echo 127.0.0.1 www.nownews.com>> %WinDir%\system32\drivers\etc\hosts | |
:flushdns | |
echo Flushing DNS... | |
ipconfig /flushdns > NUL | |
pause | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment