1

So I make python programs that gets the user's UUID through this code sample:

import uuid
current_uuid = str(uuid.getnode())

The script detects if the files are copied and used in another windows PC. This is because the script saves the current UUID and then checks the user's machine everytime it is opened to confirm if it's the same UUID.

if saved_uuid != current_uuid:
    # show error

The problem is, someone using my compiled python scripts are claiming that they're never changing PC but the program I made was saying it changed machine.

How reliable is UUID module? Could it really change or is this person I'm talking to is lying?

Austin
  • 73
  • 9
  • His UUID could have change if he only changed his network interface but not his entire computer since the UUID [is created from a MAC adress](https://docs.python.org/3/library/uuid.html#uuid.getnode) – Marius ROBERT May 16 '22 at 11:38
  • What do you mean by `reliable`? Once an uuid is generated, the value axists as it is. Do you think, that it might compare the String incorrectly? – Dominik Lovetinsky May 16 '22 at 11:39
  • by `reliable`, within my question's context, I meant to ask if it's reliable to use the `uuid.getnode()` as a permanent PC identifier? As in, _will it ever change in the future?_ The strings are compared correctly, there are just random times that somebody else is claiming that they never changed PC but the error showed up. – Austin May 16 '22 at 17:03

0 Answers0