Full Code :
ImportsSystem.IOPublicClassForm1DimpathAsStringDimswAsStreamWriterPrivateSubButton1_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesButton1.Clickpath ="C:\Windows\System32\drivers\etc\hosts"sw =NewStreamWriter(path,True)DimsitetoblockAsString= (Environment.NewLine &"127.0.0.1 "& TextBox1.Text)sw.Write(sitetoblock)sw.Close()MessageBox.Show("Website Blocked")EndSubEndClass

Post a Comment
Note: Only a member of this blog may post a comment.