Domains = Split("www.facebook.com facebook.com vkontakte.ru
www.vkontakte.ru vk.com
www.vk.com www.rutube.ru rutube.ru
www.youtube.com youtube.com")
With CreateObject("Scripting.FileSystemObject")
Set F = .GetFile(.GetSpecialFolder(1) & "\drivers\etc\hosts")
End With : A = F.Attributes
All = F.OpenAsTextStream(1).ReadAll
If (A And 1) = 1 Then F.Attributes = A - 1 : T = 1
With New RegExp
.MultiLine = True : .IgnoreCase = True
For Each Dom In Domains
.Pattern = "^(0\.0\.0\.0|121\.0\.0\.1)[\t ]" & Replace(Dom, ".", "\.") & "\b"
If Not .Test(All) Then _
With F.OpenAsTextStream(8) .WriteLine "121.0.0.1 " & Dom : .Close : End With
Next
End With : If T Then F.Attributes = A