|
MulleDK13 wrote: There is a free program called Yoda's Protector, which literally packs the program as a .exe. It works like normal, but can't be decompiled...
MulleDK13 (http://www.splintercell3.treesoft.dk)
I just did a Google search on "Yoda's Protector" and found more cracking guides available than positive comments about it!
|
|
|
|
|
The bottom line is that no matter what you do, if a computer can understand how to check registration than a human can too with enough work.
Tyler Menezes
www.TylerM.info
|
|
|
|
|
I like to automate as much as possible. This might be a step where there has to be some user intervention. When the user purchases a license and get a registration code...well, how do I produce a registration code on the fly?
I'm guessing that either I would have to run it as a .dll on a ASP server or populate an online tabler with a ton of reg codes and then assign them to people when they buy a copy.
Your thoughts?
|
|
|
|
|
I agree, but I don't have much experience with ASP.
If you'll look at the code, you'll notice serial numbers are generated by encrypting the username (I think in MD5... I can't really remember) with a user-set key and stripping of a certain amount of numbers. If you want to look at the code in the Serial Key Generator, and adapt it to an ASP environment, you should be able to verify the user completed a transaction and then process it based on name. You could print out some information to the browser then.
If you (or anyone else) knows much about ASP, PLEASE let me know. It would be great if someone could write something based on my source code. If I ever get around to learning about ASP, I'll write it myself, otherwise...
Tyler Menezes
www.TylerM.info
|
|
|
|
|
I've made one for my system: live.goldenlightsoft.org
It's possible, only you want to change the output to Base64 once hashing is complete (so you don't have to worry about the web browser supporting that character set!)
|
|
|
|
|
Hi tyler
At first merry Xmas and happy new year.... (Never not to let pass an occasion to use the good formulas learned at the school… ;0))
I made some softs for young learners and protected them with activelock : an ocx from nelson ferraz (nslock.ocx) It works well under vb6 ! But since i try to use vs 2005 express it is not also any more good .... too bad!
So i try to find something like this on the net and find your job. Upload it and run it under vs 2005 express. I get 30 notices and 0 errors during the importation in vs 2005.
I can send you theese if you like.
The first time i ran the project it worked but the second time
when i ran the project i got an invalid cast exception...
L'exception System.InvalidCastException n'a pas été gérée
Message="La conversion de la chaîne \"12/29/2006\" en type 'Date' n'est pas valide."
Is it a problem with date in other format than english format ?
quisnam igitur sanus ?
|
|
|
|
|
I only speak English, and so I can't really test it in other languages, but there's two problems I see:
1- The language might be a problem.
2- It was created for VB.NET 2003, I can't really account for the reliability in VS.NET 2005.
I'm sorry I can't really solve your problem right now, I don't have access to all my files right now, but I'll try to get to the VS.NET 2005 problem ASAP. However, you're on your own for the languages.
Tyler Menezes
www.TylerM.info
|
|
|
|
|
To solve the problem with the date in other languages, just change the following piece of code in form1_load
'If the date is earlier than possible, then disable the program.
If OldMonth = "" Then
Else
Dim resultDate As Date ' create new date var
Dim OldDate As String = OldMonth & "/" & OldDay & "/" & OldYear
If (DateTime.TryParse(OldDate, resultDate) = True) Then 'use TryParse to convert string to localised Date
If DateTime.Now.Compare(DateTime.Now, resultDate) < 0 Then 'replaced OldDate
unregbutton.Enabled = False
InTrial = False
oReg = Registry.LocalMachine.OpenSubKey("Software", True)
oReg = oReg.CreateSubKey(RegSubKeyName)
oReg.SetValue("Enable", "1")
oReg.Close()
End If
End If
End If
Hope that helps
Dirk
|
|
|
|
|
I'll update the release as soon as I get access to a development computer again =D
Tyler Menezes
www.TylerM.info
|
|
|
|
|
Hi, Tyler.
Your program is working like clock work! Need your help on decrypting two registry entries that are created after the program is registered.
I've created a form in my program called frmRegDetails) that when displayed, contains two text boxes I want to fill that contain the persons registered name and SerialNumber.
I can get the boxes to fill with the encrypted info, but cannot get it right to show the info decrypted.
I also tried to no avail in just passing the two variables to my form (frmRegDetails)from the following event in Form1:
LoadProgramReg(ByVal UserName As String, ByVal SerialNumber As String)
Would prefer to decrypt from the registry, but would take advice on the other method too. Not sure if this request is outside the support scope, but know one better to ask than the one who designed it.
Sincerely,
Harold
|
|
|
|
|
I can't give you any exact code right now (I'm in Washington, and if you've been watching the news lately, you might have heard that a few million are without power, so I can only use my laptop w/o VB.NET 2003), but I'd recommend you add:
Imports Lines:
Imports System.IO<br />
Imports System.Text<br />
Imports System.Security.Cryptography
Variables:
Private skey As New Encryption.Data("RandomPassword")<br />
Public RegSubKeyName As String = "HardToGuessNameHere1" <br />
Subs:
<br />
Function DecryptU(ByVal hexstream As String)<br />
Try<br />
Dim register As New register<br />
Dim sym As New Encryption.Symmetric(Encryption.Symmetric.Provider.Rijndael)<br />
Dim encryptedData As New Encryption.Data<br />
encryptedData.Hex = hexstream<br />
Dim decryptedData As Encryption.Data<br />
decryptedData = sym.Decrypt(encryptedData, skey)<br />
Return decryptedData.ToString<br />
Catch<br />
End Try<br />
End Function<br />
Function EncryptU(ByVal text As String)<br />
Dim register As New register<br />
Dim sym As New Encryption.Symmetric(Encryption.Symmetric.Provider.Rijndael)<br />
Dim encryptedData As Encryption.Data<br />
encryptedData = sym.Encrypt(New Encryption.Data(text), skey)<br />
Return encryptedData.ToHex<br />
End Function<br />
Code to get the info:
Dim oReg As RegistryKey<br />
oReg = Registry.LocalMachine.OpenSubKey("Software", True)<br />
oReg = oReg.CreateSubKey(RegSubKeyName)<br />
oReg = Registry.LocalMachine.OpenSubKey("Software\\" & RegSubKeyName)<br />
Dim RegName As String = DecryptU(oReg.GetValue("USERID", "").ToString)<br />
Dim RegCode As String = DecryptU(oReg.GetValue("LOCALPATH", "").ToString)<br />
oReg.Close()
Then you can use RegName and RegCode to populate the fields. Of course first you'll need to change the variables to the appropriate values.
This might not work perfectly though, I'm just using FireEdit to write something that looks like it will work.
Tyler Menezes
www.TylerM.info
|
|
|
|
|
That did it! Perfect and fast as always. Hope you are doing there under the circumstances and can return home soon.
Take care and thanks again, Tyler.
Sincerely,
Harold
|
|
|
|
|
cool, i'm going to use this for a game i'm writing
-Schnolv
|
|
|
|
|
Hi, Tyler.
Ok... I incorporated your forms into my project, got everythig running and then registered the program. All went well there.
However, after restarting the app as required. When the program attempts to load, here is the error that occurs:
An unhandled exception of type 'System.ObjectDisposedException' occurred in mscorlib.dll
Additional information: Cannot access a closed registry key.
I tried with different key lengths, clean registry, etc. and it occurs every time after the program is registered. When looking at the before/after of the registry, it appears everything is getting written, so not sure what is the root cause.
Here's the code segment it fails in:
If UserName = DecryptU(RegCode) Then
If EncryptU(board.GetMotherBoardID.Trim.ToString) = CompID Then
InTrial = False
FullVersion = True
Dim oReg2 As RegistryKey
oReg2 = Registry.LocalMachine.OpenSubKey("Software", True)
oReg2 = oReg.CreateSubKey(RegSubKeyName)
oReg2.SetValue("Enable", "")
oReg2.Close()
End If
End If
Thoughts?
Sincerely,
Harold
|
|
|
|
|
Replace all the code for Form1_Load with:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
Dim oReg As RegistryKey<br />
oReg = Registry.LocalMachine.OpenSubKey("Software", True)<br />
oReg = oReg.CreateSubKey(RegSubKeyName)<br />
oReg = Registry.LocalMachine.OpenSubKey("Software\\" & RegSubKeyName)<br />
Dim OldDay As String = oReg.GetValue("UserSettings", "").ToString<br />
Dim OldMonth As String = oReg.GetValue("operatingsystem", "").ToString<br />
Dim OldYear As String = oReg.GetValue("GUID", "").ToString<br />
Dim RegName As String = oReg.GetValue("USERID", "").ToString<br />
Dim RegCode As String = oReg.GetValue("LOCALPATH", "").ToString<br />
Dim CompID As String = oReg.GetValue("CompID", "").ToString<br />
Dim TrialDone As String = oReg.GetValue("Enable", "").ToString<br />
oReg.Close()<br />
<br />
'If the keys should automatically be created, then create them.<br />
Select Case CreateKeys<br />
Case True<br />
If OldDay = "" Then<br />
CreateRegKeys()<br />
End If<br />
Case False<br />
If OldDay = "" Then<br />
MsgBox("The registration information has been tampered with, and the program has been shut down.", MsgBoxStyle.Critical, "Tamper Error!")<br />
Application.Exit()<br />
Exit Sub<br />
End If<br />
End Select<br />
<br />
'If the keys are encrypted, decrypt them.<br />
If EncryptKeys = True Then<br />
OldDay = Decrypt(OldDay)<br />
OldMonth = Decrypt(OldMonth)<br />
OldYear = Decrypt(OldYear)<br />
End If<br />
<br />
'Define global variables.<br />
UsedTrialDays = DiffDate(OldDay, OldMonth, OldYear)<br />
<br />
'Fill the progress bar<br />
FillBar(DiffDate(OldDay, OldMonth, OldYear), TrialPeriod)<br />
<br />
'Disable the continue button if the trial is over<br />
If DiffDate(OldDay, OldMonth, OldYear) > TrialPeriod Then<br />
unregbutton.Enabled = False<br />
InTrial = False<br />
oReg = Registry.LocalMachine.OpenSubKey("Software", True)<br />
oReg = oReg.CreateSubKey(RegSubKeyName)<br />
oReg.SetValue("Enable", "1")<br />
oReg.Close()<br />
End If<br />
<br />
'If the date is earlier than possible, then disable the program.<br />
If OldMonth = "" Then<br />
Else<br />
Dim OldDate As String = OldMonth & "/" & OldDay & "/" & OldYear<br />
If DateTime.Now.Compare(DateTime.Now, OldDate) < 0 Then<br />
unregbutton.Enabled = False<br />
InTrial = False<br />
oReg = Registry.LocalMachine.OpenSubKey("Software", True)<br />
oReg = oReg.CreateSubKey(RegSubKeyName)<br />
oReg.SetValue("Enable", "1")<br />
oReg.Close()<br />
End If<br />
End If<br />
<br />
<br />
'If the trial is done then disable the button<br />
If TrialDone = "1" Then<br />
unregbutton.Enabled = False<br />
InTrial = False<br />
If TrialPeriodDisplay.Visible = True Then<br />
MsgBox("The system clock has been manually changed, and the application has been locked out to prevent unauthorized access!", MsgBoxStyle.Critical, "Tamper Warning!")<br />
End If<br />
End If<br />
<br />
'Hide the about button if you've chosen not to give me credit.<br />
If SupportMe = False Then<br />
About.Visible = False<br />
Else<br />
About.Visible = True<br />
End If<br />
<br />
'See if the user is already registered, if so re-process the info and check if the computer is all okay.<br />
If RegName = "" Then<br />
Else<br />
RN = DecryptU(RegName)<br />
RC = DecryptU(RegCode)<br />
Dim UserName As String = RegName<br />
UserName = UserName.Remove(16, (UserName.Length - 16))<br />
If UserName = DecryptU(RegCode) Then<br />
If EncryptU(board.GetMotherBoardID.Trim.ToString) = CompID Then<br />
InTrial = False<br />
FullVersion = True<br />
oReg = Registry.LocalMachine.OpenSubKey("Software", True)<br />
oReg = oReg.CreateSubKey(RegSubKeyName)<br />
oReg.SetValue("Enable", "")<br />
oReg.Close()<br />
End If<br />
<br />
End If<br />
End If<br />
End Sub
The error would occurr at a a few points in the code later on, so it's easier to just recopy the code. If you wanted to do it manually though, remove all statements of Dim oReg2 ... and Dim oReg3 ... and then change all the lines that refer to oReg2 and oReg3 to refer to oReg .
Tyler Menezes
www.TylerM.info
|
|
|
|
|
Hi, Tyler.
First let me say that version 2.0 is incredible. Love the new look and easy to follow code.
Here's the issue:
The FIRST time the program is started up and attempts to write the registry entry (in this case the default name/location in your code), the programs throws the following error:
'An Unhandled Exception of type System.InvalidCastException occured in Microsft.visualbasic.dll
Additional information: Cast from string "//" to type 'Date' is not valid
Now, once the programs end due to this error and you immediately rerun, all is well an no errors. Delete the registry entry and you'll get the same error again. Re-run once more and it's gone.
Also, tried this on 3 different computers I develop on and same issue on all three. Wanted to be sure it wasn't just something random on one computer.
So something immediately upon launch, but nothing else at this point.
Sincerely,
Harold
-- modified at 22:49 Tuesday 12th December, 2006
|
|
|
|
|
In:
-No Modification Nessissary
-Object Subs
-Form1_Load
Change:
Dim OldDate As String = OldMonth & "/" & OldDay & "/" & OldYear
If DateTime.Now.Compare(DateTime.Now, OldDate) < 0 Then
unregbutton.Enabled = False
InTrial = False
Dim oReg2 As RegistryKey
oReg2 = Registry.LocalMachine.OpenSubKey("Software", True)
oReg2 = oReg.CreateSubKey(RegSubKeyName)
oReg2.SetValue("Enable", "1")
oReg2.Close()
End If
to:
If OldMonth = "" Then
Else
Dim OldDate As String = OldMonth & "/" & OldDay & "/" & OldYear
If DateTime.Now.Compare(DateTime.Now, OldDate) < 0 Then
unregbutton.Enabled = False
InTrial = False
Dim oReg2 As RegistryKey
oReg2 = Registry.LocalMachine.OpenSubKey("Software", True)
oReg2 = oReg.CreateSubKey(RegSubKeyName)
oReg2.SetValue("Enable", "1")
oReg2.Close()
End If
End If
(Enclose it with If OldMonth = "" Then ; Else and End If )
Tyler Menezes
www.TylerM.info
|
|
|
|
|
V. 2.0 is due out really soon!
Check back in January, I think I'll have it out sooner, but January at the latest.
Tyler Menezes
www.TylerM.info
|
|
|
|
|
Anyone got some good code for comparing dates? I looked everywhere and I can't find any... and I'm not that good as to write it myself. The code I'm using in this version is too unstable, and I'm trying to get the new version out by January.
Tyler Menezes
www.TylerM.info
|
|
|
|
|
have a look at activelock code to see how nelson Ferraz manage it. it will work fine with the old version of his ocx for vb6
quisnam igitur sanus ?
|
|
|
|
|
Hello, sir.
Your program is fantastic.
The question I had was what type of registry maintenance can I safely do while testing my program with yours. I didn't see it in the code, but can I safely delete the registry entries created by your program while testing w/o any known issues?
Specifically, will the deletion stop the program from working, does it look for a changed date. And if you delete the registry entries, I'm assuming it starts over liek it was just started for the firs time?
Thanks for your time.
Sincerely.
Harold
|
|
|
|
|
No, deleting the registry entries won't make the program stop working. It will just reset the trial period.
Like I've said in previous posts, that's quite a problem, and in the next version (due out sometime in January) I'm going to allow an option that disables the program if the entries aren't there (so they can be created in setup only). It will also encrypt them so they can't be modified. But for now, it's safe to do this.
Sorry about the delay in development, I've been busy.
-Tyler Menezes
CEO and Chairman of Programs and Websites and MyWebsFree.com
"If a plane is on a convayer belt moving backwards at the same speed that it moves fowards, will it take off?"
|
|
|
|
|
Thank you for the very quick reply. Definately looking forward to the version in January!!
I just got everything added into my project and getting the following error during compile time:
An unhandled exception of type 'System.InvalidCastException' occurred in microsoft.visualbasic.dll
Additional information: Cast from type 'TextBox' to type 'String' is not valid.
It happens in this line:
JD_Num_For = "ERROR: """ & Trim(TheDate) & """ = Invalid calendar date"
If I comment out that line, I see this in the date / time fields hidden at the bottom of the form1 form:
ERROR: = Invalid JD number argument.
It happens in your original code too. Looks like if you comment out that line and run, no errors, but it does not track the time correctly. I confirmed that by moving my computer date up.
Any thoughts?
- Harold
|
|
|
|
|
Hm... that is defiantly strange...
For this version I used some updated code I got from another source, but it was in an older version and I had to upgrade it, that's where the problem is I'm sure...
I didn't even notice this when I compiled it...
Give me a second to look at this and I'll get back to you with a solution.
-Tyler Menezes
CEO and Chairman of Programs and Websites and MyWebsFree.com
"If a plane is on a convayer belt moving backwards at the same speed that it moves fowards, will it take off?"
|
|
|
|
|
Change
JD_Num_For = "ERROR: """ & Trim(TheDate) & """ = Invalid calendar date"
to
JD_Num_For = "ERROR: """ & Trim(TheDate.Text) & """ = Invalid calendar date"
and it will work.
-Tyler Menezes
CEO and Chairman of Programs and Websites and MyWebsFree.com
"If a plane is on a convayer belt moving backwards at the same speed that it moves fowards, will it take off?"
|
|
|
|
|