Results 1 to 8 of 8

Thread: [RESOLVED] Serial Codes

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2006
    Posts
    246

    Resolved [RESOLVED] Serial Codes

    Hey, I'm trying to make a serial code for my program. Heres what I have so far.

    VB Code:
    1. Private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal Hkey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
    2.  
    3. Private Sub Command2_Click()
    4. Dim A As Integer
    5. Dim B As Integer
    6. Dim C As Integer
    7. Dim D As Integer
    8. Dim E As Integer
    9. Dim F As Integer
    10. Dim G As Integer
    11. Dim H As Integer
    12. Dim I As Integer
    13. Dim J As Integer
    14.  
    15. A = "5"
    16. B = "3"
    17. J = "1"
    18. I = "2"
    19. H = "9"
    20. C = "7"
    21. D = "8"
    22. G = "0"
    23. F = "4"
    24. E = "6"
    25.  
    26.  
    27. Dim User As String
    28. Dim Correct As String
    29. User = frmLeak.Text2
    30. Correct = modStuff.VolumeSerial("C") * "3.14159236" + Val(293847)
    31. If Correct = User Then
    32. WriteRegistry &H80000001, "software\microsoft\VeNoM\", "Policy", ValString, frmLeak.Text2
    33. Load frmMain
    34. Unload frmLeak
    35. Else
    36. MsgBox "Incorrect Serial.  Please Contact VeNoM!", vbCritical, "Leak!"
    37. Unload frmLeak
    38. End If
    39. End Sub
    40.  
    41. Private Sub Form_Load()
    42.  
    43. Dim A As Integer
    44. Dim B As Integer
    45. Dim C As Integer
    46. Dim D As Integer
    47. Dim E As Integer
    48. Dim F As Integer
    49. Dim G As Integer
    50. Dim H As Integer
    51. Dim I As Integer
    52. Dim J As Integer
    53.  
    54. A = "5"
    55. B = "3"
    56. J = "1"
    57. I = "2"
    58. H = "9"
    59. C = "7"
    60. D = "8"
    61. G = "0"
    62. F = "4"
    63. E = "6"
    64.  
    65. If KeyExists(&H80000001, "software\microsoft\VeNoM\") = True Then
    66. Dim User As String
    67. Dim Correct As String
    68. User = modReg.ReadRegistry(&H80000001, "software\microsoft\VeNoM\", "Policy", False)
    69. Correct = modStuff.VolumeSerial("C") * "3.14159236" + Val(293847)
    70. If Correct = User Then
    71. Load frmMain
    72. Unload frmLeak
    73. Else
    74. Load frmLeak
    75. End If
    76. Else
    77. Load frmLeak
    78. End If
    79. End Sub


    My question is...how do I make it so that it shows the letters and not the numbers. If all it shows is the numbers..then it will be very easy to crack...but if it shows letters...it will be much harder.

    Thanks,
    jizz

  2. #2
    Addicted Member
    Join Date
    Feb 2006
    Posts
    129

    Re: Serial Codes

    What will the user input? letters or numbers and would the code (in the above code) be 5312978046?

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2006
    Posts
    246

    Re: Serial Codes

    They will press a button which will display their hard drive serial..then I will take their serial and multiply it by 3.14159236 and add 293847 to it to make it somewhat hard to figure it out...but it will be semi easy because they can find out what I did by doing this formula

    Their HD Serial/Serial for program and it will display a number which can be used for all formulas.

    Therefore, I just want to hide the numbers into letters so it will be much much harder to figure it out.

  4. #4
    Addicted Member
    Join Date
    Feb 2006
    Posts
    129

    Re: Serial Codes

    i see, you want the user to input letters?

  5. #5
    Addicted Member
    Join Date
    Feb 2006
    Posts
    129

    Re: Serial Codes

    if this is true, put the serial code into a string and then split it up into it's seperate numbers. Then use a code such as

    If (firstsplit)= A then
    Label1.caption = Label1.caption + "A"
    End If

    *the first split is just everytime you split you will report back to that to see what letter it is.

    http://vbforums.com/showthread.php?t...litting+string go here for splitting.

  6. #6
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803

    Re: Serial Codes

    In other words, do you want to encrypt the serial number ?

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Jan 2006
    Posts
    246

    Re: Serial Codes

    Yes, I want to encrypt it. Ive found this...from you michael it works like a charm

    VB Code:
    1. Public Function RndCrypt(ByVal Str As String, ByVal Password As String) As String
    2.     '
    3.     '  Made by Michael Ciurescu (CVMichael from vbforums.com)
    4.     '  Original thread: [url]http://www.vbforums.com/showthread.php?t=231798[/url]
    5.     '
    6.     Dim SK As Long, K As Long
    7.    
    8.     ' init randomizer for password
    9.     Rnd -1
    10.     Randomize Len(Password)
    11.     ' (((K Mod 256) Xor Asc(Mid$(Password, K, 1))) Xor Fix(256 * Rnd)) -> makes sure that a
    12.     ' password like "pass12" does NOT give the same result as the password "sspa12" or "12pass"
    13.     ' or "1pass2" etc. (or any combination of the same letters)
    14.    
    15.     For K = 1 To Len(Password)
    16.         SK = SK + (((K Mod 256) Xor Asc(Mid$(Password, K, 1))) Xor Fix(256 * Rnd))
    17.     Next K
    18.    
    19.     ' init randomizer for encryption/decryption
    20.     Rnd -1
    21.     Randomize SK
    22.    
    23.     ' encrypt/decrypt every character using the randomizer
    24.     For K = 1 To Len(Str)
    25.         Mid$(Str, K, 1) = Chr(Fix(256 * Rnd) Xor Asc(Mid$(Str, K, 1)))
    26.     Next K
    27.    
    28.     RndCrypt = Str
    29. End Function

  8. #8
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803

    Re: Serial Codes

    I was going to give you that link if you would have said "Yes" to my previous question, but you are ahead of me...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width