How would u get someones UUID?

282 views Asked by At

so I am trying to make a HWID licensing software but I don't know specifically on how to get the UUID, with python code.

I've used this so far

import requests
from uuid import getnode as get_mac
import hashlib
f = open("License.txt", "r")
ID03 = f.read()
ID = int(get_mac())
ID2 = str(ID * 30) + str('YESITSME12')
ID3 = ID2.encode("utf-8")
hash_object = hashlib.md5(ID3)
hex_dig = hash_object.hexdigest()
f.close()
if ID03 == hex_dig:
    print('VALID LICENSE!')
else:
    print("INVALID LICENSE! YOUR UID IS " + str(get_mac()))

but in order for me to put it in my software I use, I need to get the users UUID or so called HWID

1

There are 1 answers

0
Joran Beasley On

its not clear what you mean ... you can use uuid.UUID(hashlib.md5(uuid.getnode()))

(that looks like the result from wmic csproduct get uuid(but is not the same)

you could also just do uuid.UUID(int=uuid.getnode()) but it looks a little funny

if you need exactly the same output as wmic csproduct get uuid ... you will need to use subprocess, or os.popen to call wmic csproduct get uuid