Vb.net 如何使用远程服务器永久阻止应用程序

Vb.net 如何使用远程服务器永久阻止应用程序,vb.net,Vb.net,我知道封锁系统,但这种方式不安全 Dim ws As New WebClient Dim str As String = ws.DownloadString("http://blocksys.com/Devil.txt") If str = "blocking" Then MessageBox.Show("This application has been blocked by administrator", "Applic

我知道封锁系统,但这种方式不安全

        Dim ws As New WebClient
        Dim str As String = ws.DownloadString("http://blocksys.com/Devil.txt")
        If str = "blocking" Then
            MessageBox.Show("This application has been blocked by administrator", "Application blocked", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Application.Exit()
        End If
    End If
这样就不安全了

请教我另一种方法

谢谢你

导入系统.Net
Imports System.Net
Public Class Form1
    Private url As String

    Private Function CheckSite(ByVal url As String) As String
        Dim Block As Boolean = False
        Dim blocklist As String = "blocksys.com,abc.com,domain.com,another.com"
        Dim myList As String() = blocklist.Split(New Char() {","c})
        For Each checkBlock As String In myList
            If url.IndexOf(checkBlock) <> -1 Then Block = True
        Next
        Return Block
    End Function

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        url = TextBox1.Text
        If CheckSite(url) = True Then
            MessageBox.Show("This application has been blocked by administrator", "Application blocked", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Exit Sub
        Else
            Dim ws As New WebClient
            ws.DownloadString(url)
            'Another process........
        End If
    End Sub
End Class
公开课表格1 作为字符串的私有url 私有函数CheckSite(ByVal url作为字符串)作为字符串 将块变暗为布尔值=False Dim blocklist As String=“blocksys.com、abc.com、domain.com、other.com” Dim myList As String()=blocklist.Split(新字符(){”,“c}) 将每个复选框作为myList中的字符串 如果url.IndexOf(checkBlock)-1,则Block=True 下一个 返回块 端函数 私有子按钮1\u单击(发送者作为对象,e作为事件参数)处理按钮1。单击 url=TextBox1.Text 如果CheckSite(url)=True,则 MessageBox.Show(“此应用程序已被管理员阻止”,“应用程序被阻止”,MessageBoxButtons.OK,MessageBoxIcon.Error) 出口接头 其他的 Dim ws作为新的WebClient ws.DownloadString(url) “另一个过程……”。。。。。。。。 如果结束 端接头 末级

添加文本框&点击表单并测试它

请解释你所说的“阻止”、“安全”、“永久”和“远程”是什么意思。你想要的可能是重复的吗?是否按域或域/页阻止?