Product key hash

Discussion in 'Windows 7' started by rupsd, Jun 15, 2010.

  1. MasterDisaster

    MasterDisaster MDL Expert

    Aug 29, 2009
    1,256
    674
    60
    Reading through this forum a lot of knowledge can be gained. The method I have mentioned was the precursor for the WOW loader developed in this same forum.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Daz

    Daz MDL Developer / Admin
    Staff Member

    Jul 31, 2009
    9,534
    67,253
    300
    #43 Daz, Jun 25, 2010
    Last edited by a moderator: Apr 20, 2017
    I'm guessing you mean this:
    Code:
    Set WshShell = CreateObject("WScript.Shell")
    MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))
    
    Function ConvertToKey(Key)
        Const KeyOffset = 52
        I = 28
        Chars = "BCDFGHJKMPQRTVWXY2346789"
        Do
            Cur = 0
            X = 14
            Do
                Cur = Cur * 256
                Cur = Key(X + KeyOffset) + Cur
                Key(X + KeyOffset) = (Cur \ 24) And 255
                Cur = Cur Mod 24
                X = X -1
            Loop While X >= 0
            I = I -1
            KeyOutput = Mid(Chars, Cur + 1, 1) & KeyOutput
            If (((29 - I) Mod 6) = 0) And (I <> -1) Then
                I = I -1
                KeyOutput = "-" & KeyOutput
            End If
        Loop While I >= 0
        ConvertToKey = KeyOutput
    End Function
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Stannieman

    Stannieman MDL Guru

    Sep 4, 2009
    2,232
    1,818
    90
    #44 Stannieman, Jun 25, 2010
    Last edited by a moderator: Apr 20, 2017
    Yep that's it
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...