|
-
Feb 9th, 2006, 03:17 PM
#1
Thread Starter
Addicted Member
[RESOLVED] Serial Codes
Hey, I'm trying to make a serial code for my program. Heres what I have so far.
VB Code:
Private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal Hkey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Private Sub Command2_Click()
Dim A As Integer
Dim B As Integer
Dim C As Integer
Dim D As Integer
Dim E As Integer
Dim F As Integer
Dim G As Integer
Dim H As Integer
Dim I As Integer
Dim J As Integer
A = "5"
B = "3"
J = "1"
I = "2"
H = "9"
C = "7"
D = "8"
G = "0"
F = "4"
E = "6"
Dim User As String
Dim Correct As String
User = frmLeak.Text2
Correct = modStuff.VolumeSerial("C") * "3.14159236" + Val(293847)
If Correct = User Then
WriteRegistry &H80000001, "software\microsoft\VeNoM\", "Policy", ValString, frmLeak.Text2
Load frmMain
Unload frmLeak
Else
MsgBox "Incorrect Serial. Please Contact VeNoM!", vbCritical, "Leak!"
Unload frmLeak
End If
End Sub
Private Sub Form_Load()
Dim A As Integer
Dim B As Integer
Dim C As Integer
Dim D As Integer
Dim E As Integer
Dim F As Integer
Dim G As Integer
Dim H As Integer
Dim I As Integer
Dim J As Integer
A = "5"
B = "3"
J = "1"
I = "2"
H = "9"
C = "7"
D = "8"
G = "0"
F = "4"
E = "6"
If KeyExists(&H80000001, "software\microsoft\VeNoM\") = True Then
Dim User As String
Dim Correct As String
User = modReg.ReadRegistry(&H80000001, "software\microsoft\VeNoM\", "Policy", False)
Correct = modStuff.VolumeSerial("C") * "3.14159236" + Val(293847)
If Correct = User Then
Load frmMain
Unload frmLeak
Else
Load frmLeak
End If
Else
Load frmLeak
End If
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
-
Feb 9th, 2006, 03:59 PM
#2
Addicted Member
Re: Serial Codes
What will the user input? letters or numbers and would the code (in the above code) be 5312978046?
-
Feb 9th, 2006, 04:18 PM
#3
Thread Starter
Addicted Member
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.
-
Feb 9th, 2006, 04:20 PM
#4
Addicted Member
Re: Serial Codes
i see, you want the user to input letters?
-
Feb 9th, 2006, 04:33 PM
#5
Addicted Member
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.
-
Feb 9th, 2006, 04:33 PM
#6
Re: Serial Codes
In other words, do you want to encrypt the serial number ?
-
Feb 9th, 2006, 05:05 PM
#7
Thread Starter
Addicted Member
Re: Serial Codes
Yes, I want to encrypt it. Ive found this...from you michael it works like a charm 
VB Code:
Public Function RndCrypt(ByVal Str As String, ByVal Password As String) As String
'
' Made by Michael Ciurescu (CVMichael from vbforums.com)
' Original thread: [url]http://www.vbforums.com/showthread.php?t=231798[/url]
'
Dim SK As Long, K As Long
' init randomizer for password
Rnd -1
Randomize Len(Password)
' (((K Mod 256) Xor Asc(Mid$(Password, K, 1))) Xor Fix(256 * Rnd)) -> makes sure that a
' password like "pass12" does NOT give the same result as the password "sspa12" or "12pass"
' or "1pass2" etc. (or any combination of the same letters)
For K = 1 To Len(Password)
SK = SK + (((K Mod 256) Xor Asc(Mid$(Password, K, 1))) Xor Fix(256 * Rnd))
Next K
' init randomizer for encryption/decryption
Rnd -1
Randomize SK
' encrypt/decrypt every character using the randomizer
For K = 1 To Len(Str)
Mid$(Str, K, 1) = Chr(Fix(256 * Rnd) Xor Asc(Mid$(Str, K, 1)))
Next K
RndCrypt = Str
End Function
-
Feb 9th, 2006, 05:14 PM
#8
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|