Easeus Hosts Blocker.bat Review

:menu cls echo ============================================== echo EaseUS Hosts Blocker v1.0 echo ============================================== echo. echo [1] Block a Website echo [2] Unblock a Website echo [3] Show Currently Blocked Sites echo [4] Restore Default Hosts File (Clean All) echo [5] Exit echo. set /p choice="Enter your choice (1-5): "

echo. echo [SUCCESS] Hosts file restored to default. ipconfig /flushdns >nul pause goto menu easeus hosts blocker.bat

:: Create a temporary file without the line findstr /v /i /c:"%loopback% %site%" "%hosts%" > "%temp%\hosts.tmp" copy "%temp%\hosts.tmp" "%hosts%" >nul del "%temp%\hosts.tmp" echo [SUCCESS] Hosts file restored to default

Save the code below as and Run as Administrator . echo [SUCCESS] %site% has been unblocked (if it was blocked)

echo. echo [SUCCESS] %site% has been unblocked (if it was blocked). echo [INFO] Flushing DNS cache... ipconfig /flushdns >nul pause goto menu

:: Add to hosts file echo %loopback% %site% >> "%hosts%" echo. echo [SUCCESS] %site% has been blocked. echo [INFO] Flushing DNS cache... ipconfig /flushdns >nul pause goto menu

:: Create a clean default hosts file ( echo # Copyright (c) 1993-2009 Microsoft Corp. echo # echo # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. echo # echo # This file contains the mappings of IP addresses to host names. Each echo # entry should be kept on an individual line. The IP address should echo # be placed in the first column followed by the corresponding host name. echo # The IP address and the host name should be separated by at least one echo # space. echo # echo # Additionally, comments (such as these) may be inserted on individual echo # lines or following the machine name denoted by a '#' symbol. echo # echo # For example: echo # echo # 102.54.94.97 rhino.acme.com # source server echo # 38.25.63.10 x.acme.com # x client host echo # echo # localhost name resolution is handled within DNS itself. echo # 127.0.0.1 localhost echo # ::1 localhost echo 127.0.0.1 localhost echo ::1 localhost ) > "%hosts%"