ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a server software that needs to be license on a monthly basis. Client will pay per transaction on a monthly period. It is running on linux and created in C/C++. How do I make a program that will allow this server program to run only in a particluar time and tied up only to a particular IP or MAC address?
My idea is this:
1. Create a program (run on client side) that looks for a particular IP or a particluar MAC address and make this the license key generator
2. Generates a random string based on this key
3. Client send the license key to our office
4. A program in our office will read the license key and generates the software license registration based on this MAC or IP together with the date it is allowed to run.
5. We send th license registration back to the client
6. Client install it on their server
7. Server reads license periodically
8. Server notifies client (via log file, email) if license is already expired
So, what do you think of this? Is this a good idea or is there something better to implement this licensing system
This reminds me of the algorithm thats used to lock/unlock cars wirelessly. I think you could easily do something similar. Heres how:
Start both the customers' software and your server off with a pseudo-random # generator seeded with the same initial value. Have the customer's software request this number from your server. If it recieves the correct (same) # then both systems move on to the next # on their next transaction. In the case of a license deactivation, the customer machine never moves on because it fails, it stays stuck at the same value.
Of course the wireless algorithm this idea is based on compares the next 256 values, not just the next one, so that the two systems will likely stay in sync. In your case one comparison is all you need.
I hope this helps! I am sure something based on this idea will be useful.
Then you need a simple mechanism for recording some kind of a coded value which embeds a date. The software decodes the value, checks the date, and if the date has expired it does not run. (It should allow a "grace period.")
The main thing that you need to be certain of is that your mechanism is not so onerous that it pisses-off the customer. Seriously. Yes, you do need to "keep people honest." But you are not realistically very likely to be dealing with a super-duper clever-code-haxer who gets his jollies out of breaking your mechanism. (If you've ever watched these thieves go, I assure you, they will do it. But their impact upon actual, legitimate sales is much less than you may fear.)
An onerous, offensive "protection" mechanism can definitely prevent a sale. I know that I personally have declined to buy software simply because of its protection mechanism... not because of the fact that it existed, but because of how it was done.
People change disk-drives; disk drives fail. They want to move your software from one machine to another. Dongles get dropped on the ground and accidentally kicked behind a 400-pound filing cabinet. Oops. These things happen, often over weekends... and sometimes in the middle of the day in a time-zone which for you is the middle of the night! In my opinion it is much more important to make sure that your software does not create problems for them, than to absolutely, hermetically detect that they are cheating on you.
Have a good contract. Give great customer service. Provide immediate support when the license expiration period is about to end. Keep the whole thing simple.
We certainly have a good contract on our existing server app. But since the client is not US based, we're thinking of adding more protection to the new system.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.