views:

246

answers:

7

I need to create a simple application that doesn't work after 30 days.

How can I do that ?

Is there a way to use Trial program after 30 days ?

+9  A: 

There is always a way to use a trial program after 30 days.

Tuomas Pelkonen
If there is always a way then why adobe and other software house create Trial version of their programs ?
xRobot
There are many reasons for that, but the bad guys will always get around the 30 day limit if they want. It gives the chance for normal users to try the software before investing in it, 'free' marketing for the company, PR issues, etc.
Tuomas Pelkonen
@Tuomas, More or less true, and trial software is usually rather annoying (I usually get to test stuff for 10 minutes over those 30 days). But it can be done reasonably reliably. But you'll never be able to lock it tighter than a single clever hacker can pry open. so upvote for truth
Kris
+3  A: 

Have the program request a key from your server on first run and check its validity every time the program starts and every 24 hours.

Kris
... and require internet connection and no firewall?
Vlad
What if user deletes the key? Then the program will think this is the "first run".
Aram Hăvărneanu
no trial method will ever be water proof, see my comment on Tuomas answer, which is the answer i upvoted.
Kris
+6  A: 

If by "best" you mean least breakable, then there is really only one way: make it an Internet-based "software as a service" application. If you don't provide access, they're not using the software. If it is a desktop-based application, then some key piece of functionality would still have to be on an online server somewhere.

If the hacker has the entire application on their local machine, it can be reverse engineered and "cracked" in some fashion. The only way to overcome this is to assure that some part of the functionality is never on their machine.

Robert Cartaino
I *HATE* web applications, but basically they are the solution to this problem. Not sure if it's a problem, though. People that use the software professionally, will usually pay for it even without any kind of software protection (look at Oracle and IBM...), and people that pirate it, would not have bought it anyway, while if they pirate it you get visibility and people will learn your software.
Aram Hăvărneanu
+5  A: 

I think a better solution is a feature-limited application -- say you can do basic operations but to take advantage of the best features you have to get a paid license. This does two things -- assuming your app is well-done and interesting to a variety of users. First, you can get a larger number of people to try your app. Second you can get some good will by releasing your "lite" version free.

If you really need to do a time-limited trial, then I would consider having it write an encrypted key to the registry (windows) or a dot-file (linux). This key could encode the expiration date. Using reversible encryption allows you to get this value back out. Using a secret key helps protect against someone generating their own (valid) key. The fully licensed app could use the same key mechanism but encrypting a key value that allows permanent usage.

tvanfosson
+1 for not only stating the obvious but also providing a viable alternative
Daniel
Maybe ... Build two versions. But make sure the full version has an encrypted data to identify who bought it, because it *will* still get into the wild. You can't stop it then, but can blame someone. I would also recommend that the program visit your website for permission to run.
Mawg
The "permanent" key should also encode something unique to the license. I'm against requiring web access if it's a desktop app -- crippling your app just because it can't access your web site is obnoxious.
tvanfosson
+1  A: 

Another option is to have a server-side compiler when you download the application. This can "inject" a license key into the binary. You can do this using a constant in a seperate file. This can then be linked with the other pre-comiled files. This method is slower but harder to crack as the hacker would need to decompile the program.

Maz
Most cracking is done with a deocmpiler -- usually running under a hardware-level debugger on a VM. Remember, kids, to protect your software you first need to know how to break it.
Robert Fraser
+2  A: 

From my answer to implementing-expiration-dates-in-an-application/1871218#1871218:

Probably the most user friendly to do this is to keep track of the number of days a user has used your software. For example, each time your program starts up you could write a date to an encrypted file (unless the date already exists in the file). Then once there are more than, say, 30 dates in the file, let the user know it is time to buy the full version.

Real products such as Beyond Compare use this scheme - great for potential customers that install your product and don't use it for 30 days only to find that the trial has expired.

Also keep in mind that your scheme does not have to be perfect, just make it strong enough that it will not be convenient for users to break it.

Justin Ethier
A: 

Hmm, did you look on sourceforge? There might be some free, tried & tested solution that you can just link to. But, as stated above, everything can be cracked. All that you can do is make it difficult & slow down the rate of cracking.

Mawg