欢迎来到 嗅灵易学

零基础也能上手的脚本技术课,一对一答疑带你入门

答复

答复

VB版注册机代码:
Private Sub Form_Load()
   With Wsk(0)
      .Protocol = sckTCPProtocol
      .LocalPort = 8877
      .Listen
   End With
End Sub
Private Sub Wsk_ConnectionRequest(Index As Integer, ByVal requestID As Long)
   Dim lCount As Long
   Dim StrLog As String
   lCount = Wsk.UBound + 1
   Load Wsk(lCount)
   With Wsk(lCount)
      .Accept requestID
   End With
End Sub
Private Sub Wsk_DataArrival(Index As Integer, ByVal bytesTotal As Long)
   Dim StrValue As String
   With Wsk(Index)
      .GetData StrValue
      Debug.Print StrValue
      .SendData GetResult(StrValue)
   End With
End Sub
Function GetResult(pStr As String) As Byte()
   Dim i As Long
   Dim StrTmp() As String
   Dim lValue As Long
   Dim hV As Long
   Dim bByte()
   Dim StrResult As String
   Dim bResult() As Byte
   
   bByte = Array(67, 72, 75, 80, 83, 0)
   
   StrTmp = Split(pStr, Chr(0))
   
   ReDim bResult(5)
   
   For i = 1 To Len(StrTmp(0))
      lValue = lValue + Asc(Mid(StrTmp(0), i, 1))
   Next
   
   hV = "&H" & Right(Hex(lValue + 1), 2)
   

   For i = 0 To UBound(bByte)
      bResult(i) = (bByte(i) Xor hV)
   Next
   
   GetResult = bResult
   
End Function

注意:上传附件及图片大小不得大于30M。

⚠️ 版权声明:
本博客所有内容(含教程、源码、工具)仅供个人技术学习与研究交流使用,严禁商用、倒卖、二次分发及非法用途
未经作者书面授权,任何组织或个人不得转载、复制或用于其他平台,违者将追究相关责任。

0 0 0 举报
复制成功