• Advertisement
Sign in to follow this  

Disabling after trial

This topic is 4413 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm working on a game in c++, and I got to thinking: how would I get it to disable itself after a 14 day trial? I guess I'd need to store the time and date it was installed in a file somewhere obscure, and check it against the current date. But wouldn't that be pretty easy to find? Do I need to encrypt it? While I'm about it, how would I link to a site from my game? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Well, trial systems in general are very easy to crack. Some try to encrypt a string containing the time it starts at, some will store the time hidden away in the registry somewhere or some filename in the windows directory somewhere.

If someone is determined to extend their time, they will do it, no doubt, if they know what they're doing. If you're doing a simple project, you can just try one of the simpler methods, storing the date somewhere and checking against the current date. If you're planning to make some buck off of your program, you might want to search the web for trial management libraries.

Edit: As for linking to your site, do you mean you want to direct a browser to your website? It's pretty easy:
ShellExecute(0, "open", "http://www.google.com", 0, 0, SW_SHOWNORMAL);

Replacing google with your site name, of course. This is the best method for Windows, if you're using Windows, of course. It will use the default Browser, be it Internet Explorer, Firefox, etc.

Share this post


Link to post
Share on other sites
Quote:
Original post by RAZORUNREAL
I'm working on a game in c++, and I got to thinking: how would I get it to disable itself after a 14 day trial?
Thanks


You've probably already known that there's no perfect protection, haven't you ?.
I'll think about how to make my game superb instead of protecting it from unstoppable crackers. When it comes to a real commercial game, I'll buy a decent solution from a company (just to make sure it won't be cracked early enough[smile]). To protect something in a locker, you've got to have a key. When you have made a key, someone out there will be able to make a fake key also. It is a matter of time.

You may also put a BIG sentence in front of the user:
I HAVE SPENT A PART OF MY LIFE AND MANY EFFORT INTO THIS GAME. PLEEEASE BUY IT IF YOU REALLY WANT TO ENJOY MY WONDERFUL FUTURE GAMES. THANK YOU VERY MUCH!.

Quote:
Original post by RAZORUNREAL
While I'm about it, how would I link to a site from my game?


You may open a browser from your game and supply the link in the command line. But browsers handle it differently, you probably have to determine the kind of browser and the OS itself.

Share this post


Link to post
Share on other sites
Yea, I realise nothing is perfect. I'd just like it to be easier to spend a few bucks on the game than to work out how to extend the trial. Not that it's my problem as such. *cough*

Thanks Flimflam, that's just what I wanted.

Share this post


Link to post
Share on other sites
I think it'd be better to make a shortened game with a few levels that way, they can't do more than you want them to, because then they'd be missing game content. But thats my opinion.

Share this post


Link to post
Share on other sites
I guess, but it's a 2d game with, for the most part, randomly generated levels. And it's not my choice.

Share this post


Link to post
Share on other sites
Generally with generated levels they get progressively harder. It shouldn't be hard to modify it to not bring in any higher level features. So they can play it forever, but it's always a starter level.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
One option you could try is some how only give them the compiled code that creates level 1-3 and they have to register/pay to download more levels. This could be done in a demo.dll and full release.dll or something similar. Because whatever you give the end user, it is crackable. So the only way to have them buy the product is to give them something in return to obtain new levels instead of giving them a code to use to unlock the full release.

Share this post


Link to post
Share on other sites
I just thought of something that might work (I just came up with it so I could be way off). Store the date in two places, 1) The registry and 2) a hidden file. Use two different encryption methods, one for each of the places they are stored. Then read them both in, make sure the unencrypted dates match (incase one of them was modified), and then check to see how much time is left in the trial. Just a thought, although I'd be interested to see if it works to keep casual users from extending the trial period.

Share this post


Link to post
Share on other sites
Whatever system you decide on, be sure to apply lots of other systems as well, for redundancy. The chance that a potential cracker will have the free time to change encrypted files, registry entries, tagged data files, hidden files in the system directory and other things is very unlikely.

Considering that the decent crackers are probably off working on bigger-name games, you should attempt to frustrate the casual pirate (perhaps armed with a newbie guide to SoftICE) for as long as possible.

It may be a good idea to find a copy of No Starch Press' Crackproof Your Software, if you're really serious.

Share this post


Link to post
Share on other sites
Quote:
Original post by Ravuya
The chance that a potential cracker will have the free time to change encrypted files, registry entries, tagged data files, hidden files in the system directory and other things is very unlikely.


But speaking as a user about half of these methods would prompt me to say "please drop dead and stop writing software", because there is hardly anything more annoying than software "polluting" your system with lots of *** that will remain even after uninstalling. Just like I wouldn't like a friends dog to piss in every corner of my apartment just because he feels it is now "his".

Also, about the same half of these measures won't work if somebody is using a decent third party uninstaller to prevent EXACTLY this kind of annoying "let's leave lots of files and entries behind, who cares about a few kb"-behaviour.

The only solution if you are REALLY worried about someone using your trial infinitely is not offering one in the first place. It WILL be cracked sooner rather than later and once that happened everybody who cares will find a crack/key generator/whatever online, meaning that from this point on even the most clever protection will be useless, because nobody else will ever have to bother cracking it again. And the time and energy of these crackers shouldn't be underestimated. Your only hope would be that your program is so unknown, unimportant and unwanted that nobody cares about cracking it.

Share this post


Link to post
Share on other sites
Just make the trial version exclude most of the content contained within the full game. Ensure that the content

- Are absent from the datafiles
- The binary is designed not to play with them even if they're somehow added.

Forget DLLs, just make a different .exe for the demo and the full release.

Of course if someone wants to rip off the full version of the game, that's another story.

Mark

Share this post


Link to post
Share on other sites
Thinking back to Doom et al - didn't you get a demo of like one level? There is no foolproof way of having the full version on 30 day trial, somebody will always crack it - if it's worth cracking ;)

I always go for a restricted version of the software i'm deploying. That way you _know_ that nobody will be cracking it. Of course then you have the other whole issue of protection in general.

I work with smaller markets so can afford to have an interactive licensing process. Although some of my software clients still don't want to rely on the Internet, I think it's safe to say that most people have got access to the Internet now. So if you set up a mechanism whereby the serial number generates an unlock key, both of which are held in your database - you should get around lots of people using the same serial number.

Share this post


Link to post
Share on other sites
I don't suppose anyone knows how Ambrosia Software, Spiderweb Software, and others of that ilk handle this issue? They release the full version of the game but lock it with a password. This has an advantage from the user's perspective - namely, they only have to download the game once. How secure can you make a game distribution, provided that you must allow the entire game (all data files, fully-functional executable except that it's locked) to be downloaded for free?

For that matter, how much of an issue is piracy anyway? I know that the RIAA is always moaning about the X billions of dollars they've lost to piracy, but has anyone done a serious, unbiased study on this kind of thing? Would it really affect a hobbiest developer much?

Share this post


Link to post
Share on other sites
Quote:
Original post by Derakon
I don't suppose anyone knows how Ambrosia Software, Spiderweb Software, and others of that ilk handle this issue? They release the full version of the game but lock it with a password. This has an advantage from the user's perspective - namely, they only have to download the game once. How secure can you make a game distribution, provided that you must allow the entire game (all data files, fully-functional executable except that it's locked) to be downloaded for free?


Ambrosia was nice about it with EV, they had a 30-day trial with a message. After that, you can still play but Captain Hector occasionally comes by and blows you to pieces.

Spiderweb let you only play about 1/3 of the game without a key. I have no idea how they locked the rest of the data, but most people figured they were nice enough not to trade around keys and try to crack the executable (of course, this eventually happened, but enough people were nice about it).

Both of these companies came from the Mac, so it's possible shareware culture is very different there.

Share this post


Link to post
Share on other sites
For the record, I have tried patching cracking-mes and what not, just to see how its done. Don't rate me down, be mad, etc. I was curious to see what goes into this stuff. SO speaking from some experiance i'd say:

1) heavy redundancy, inlined functions, multiple checks.
If you just have one function that is called, then you just change the one function and your done. Inlining, makes the cracker have to find each implimentation of the function. Self modifying code is good too, as that makes life unfun as well.
2)Crippled. Have 2 versions. Crippled demo, and retail. You can't unlock something that is crippled :P
3)Registry keys tend to be pretty easy to find and kill the check, so you might want to store it in a few places, or name it something that is very common.
4)If you choose to use the unlock key, don't make the error message with a message box, or the expired nag with a message box. These tend to be rediculously easy to patch. For example, it tend to look like

CALL some function
CMP eax,eax
JE goodBoyCall //patch to JMP
push blah
push blah2
push blah3
push blah4
Call messageboxA
JMP outOfThisRoutine
goodBoyCall:
//normal funtion here

Now i forget how many pushes there are for messageBoxA, as i don't do this often, but thats pretty much how it works. So don't take that sort of protection.
//edit
5)Also, you could use the retail key to encrypt the rest of the .exe like someone above me suggested. Thats unfun to deal with :P
6)Anti debug tricks:
The simple "IsDebuggerPresent" stops the causal cracker,
Use another thread that monitors the main thread, checking to see if it is paused for an excessive amount of time (ie: running in a debugger)
There are many different tricks out there, so take a look.

But there is no fool proof method. But using a variatey of techniques, and put a little thought into it, and you'll protect against the script-kiddies with SoftICE, as well as most crackers who just get frustrated.

Good luck!!

Share this post


Link to post
Share on other sites
I really liked the way 'Carmageddon 2 Demo' limited the usage.

If you wanted to disable the 15 min timelimit you only had to delete 'demo.txt' (an empty textfile) from the game directory.

After hacking, the demo itself contained enough content to keep you busy for a couple of days. I never bought the full game [evil].

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement