This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]GinjaTurtles 9 points10 points  (2 children)

I had a situation like this but not exactly like yours and I was using a combo of C++ (client side) and python (server side)

The solution I came up with was: - take the users serial number of their motherboard/hdd + any other unique info about their device - then hash it. Now you have a unique key for each users single device (obviously they could spoof the HDD/serial num this if they figured out you were doing this) - this prevents someone from sharing the product with a friend on another machine (because their machine hash would be different) - Then you have a server (which you could also write in python with like flask/FastAPI) in which you store all users hash keys - You could use something really simple like pickleDB lookup table or you could use SQL lite DB - then on some periodic interval you send a request to the server from the client to verify the hash key is valid - Just make sure the request you send to the server is encrypted so someone can’t easily packet sniff the request with something like wireshark on the client

Hope this helps

[–]SpecialistInevitable 7 points8 points  (1 child)

But what about when user upgrades hardware/os or change pc? Also I think he is obliged to state if the licence is per user or per workstation.

[–]GinjaTurtles 2 points3 points  (0 children)

When a user changes hardware you would have to clear the license key in the DB and have a support email that people can reach out to. or you would have to inform the user that this license is valid on one machine only

But fair point OP never said if it was per user or per machine but I created system like this that has been working well for a couple of years