Usage control of Application
Hi All,
I have written a Dialog based application in VC++6.0 (win2k). I want that once it is installed on any system it should only be invoked by anyone for at the most 100 times. That is to say that it runs fine when it is started for the first 100 times. After that when it is started for the 101'st time it simply exits and do to work.
Does anyone has any simple idea to do this?
Any help would be great.
naim1~^
[446 byte] By [
naim1] at [2007-11-19 7:25:49]

# 1 Re: Usage control of Application
You could use a file to remember how many times was your app started, or even better use the registry.
szz at 2007-11-11 0:27:28 >

# 2 Re: Usage control of Application
A files is not such a good idea. The registry key however, should be hidden from the users, otherwise they can simply delete or modify it.
cilu at 2007-11-11 0:28:29 >

# 3 Re: Usage control of Application
Thanks for reply.
Could you explain it a little more in detail how can i tweak the registry settings from application?
naim1 at 2007-11-11 0:29:39 >

# 4 Re: Usage control of Application
This was also posted today:
http://www.dev-archive.com/forum/showpost.php?p=1127974&postcount=2
szz at 2007-11-11 0:30:33 >

# 5 Re: Usage control of Application
Well, there is no 100% fitable solution to this. It depends upon the level of the cracker that how much good he is. Using a file (and even registry) can't solve your problem. It can be by passed in the matter of minutes (if the cracker is not a lamer).
There are different solutions, but every solution has certain degree of level, at which it fails. Server side authentications, self-deleting executable, date-time stamp comparision and many others.
Does anyone has any simple idea to do this?
A simple technique that couldn't be by-passed :rolleyes: surely I would like to learn that. If anyone knows, please share it.
Ejaz at 2007-11-11 0:31:34 >

# 6 Re: Usage control of Application
There is one method I once used for similar purpose. I used a gif (89a) to store some text which was hidded from everyone else. In GIF89a standard, 255 bytes data can be stored in the gif file starting from 0x00310. Open the gif as binary file. Using the offset given above, insert your data followed by 4 zeros (4 bytes, each having value 0x0). Read it the same way. You can develop ur own mechanusm for it. For eg. I used to store the number of chars in the string I stores in the first byte, followed by charaters in the 2nd onwards.
It will take at least some brain to detect that gif is updated every time you application runs. Of course u can also fiddle with the file's creation date. Even if the cracker finds out that this is the file u r hiding ur number in, he must know the secret mechanism u decide to read write it in. (You can also encrypt the data before writing).
# 7 Re: Usage control of Application
It will take at least some brain to detect that gif is updated every time you application runs.
Hmmm....ok, lets see, a newbie cracker will surely first of all like to know about what files are being changed, so he'll go for the CRC of all of your files. In the first attemp, he'll sort out the file that has been changed.
Even if the cracker finds out that this is the file u r hiding ur number in, he must know the secret mechanism u decide to read write it in. (You can also encrypt the data before writing)
There are different ways to deal with that. An average cracker will sample different data sets and will try to identify the pattern of change or a newbie may go for the brute force attempts.
Now, that depends that how much resources the cracker has and how much good he is to wrip off your sheild. ;)
Ejaz at 2007-11-11 0:33:40 >
