Click here to Skip to main content
15,914,820 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
Hi,
My application security from piracy depends upon fields in my databases. User has to activate the application, that writes Bought in my database.
But the problem is if a new user installs my application and replaces all databases from some one who has bought key, the application also becomes active without buying key from me.

Is there any possibility that I could mark the databases to be recognized with the particular setup?

Thanks
Furqan
Posted
Comments
Sergey Alexandrovich Kryukov 25-Dec-11 1:45am    
This approach sound very bad, but you need to specify your requirements; first, to the service itself, second, to the limitations you want to impose -- at least in general terms.
--SA

Here is one approach that depends on hardware IDs:

Use this article : How To Get Hardware Information (CPU ID, MainBoard Info, Hard Disk Serial, System Information , ...)[^] to find out how to collect CPU ID and HDD serial number. Then make a key according to those numbers and show the generated key to your customers and ask them to tell you that generated key (also consider saving the obtained key in Windows Registry or somewhere else).

You should have a function(say f(key)) in your program and your customer service application that gets a key and generates a serial number which should be told to the customer. And customer by its side enters the f(key) as serial number into registration part of your application.

And in your application startup you should check the f(key) which is stored in your database or windows registry and if doesn't match or doesn't exist just exit without any message(It helps not revealing the decision point to the crackers ;) ).

It was very brief but I hope that it helps you.
 
Share this answer
 
Comments
Furqan Sehgal 25-Dec-11 10:42am    
I do have this key mechanism. But the key where to compare from is stored in database. So when databases are copied, the key is already there.
Thanks anyway
Amir Mahfoozi 25-Dec-11 10:46am    
If the key was build regarding the hardware configuration then it became invalid in case of database copying.
Instead of protecting only the database I think you should protect the application. By using product key you would make it hard(er) to use the software without a proper license. For example, see: License Key Generation[^].

Securing the database is also a further step you can take. However, if you plan to store just some text in the database which tells if the software is genuine or not, it's easily broken. One possibility is to create an (encrypted if you like) stored procedure which checks the client product key against what's stored in the database (again the client product key would still be used). Only one key would be allowed so if there are more keys or the key doesn't match the client key, then the application would refuse to work. This won't protect from piracy in whole, it would just check the match of the client key and the key stored in the db.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900