以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  机器码,mark  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=94526)

--  作者:fubblyc
--  发布时间:2016/12/25 23:40:00
--  机器码,mark

参考:

Dim str As String =ComputerId
Dim Asc As New  ASCIIEncoding
Dim AscArr() As Byte  = Asc.GetBytes(str)
Dim Arys As  String
For i As Integer = 0 To AscArr.Length  -  1        
  Arys= Arys &  AscArr(i)
Next

 

 

e.Form.Controls("机器码").Value = (Arys.SubString(0,4))
e.Form.Controls("机器码1").Value = (Arys.SubString(4,4))
e.Form.Controls("机器码2").Value = (Arys.SubString(8,4))
e.Form.Controls("机器码3").Value = (Arys.SubString(12,4))
e.Form.Controls("机器码4").Value = (Arys.SubString(16,4))
e.Form.Controls("机器码5").Value = (Arys.SubString(20,4))

 

 


图片点击可在新窗口打开查看此主题相关图片如下:1.jpg
图片点击可在新窗口打开查看

 

 

If HardWareInfo.Ready = False \'如果没有初始化
    HardWareInfo.Initialize \'初始化HardWareInfo,提取硬件信息
End If
Dim Val1 As String
Dim Val2 As String
Dim Val3 As String
Dim Val4 As String
With HardWareInfo.CPU
    val1= .ProcessorId
End With

With HardWareInfo.BaseBoard
    val2= .SerialNumber
End With

With HardWareInfo.Disk
   
    val3= .Signature
End With

With HardWareInfo.Bios
   
    val4= .SerialNumber
End With

Dim Val5 As String = EncryptText(Val1 &  Val2  & Val3 & Val4,"a23","op#")

Dim str As String = Val5  \'ComputerId
Dim Asc As New  ASCIIEncoding
Dim AscArr() As Byte  = Asc.GetBytes(str)
Dim Arys As  String
For i As Integer = 0 To AscArr.Length  -  1        
  Arys= Arys &  AscArr(i)
Next

e.Form.Controls("机器码".Value = Arys   & "*" &   len(Arys)

 

抽取其中的数字组成机器码

 

 

最好再加入一个算法(公式),机器码用公式算出注册码,


--  作者:有点色
--  发布时间:2016/12/26 0:09:00
--  
 mark 机器码
--  作者:zhutangxin
--  发布时间:2020/8/25 23:54:00
--  
mark