What is the best strategy to make my demo Java library/framework stop working after 30 days on Linux? [closed]

StackOverflow https://stackoverflow.com/questions/22584615

문제

Ok, it does not need to be something 100% secure. Something simple, that will cut 80% of people from using my demo library past 30 days and contact me.

The only thing I can think of is making my code save a file somewhere, with the date that the library started and after 30 days just exit displaying a message to contact for the full version. Of course, if the user finds out where this file is, all he has to do is delete it, so it would be nice if it could be in some kind of not so easy to find place (desktop or home directory would be silly I suppose).

Of course if he decompiles the code, he can easily turn that off, but again, I want some protection, even 50%, not 100%.


Target operating system is probably linux/unix, but I can also discover dynamically to make it work in any.

도움이 되었습니까?

해결책 2

I think your file strategy looks perfectly fine.

If you want to strengthen your scheme, you will have to contact a central service of some sort where you can detect if the same server tries to restart your evaluation time multiple times. The central server could i.e. sign a token with an expiry date that the library needs to run.

On the other hand, the more complicated this kind of schemes is, the more likely they are to fail at times and create problems for your legitimate users. You should consider this against the (probably very low) volume of users that would actively sabotage a more simple scheme.

PS: remember that in some environments multiple copies of different applications that uses your library may have to run simultaneously.

다른 팁

You don't mention the target operating system, so it is a little bit hard to answer the question. If your target is Windows, I would store the first start time in the Registry. Maybe this can help you.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top