4

Right now what I am doing is sending an email message to Gmail with some information about the hardware my program is running on and where the web interface can be found. I then manually look at these emails to see if the hardware for a particular programming is changing a lot (dozens of computers sending emails as opposed to the one person I sent it to) if so I manually go to the web interface and enter a 'kill-switch' command to disable that copy by wiping an xml file the program needs to operate. However, this is easy for the user to reverse by just installing the program.

I know almost nothing of web-side code and licensing. I'm more than willing to learn but it seems like a bit of overkill for what I am doing.


To be more specific - is there any way to do this without using a webserver of any kind? If not what is the simplest webserver-based approach for someone with no network coding experience?

pavja2
  • 397
  • 3
  • 9
  • 20
  • 2
    This comes up fairly frequently (http://stackoverflow.com/questions/7307554/c-implementing-licencing-in-winforms was the first one I found). Unfortunately it's often quite hard to do without a website which the products check into (because at the end of the day people can mess with files on their PC). Your question is good but I'd strongly suggest thinning it out a bit - there's a lot of back story! – Liath Jan 10 '14 at 16:26

3 Answers3

2

You should lock your program on the HWID of the computer which is unique. On the first run put the hwid of the computer on a server and on run check if the hwid is different.. if different close the program

  • Of course, such a mechanism can be defeated by the user; it is only protection from casual licence violation, not from a determined intelligent user. – Servy Jan 10 '14 at 16:33
0

How about adding license codes and require it in installation. Create algorithm complex enough and store all possible keys inside the program.

With web server, you could during installation send simply request to eg. REST web service and ask if the licence is valid and tie IP address to this license. this you could do with PHP and basic hosting provider for your service.

Then, everytime program opens it checks if the current IP address is registered to license.

Also, I think that locking to how it is bad because people change computers like socks these days. Just ensure to block license brute forcing in server-side like allowing 10 failed requests from the same IP in one day

Salomon Zhang
  • 1,553
  • 3
  • 23
  • 41
makallio85
  • 1,366
  • 2
  • 14
  • 29
  • And then when someone buys one licence and gives the code to all of their friends, or just posts it online for anyone to use? – Servy Jan 10 '14 at 16:35
  • No because it could only be used in one place at time. – makallio85 Jan 10 '14 at 16:36
  • and how are you enforcing that? – Servy Jan 10 '14 at 16:36
  • Edited post. Cellphone is slow to type :) – makallio85 Jan 10 '14 at 16:39
  • This is an entirely unworkable solution. Most people don't have a static IP address. This would result in your applications ceasing to work after anywhere from a few hours, to a few days, for the vast majority of users. Some of the lucky ones will get a few weeks worth out of the product, but beyond that you're left with the very small handful of people who are buying static IPs, which is mostly servers, not clients. – Servy Jan 10 '14 at 16:43
  • FYI my ipaddress has been same for years now. And it is dynamic. It only changes if mac address of my device (dsl router) changes. So I have to say that I is not very common that static ip addresses changes. – makallio85 Jan 10 '14 at 16:49
  • If you are correct (and not, for example, just looking at your LAN IP address), then you are in a very small minority. Having been a site administrator for a number of years and spent a lot of time looking at user IP addresses and the frequency at which they change, I can tell you that *most* people don't have a single IP address for long, certainly not on the order of years. – Servy Jan 10 '14 at 16:50
  • Ok. I have only end user opinion that is not propaply valid one ;) – makallio85 Jan 10 '14 at 16:52
0

You're talking about node-locking your program.
As far as I understand this is a pretty complex problem, so I'd recommend using a 3rd party component.

Idov
  • 5,006
  • 17
  • 69
  • 106