BASH 23
Productkey.vbs Guest on 29th August 2020 08:15:35 PM
  1. Function ConvertToKey(Key)
  2. Const KeyOffset = 52
  3. i = 28
  4. Chars = “BCDFGHJKMPQRTVWXY2346789”
  5. Do
  6. Cur = 0
  7. x = 14
  8. Do
  9. Cur = Cur * 256
  10. Cur = Key(x + KeyOffset) + Cur
  11. Key(x + KeyOffset) = (Cur \ 24) And 255
  12. Cur = Cur Mod 24
  13. x = x -1
  14. Loop While x >= 0
  15. i = i -1
  16. KeyOutput = Mid(Chars, Cur + 1, 1) & KeyOutput
  17. If (((29 – i) Mod 6) = 0) And (i <> -1) Then
  18. i = i -1
  19. KeyOutput = “-” & KeyOutput
  20. End If
  21. Loop While i >= 0
  22. ConvertToKey = KeyOutput
  23. End Function

Paste is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.