Easeus Hosts Blocker.bat !free! Online

:block cls echo ---------------------------------------------- echo Block a Website echo ---------------------------------------------- echo. set /p site="Enter website URL to block (e.g., www.facebook.com): " if "%site%"=="" ( echo No website entered. pause goto menu )

:restore cls echo ---------------------------------------------- echo Restore Default Hosts File echo ---------------------------------------------- echo. echo WARNING: This will remove ALL custom entries. echo. set /p confirm="Are you sure? Type YES to continue: " if /i not "%confirm%"=="YES" ( echo Operation cancelled. pause goto menu ) easeus hosts blocker.bat

:: 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 echo WARNING: This will remove ALL custom entries

Save the code below as and Run as Administrator . Type YES to continue: " if /i not

:: Define hosts file path set hosts=%windir%\System32\drivers\etc\hosts set loopback=127.0.0.1

:: 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"