My solution:
@echo off
takeown /f "%windir%\system32\drivers\etc\hosts" && icacls "%windir%\system32\drivers\etc\hosts" /grant administrators:F
attrib -s -h -r %windir%\system32\drivers\etc\hosts
ECHO 127.0.0.1 facebook.com>>%WINDIR%\System32\drivers\etc\hosts
ECHO 127.0.0.1 www.facebook.com>>%WINDIR%\System32\drivers\etc\hosts
ECHO 127.0.0.1 twitter.com>>%WINDIR%\System32\drivers\etc\hosts
ECHO 127.0.0.1 www.twitter.com>>%WINDIR%\System32\drivers\etc\hosts
ECHO 127.0.0.1 instagram.com>>%WINDIR%\System32\drivers\etc\hosts
ECHO 127.0.0.1 www.instagram.com>>%WINDIR%\System32\drivers\etc\hosts
attrib +s +h +r %windir%\system32\drivers\etc\hosts
pause
%windir%\notepad.exe %windir%\system32\drivers\etc\hosts
Sources:
https://www.vesic.org/blog/kako-blokirati-facebook-i-jos-ponesto-kontrola-pristupa-webu/
*
127.0.0.1 facebook.com
127.0.0.1 www.facebook.com
127.0.0.1 twitter.com
127.0.0.1 www.twitter.com
127.0.0.1 instagram.com
127.0.0.1 www.instagram.com
More info...
http://www.eureka-centar.hr/upisi/on-line-testiranje/engleski-jezik/3/
My ideas:
@echo off
takeown /f "%windir%\system32\drivers\etc\hosts" && icacls "%windir%\system32\drivers\etc\hosts" /grant administrators:F
attrib -s -h -r %windir%\system32\drivers\etc\hosts
%windir%\notepad.exe %windir%\system32\drivers\etc\hosts
127.0.0.1 facebook.com
127.0.0.1 www.facebook.com
127.0.0.1 twitter.com
127.0.0.1 www.twitter.com
127.0.0.1 instagram.com
127.0.0.1 www.instagram.com
@echo off
attrib -r -a -s -h C:\WINDOWS\System32\Drivers\etc\hosts 1>nul
C:\WINDOWS\System32\Drivers\etc\hosts >> echo 200.100.10.20 www.bogus.com
C:\WINDOWS\System32\Drivers\etc\hosts >> echo 200.100.10.22 www.fake.com
@echo off
SET NEWLINE=^& echo.
ECHO %NEWLINE%^ >>%WINDIR%\System32\drivers\etc\hosts
FIND /C /I "heracles.fila" %WINDIR%\system32\drivers\etc\hosts
IF %ERRORLEVEL% NEQ 0 ECHO %NEWLINE%^192.168.5.10 heracles.fila>>%WINDIR%\System32\drivers\etc\hosts
FIND /C /I "www.heracles.fila" %WINDIR%\system32\drivers\etc\hosts
IF %ERRORLEVEL% NEQ 0 ECHO %NEWLINE%^192.168.5.10 www.heracles.fila>>%WINDIR%\System32\drivers\etc\hosts
FIND /C /I "api.heracles.fila" %WINDIR%\system32\drivers\etc\hosts
IF %ERRORLEVEL% NEQ 0 ECHO %NEWLINE%^192.168.5.10 api.heracles.fila>>%WINDIR%\System32\drivers\etc\hosts
FIND /C /I "bracket.heracles.fila" %WINDIR%\system32\drivers\etc\hosts
IF %ERRORLEVEL% NEQ 0 ECHO %NEWLINE%^192.168.5.10 bracket.heracles.fila>>%WINDIR%\System32\drivers\etc\hosts
FIND /C /I "onvenue.heracles.fila" %WINDIR%\system32\drivers\etc\hosts
IF %ERRORLEVEL% NEQ 0 ECHO %NEWLINE%^192.168.5.10 bracket.heracles.onvenue>>%WINDIR%\System32\drivers\etc\hosts
@echo off
takeown /f "%windir%\system32\drivers\etc\hosts" && icacls "%windir%\system32\drivers\etc\hosts" /grant administrators:F
attrib -s -h -r %windir%\system32\drivers\etc\hosts
ECHO 127.0.0.1 facebook.com>>%WINDIR%\System32\drivers\etc\hosts
ECHO 127.0.0.1 www.facebook.com>>%WINDIR%\System32\drivers\etc\hosts
ECHO 127.0.0.1 twitter.com>>%WINDIR%\System32\drivers\etc\hosts
ECHO 127.0.0.1 www.twitter.com>>%WINDIR%\System32\drivers\etc\hosts
ECHO 127.0.0.1 instagram.com>>%WINDIR%\System32\drivers\etc\hosts
ECHO 127.0.0.1 www.instagram.com>>%WINDIR%\System32\drivers\etc\hosts
attrib +s +h +r %windir%\system32\drivers\etc\hosts
pause
%windir%\notepad.exe %windir%\system32\drivers\etc\hosts
Sources:
https://www.vesic.org/blog/kako-blokirati-facebook-i-jos-ponesto-kontrola-pristupa-webu/
@echo off takeown /f "%windir%\system32\drivers\etc\hosts" && icacls "%windir%\system32\drivers\etc\hosts" /grant administrators:F attrib -s -h -r %windir%\system32\drivers\etc\hosts %windir%\notepad.exe %windir%\system32\drivers\etc\hosts
*
127.0.0.1 facebook.com
127.0.0.1 www.facebook.com
127.0.0.1 twitter.com
127.0.0.1 www.twitter.com
127.0.0.1 instagram.com
127.0.0.1 www.instagram.com
More info...
http://www.eureka-centar.hr/upisi/on-line-testiranje/engleski-jezik/3/
My ideas:
@echo off
takeown /f "%windir%\system32\drivers\etc\hosts" && icacls "%windir%\system32\drivers\etc\hosts" /grant administrators:F
attrib -s -h -r %windir%\system32\drivers\etc\hosts
%windir%\notepad.exe %windir%\system32\drivers\etc\hosts
127.0.0.1 facebook.com
127.0.0.1 www.facebook.com
127.0.0.1 twitter.com
127.0.0.1 www.twitter.com
127.0.0.1 instagram.com
127.0.0.1 www.instagram.com
@echo off
attrib -r -a -s -h C:\WINDOWS\System32\Drivers\etc\hosts 1>nul
C:\WINDOWS\System32\Drivers\etc\hosts >> echo 200.100.10.20 www.bogus.com
C:\WINDOWS\System32\Drivers\etc\hosts >> echo 200.100.10.22 www.fake.com
@echo off
SET NEWLINE=^& echo.
ECHO %NEWLINE%^ >>%WINDIR%\System32\drivers\etc\hosts
FIND /C /I "heracles.fila" %WINDIR%\system32\drivers\etc\hosts
IF %ERRORLEVEL% NEQ 0 ECHO %NEWLINE%^192.168.5.10 heracles.fila>>%WINDIR%\System32\drivers\etc\hosts
FIND /C /I "www.heracles.fila" %WINDIR%\system32\drivers\etc\hosts
IF %ERRORLEVEL% NEQ 0 ECHO %NEWLINE%^192.168.5.10 www.heracles.fila>>%WINDIR%\System32\drivers\etc\hosts
FIND /C /I "api.heracles.fila" %WINDIR%\system32\drivers\etc\hosts
IF %ERRORLEVEL% NEQ 0 ECHO %NEWLINE%^192.168.5.10 api.heracles.fila>>%WINDIR%\System32\drivers\etc\hosts
FIND /C /I "bracket.heracles.fila" %WINDIR%\system32\drivers\etc\hosts
IF %ERRORLEVEL% NEQ 0 ECHO %NEWLINE%^192.168.5.10 bracket.heracles.fila>>%WINDIR%\System32\drivers\etc\hosts
FIND /C /I "onvenue.heracles.fila" %WINDIR%\system32\drivers\etc\hosts
IF %ERRORLEVEL% NEQ 0 ECHO %NEWLINE%^192.168.5.10 bracket.heracles.onvenue>>%WINDIR%\System32\drivers\etc\hosts
No comments:
Post a Comment
Beogradsko programiranje=