1、关键字长度限制过滤 修改为 连续的字符文本满足条件才算。中间有符号、空格、表情、控制字符等间隔的都不算
This commit is contained in:
@ -16,7 +16,8 @@ Public Class Form1
|
|||||||
Dim 全局变量_BIOS识别码 As String = ""
|
Dim 全局变量_BIOS识别码 As String = ""
|
||||||
Dim 全局变量_异常密码 As String = "009988"
|
Dim 全局变量_异常密码 As String = "009988"
|
||||||
'api接口地址 '
|
'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 全局变量_id As String = ""
|
||||||
Dim 全局变量_心跳时间 As String = ""
|
Dim 全局变量_心跳时间 As String = ""
|
||||||
Dim 全局变量_关键字心跳时间 As String = ""
|
Dim 全局变量_关键字心跳时间 As String = ""
|
||||||
@ -1702,8 +1703,6 @@ Public Class Form1
|
|||||||
'保存到文件'
|
'保存到文件'
|
||||||
Await SaveFile("keywords", {content})
|
Await SaveFile("keywords", {content})
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
|
||||||
End Try
|
End Try
|
||||||
@ -1738,10 +1737,10 @@ Public Class Form1
|
|||||||
req.type = 1
|
req.type = 1
|
||||||
req.content = content
|
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})
|
Await SaveKeywordLog({req})
|
||||||
Exit For
|
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)
|
全局变量_采集的文本.Add(req)
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|||||||
@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
'通过使用 "*",如下所示:
|
'通过使用 "*",如下所示:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("1.0.0.4")>
|
<Assembly: AssemblyVersion("1.0.0.5")>
|
||||||
<Assembly: AssemblyFileVersion("1.0.0.4")>
|
<Assembly: AssemblyFileVersion("1.0.0.5")>
|
||||||
|
|||||||
@ -128,6 +128,7 @@
|
|||||||
<Compile Include="service\FileService.vb" />
|
<Compile Include="service\FileService.vb" />
|
||||||
<Compile Include="service\Logger.vb" />
|
<Compile Include="service\Logger.vb" />
|
||||||
<Compile Include="service\StringEncryption.vb" />
|
<Compile Include="service\StringEncryption.vb" />
|
||||||
|
<Compile Include="service\StringHelper.vb" />
|
||||||
<Compile Include="service\Updater.vb" />
|
<Compile Include="service\Updater.vb" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
9
Yjpp36/service/StringHelper.vb
Normal file
9
Yjpp36/service/StringHelper.vb
Normal file
@ -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
|
||||||
Reference in New Issue
Block a user