daily pastebin goal
0%
SHARE
TWEET

Untitled

a guest Jan 12th, 2018 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Function GetKey() As String
  2.         Dim RegKey As Microsoft.Win32.RegistryKey = _
  3.         Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\Microsoft\Windows NT\CurrentVersion", False)
  4.         Dim bytDPID() As Byte = RegKey.GetValue("DigitalProductID")
  5.         Dim bytKey(14) As Byte
  6.         Array.Copy(bytDPID, 52, bytKey, 0, 15)
  7.         Dim strChar As String = "BCDFGHJKMPQRTVWXY2346789"
  8.         Dim strKey As String = ""
  9.         For j As Integer = 0 To 24
  10.             Dim nCur As Short = 0
  11.             For i As Integer = 14 To 0 Step -1
  12.                 nCur = CShort(nCur * 256 Xor bytKey(i))
  13.                 bytKey(i) = CByte(Int(nCur / 24))
  14.                 nCur = CShort(nCur Mod 24)
  15.             Next
  16.             strKey = strChar.Substring(nCur, 1) & strKey
  17.         Next
  18.         For i As Integer = 4 To 1 Step -1
  19.             strKey = strKey.Insert(i * 5, "-")
  20.         Next
  21.         Return strKey
  22.     End Function
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top