Go Premium for a chance to win a PS4. Enter to Win


How to protect a software

Posted on 1998-11-08
Medium Priority
Last Modified: 2010-04-02
I need to put a protection in a software:
-the program can't be used more than 3 times at he same time
-the program can't be transferable to an another computer
-the program can be used in trial, but can't be reinstalled to be used again.
Question by:smaugwar
  • 4
  • 2
  • 2
  • +1

Author Comment

ID: 1177252
what technique can I Use?

Accepted Solution

psdavis earned 1500 total points
ID: 1177253
There is never a fail-proof way to protect software.

There is always a lot of discussion about copy protection software vs. hardware.  Take a look at this current thread about the problems with a software protect scheme..


As far as a hardware version goes, take a look at Aladdin's hardlock with memory.  It comes with 128 bytes of memory on a 'dongle' that you attach to the back of a user's parallel port.  96 bytes of memory is read only at the user's site and read/write with their special board that they supply you.  The starter kit is either 99 or 199, I can't remember.  The last 32 bytes are read/write either by the user or by the supplier.  They also have a network version as well.

> The program can't be used more than 3 times at he same time

I don't understand this.  I am assuming that you're trying to prohibit a user from using the program more than three times and then the trial will stop.  You can use the 32 byte area to store how many times the program is run.  Everytime, increment a byte.  Inside of the 96 byte section, store the number of times that you allow the user to use the lock.

> the program can't be transferable to an another computer
> the program can be used in trial, but can't be reinstalled to be used again

In the installation program, check a certain byte in the 32 byte area.  If the byte is set, then abort installation.  If the byte isn't set, then set it and continue the installation.  This prohibits installing on more than one.

Using the 'clicking' method of counting the number of usages should be clean enough to ignore the installing to more than one computer problem.

You can also put the date in the 96 character section and stop usage once the date is passed.  Always make sure to set a byte in the 32 byte section if the date is passed to prohibit the user from moving the date back later.

Aladdin does have quite a few more ideas than I can give you.  Check them out!


LVL 11

Expert Comment

ID: 1177254
smaugwar, you have to define your needs more clearly.  First consider:

* Do you want an "unbreakable" protection?
If so, there is nothing you or I or anybody else on EE can write that will withstand the efforts of a capable and determined cracker for more than several hours at the most.  Your only choice is purchasing a commercial protection package that is known to be secure.  The only one I know of that hasn't been cracked yet is "ziplock".  If you wan't to add hardware protection (i.e., a dongle) please remember that many of the hardware protection  methods can be (and have been) bypassed by crackers.

* Do you want a "basic" protection designed to keep non-crackers honest?
If so, we can probably help you with ideas.

>> -the program can't be used more than 3 times at he same time
I assume you mean a server installation.  In that case you can create a "counter" in a memory-mapped file in the installation directory, on the server.  Program invocation increments the counter and program exit decrements it.

>> -the program can't be transferable to an another computer
There is one unique ID of a machine: it's network card's MAC address.  Unfortunately, not every machine has a network card...  Pseudo-unique IDs include: hard drive volume serial numbers, BIOS checksums, etc.  You can provide an "activation key" that is a function of one (or more) of the above.  WARNING: If the user upgrades the hardware (or changes BIOS settings) he/she will be really pissed off because your software will stop working.

>> -the program can be used in trial, but can't be reinstalled to be used again.
Save information in some obscure keys in the registry.

Another option is to use LSAPI.  Check your compiler's on-line docs.
Quote: "Software metering and license-tracking technology are available to Windows applications running on Microsoft® Windows® 95 and Windows NT® if they make calls to the License Service Application Programming Interface (LSAPI) version 1.10, a standard set of seven functions that provides licensing services. The LSAPI has been jointly developed with the cooperation, input, and support from a number of companies and associations."
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.


Expert Comment

ID: 1177255
I agree with everyone else there is no 100% secure way to protect your program. But I also dont recommend you use a dongle. Most dongles have been cracked, and are a favourite target for hackers. A quick search of the net will yield several programs. They are also quite fiddley and sometimes can cause problems such as printing.  Questions similar to your one seem to get ask quite alot at EE, but so far I havent seen a satafactory answer

A better question to look at is

Its quite a long thread but form it you will be able to see that almost every avenue has been unsuccessfully explored. In your position I would do it myself. There are several insecure ways of doing it. A lot of companies  take to 2-3 "unique"  peices of system info, Say the MAC address of ethernet card,  Disc Volume number and prehaps some registry entries, encrypt them and use this a key to their software. Not very safe, but easy to maintain. I can only suggest you do the same.

LVL 11

Expert Comment

ID: 1177256
As I mentioned above, ZIPLOCK has not been cracked.

Expert Comment

ID: 1177257
Im afraid there are alot of cracks for ziplocked software, just have a look on asta-la-vista, sorry.

LVL 11

Expert Comment

ID: 1177258
I think your info is outdated.  The new ziplock gives crackers tough time.


Unfortunately, messages from  PC98 members stating that ziplock is yet uncracked were posted with X-no-archive so I cannot provide a reference.

Author Comment

ID: 1177259
I had an idea for the evaluation and I want to know how I can do that.
I know that X-com3 can't be copied to an another cd 'cause of a file error, made by the conceptor.
My idea was that. If I can create a file with the instalation, who had an error on it, who cause the deleting impossible, but the creation of the file be read, if can read it and compare with the date of the day, who can I cause this problem intentionaly?
LVL 11

Expert Comment

ID: 1177260
Won't work.  Protection by media errors was cracked in the 80's.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question