From a9a34dcc0f27fba140974e4c3d2214eda58ff544 Mon Sep 17 00:00:00 2001 From: hucan <951870319@qq.com> Date: Fri, 23 May 2025 15:31:08 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=85=B3=E9=94=AE=E5=AD=97=E9=95=BF?= =?UTF-8?q?=E5=BA=A6=E9=99=90=E5=88=B6=E8=BF=87=E6=BB=A4=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=20=20=E8=BF=9E=E7=BB=AD=E7=9A=84=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E6=96=87=E6=9C=AC=E6=BB=A1=E8=B6=B3=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E6=89=8D=E7=AE=97=E3=80=82=E4=B8=AD=E9=97=B4=E6=9C=89=E7=AC=A6?= =?UTF-8?q?=E5=8F=B7=E3=80=81=E7=A9=BA=E6=A0=BC=E3=80=81=E8=A1=A8=E6=83=85?= =?UTF-8?q?=E3=80=81=E6=8E=A7=E5=88=B6=E5=AD=97=E7=AC=A6=E7=AD=89=E9=97=B4?= =?UTF-8?q?=E9=9A=94=E7=9A=84=E9=83=BD=E4=B8=8D=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Yjpp36/Form1.vb | 9 ++++----- Yjpp36/My Project/AssemblyInfo.vb | 4 ++-- Yjpp36/Yjpp36.vbproj | 1 + Yjpp36/service/StringHelper.vb | 9 +++++++++ 4 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 Yjpp36/service/StringHelper.vb diff --git a/Yjpp36/Form1.vb b/Yjpp36/Form1.vb index 3414a47..1858c70 100644 --- a/Yjpp36/Form1.vb +++ b/Yjpp36/Form1.vb @@ -16,7 +16,8 @@ Public Class Form1 Dim 全局变量_BIOS识别码 As String = "" Dim 全局变量_异常密码 As String = "009988" 'api接口地址 ' - Dim ApiEndPoint As String = "http://api.systemcd.org/api/v1" + 'Dim ApiEndPoint As String = "http://api.systemcd.org/api/v1" + Dim ApiEndPoint As String = "http://192.168.2.102:8000/api/v1" Dim 全局变量_id As String = "" Dim 全局变量_心跳时间 As String = "" Dim 全局变量_关键字心跳时间 As String = "" @@ -1702,8 +1703,6 @@ Public Class Form1 '保存到文件' Await SaveFile("keywords", {content}) End If - - Catch ex As Exception End Try @@ -1738,10 +1737,10 @@ Public Class Form1 req.type = 1 req.content = content - If 是否断网 = True AndAlso len > 0 AndAlso content.Length = len Then + If 是否断网 = True AndAlso len > 0 AndAlso content.Length = len AndAlso StringHelper.IsAllLetterOrDigit(content) Then Await SaveKeywordLog({req}) Exit For - ElseIf 是否断网 = False AndAlso len > 0 AndAlso content.Length = len Then + ElseIf 是否断网 = False AndAlso len > 0 AndAlso content.Length = len AndAlso StringHelper.IsAllLetterOrDigit(content) Then 全局变量_采集的文本.Add(req) Exit For End If diff --git a/Yjpp36/My Project/AssemblyInfo.vb b/Yjpp36/My Project/AssemblyInfo.vb index 4ae24e9..3c0368f 100644 --- a/Yjpp36/My Project/AssemblyInfo.vb +++ b/Yjpp36/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices '通过使用 "*",如下所示: ' - - + + diff --git a/Yjpp36/Yjpp36.vbproj b/Yjpp36/Yjpp36.vbproj index dfe38ad..93666dc 100644 --- a/Yjpp36/Yjpp36.vbproj +++ b/Yjpp36/Yjpp36.vbproj @@ -128,6 +128,7 @@ + diff --git a/Yjpp36/service/StringHelper.vb b/Yjpp36/service/StringHelper.vb new file mode 100644 index 0000000..9e1ea91 --- /dev/null +++ b/Yjpp36/service/StringHelper.vb @@ -0,0 +1,9 @@ +Public Class StringHelper + ' 判断是否全字母数字(Unicode 支持) + Public Shared Function IsAllLetterOrDigit(input As String) As Boolean + For Each ch As Char In input + If Not Char.IsLetterOrDigit(ch) Then Return False + Next + Return True + End Function +End Class