Question

Do you have any ideas of implementing a 'record count' limit for a trial version of a software?

  1. Assume it's a task management program;
  2. Trial version and full version are separate downloads;
  3. in the trial version I want to limit the max. amount of tasks allowed to be created by the users.

My question is, show to apply this 'task count limit' into the core program logic, so that it can't be bypassed easily? For example, obviously the following code can be bypassed easily:

if (varTotalTaskCount > 20)
{
  ShowMessage("This is a trial version and you can create up to 20 tasks only");
  return false;
}

Any ideas? Thanks!

Was it helpful?

Solution

I'd be evil and do something like this:

In the full version use an array/list/etc without a limit.
In the trial version use a static array/list/etc of a specified size and do not bounds check. Also in the trial version add the code you suggested that is easily bypassed.

This will mean that it won't crash if the maximum limit check is present but will crash if the crackers remove the check. It is harder to fix the code when it contains many errors.

Finally, I do not recommend coding this way but if I would want to make it as hard as possible for crackers without resorting to client-server type of protection then this is what I would have done.

OTHER TIPS

Well, define "easily" ;)

If this is written in an interpreted language (like PHP), then your best bet is code obfuscation.

With compiled programs, you can hide this logic better (e.g. by using self-modifying code, or performing various computations to calculate the task limit), but in the end, you still have to make the decision "trial or not".

In the end, if someone is willing to crack your program, they will.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top