"software licensing mechanism without internet [closed]" Code Answer


i think you have several options:

  1. as described in the comment, don't make your license floating but machine specific by incorporating the unique ids of all allowed machines in the key. upon startup check the unique id of the current machine against the key
  2. use your current approach but with the difference that the server is not on your side but on customers premise, i.e. a license server the customer needs to install somewhere.
  3. implement some kind of self check: each running instance sends its unique id into the network and in turn listens for the unique ids of other running instances. the first instance that receives more than four unique ids via the network shuts itself down. i guess this could be implemented using udp broadcasts. the implementation of this is not that trivial:

    • you need to make sure that exiting one instance and starting a new one right afterwards doesn't lead to a shutdown elsewhere.
    • furthermore, you might want to implement a check that the machine is indeed networked

    if i were to implement something like that, i would introduce the following three package types:

    • start: instance just started and broadcasts its id for the first time. all other instances need to broadcast their own id as an answer. the reason for this is twofold:
      1. fail fast
      2. ideally, the instance that has been started last should exit if the maximum number of allowed instances has been exceeded. it would not be ideal if one of the already running instances would shut down.
    • periodic: all instances periodically send their unique id, just in case a previous transmission was missed
    • exit: if one instance is closed it tells this fact the other instances

in all cases, you should think about encoding the number of allowed instances into the key, so you can later hand out differently sized keys.

By Rufas Wan on February 13 2022

Answers related to “software licensing mechanism without internet [closed]”

Only authorized users can answer the Search term. Please sign in first, or register a free account.