I have been looking for a batch file to filter some websites on my kid's computer.
I know that I have access to parental filters and other software pieces, but I would rather filter certain sites via the hosts file.
This is what I have found so far, and I only modified the sites to be redirected to the Local Host.
I want to make it edit the hosts file and not replace it. Can anyone help?
BTW I did not write this, but I found so many that I can't remember which site it got this one from.
I know that I have access to parental filters and other software pieces, but I would rather filter certain sites via the hosts file.
This is what I have found so far, and I only modified the sites to be redirected to the Local Host.
I want to make it edit the hosts file and not replace it. Can anyone help?
BTW I did not write this, but I found so many that I can't remember which site it got this one from.
Quote:
@ECHO OFF IF "%OS%"=="Windows_NT" ( SET HOSTFILE=%windir%\system32\drivers\etc\hosts ) ELSE ( SET HOSTFILE=%windir%\hosts ) ECHO.>> %HOSTFILE% ECHO 127.0.0.1 youtube.com>> %HOSTFILE% ECHO 127.0.0.1 www.youtube.com>> %HOSTFILE% ECHO 127.0.0.1 moviestarplanet.com>> %HOSTFILE% ECHO 127.0.0.1 www.moviestarplanet.com>> %HOSTFILE% ECHO 127.0.0.1 vevo.com>> %HOSTFILE% ECHO 127.0.0.1 www.vevo.com>> %HOSTFILE% ECHO 127.0.0.1 totaljerkface.com>> %HOSTFILE% ECHO 127.0.0.1 www.totaljerkface.com>> %HOSTFILE% ECHO 127.0.0.1 mp3bear.com>> %HOSTFILE% ECHO 127.0.0.1 www.mp3bear.com>> %HOSTFILE% ECHO 127.0.0.1 mp3skull.com>> %HOSTFILE% ECHO 127.0.0.1 www.mp3skull.com>> %HOSTFILE% ECHO 127.0.0.1 mp3cities.com>> %HOSTFILE% ECHO 127.0.0.1 www.mp3cities.com>> %HOSTFILE% ECHO 127.0.0.1 bearshare.com>> %HOSTFILE% ECHO 127.0.0.1 www.bearshare.com>> %HOSTFILE% ECHO 127.0.0.1 roblox.com>> %HOSTFILE% ECHO 127.0.0.1 www.roblox.com>> %HOSTFILE% ECHO 127.0.0.1 twitter.com>> %HOSTFILE% ECHO 127.0.0.1 www.twitter.com>> %HOSTFILE% ECHO 127.0.0.1 facebook.com>> %HOSTFILE% ECHO 127.0.0.1 www.facebook.com>> %HOSTFILE% ECHO 127.0.0.1 instagram.com>> %HOSTFILE% ECHO 127.0.0.1 www.instagram.com>> %HOSTFILE% ECHO 127.0.0.1 veoh.com>> %HOSTFILE% ECHO 127.0.0.1 www.veoh.com>> %HOSTFILE% ECHO 127.0.0.1 pandora.com>> %HOSTFILE% ECHO 127.0.0.1 www.pandora.com>> %HOSTFILE% ECHO 127.0.0.1 grooveshark.com>> %HOSTFILE% ECHO 127.0.0.1 www.grooveshark.com>> %HOSTFILE% ECHO 127.0.0.1 slacker.com>> %HOSTFILE% ECHO 127.0.0.1 www.slacker.com>> %HOSTFILE% ECHO 127.0.0.1 kongregate.com>> %HOSTFILE% ECHO 127.0.0.1 www.kongregate.com>> %HOSTFILE% ECHO. @echo off exit |