Inabyte InaGrid ControlThis is just another example of being able to find a license string inside an .ocx file. Using .lic files has been a traditional way to protect ActiveX components for quite some time now. It started with VBX files and has continued in part because Microsoft has told people to do it that way. In fact, they even provide functions in ATL to verify license files. The concept of license files is very simple. You create a text file with the same name as your control but with a .lic extension. You put this control in the same directory as your ActiveX control. In that text file, you put a license string on the first line, usually a copyright notice. In the rest of the file, you can put whatever you want, because the control will only look at the first line of the .lic file for a license string. When someone places a copy of your control into a project, you look to see if they have that .lic file. If not you put the control into demo mode. If the license file is there, you give them access to all the features and supress any nag screens. When a customer buys the control, you e-mail the license file to them and have them put it into the program directory and they are registered. Essentially, your control is both a demo and a full version, depending on whether that .lic file is there or not and whether it contains a valid license string. So how do we know if a license string is valid? We read the first line of the license file and compare it to a string that we have compiled into our control. Simple, right? Sure, but simple to crack too. Inabyte made a pretty good lightwieght grid control and followed the procedure that Microsoft has established. They put the string into a .lic file and put in the code to validate that license string. The only problem is that they hard-coded the license string in plaintext right into their code. If you open up InaGrid.ocx in a hex editor and scroll down to about halfway through the file, you will see this: First of all, you see a reference to "InaGrid.lic" so we know we are in the right area. There are two strings there. The second one is an evaluation, so the first one must be for the real version. So all you have to do is create a text file named InaGrid.lic and put it into the same directory as InaGrid.ocx and put single line of text into that file: Copyright (c) 1997 Inabyte Inc. And then you have a licensed version of the InaGrid control. To find out more about the InaGrid control, you can visit their web site at: http://www.inabyte.com. |
Copyright ⌐1998 .sozni, all rights reserved. This information must not be duplicated or reproduced without express written permission by the operator of this web site. Disclaimer: This information must only be used for academic purposes to study different licensing techniques and must not be used to infring the copyrights of these companies. It must not be used to pirate software or encourage software piracy or to engage in any illegal activity. All instructions are provided as-is and are not supported by either the software producers or the owners or operators of this web site or anyone else for that matter. Before using any of these licensing techniques you must first get approval from the softare producer and/or have already purchased this software. Please refer to the Terms of Use for more information. All trademarked names are registered trademarks of their respective companies. |