-2

I want to realize the function of trial 30-day.

I used the registry key, but it's easy to be cracked.

Are there any good ideas?

Begtostudy
  • 1,374
  • 4
  • 13
  • 28
  • 2
    Dupe of various including http://stackoverflow.com/questions/1525378/how-can-i-make-my-product-as-a-trial-version-for-30-days – blueshift Apr 01 '12 at 14:29

1 Answers1

1

I think that nowadays the most secure way is to use a webservice. Remember however that if your application is worth it, it will be cracked, no matter how much time you spend in protecting it.

The idea is simply this: the app won't work at all without a specific key. When the key does not exist, it tries to contact a webservice. When it asnwers, the app receives a "temporary token" (which stores the timestamp of the "activation").

It will use this token to count the days left.

If you remove the token, the app thinks it's the first time you run it and try to connect to the webservice. The request sent by the app for a new token will contain the same information of the first time and the token won't be generated: the app will display a message about your trial period expiration.

On the other hand, you can try to crack the token, but it is supposed to be not so trivial (even if it is of course possible).

Then crackers will find a way to generate a token (autoproduced or given by the webservice sending to it different app credentials), or just skip the control over the already computed date (e.g. if data expired then expired else ok will become if data expired then ok else ok ...)

The same idea could be used without webservice at all: when you install the program, the key will be added. If you remove it, the program won't work. The content of the key is crypted so taht you should not easily able to generate it with another timestamp.

The basic concept is that the content of the key must be crypted and the key must exist for the program to work. Then, who is interested in going beyond the trial period must crack the crypting algo in the app, at least.

ShinTakezou
  • 9,432
  • 1
  • 29
  • 39