Skip to content

Commit

Permalink
Update methods.py
Browse files Browse the repository at this point in the history
  • Loading branch information
artemlos committed Aug 15, 2024
1 parent 4bc1a5e commit 42b52a7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions licensing/methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,8 @@ def __read_registry_value(key, subkey, value_name):
except FileNotFoundError:
return None
except Exception as e:
return None //str(e)
return None #str(e)


@staticmethod
def GetMachineCode(v=1):
Expand All @@ -1416,12 +1417,12 @@ def GetMachineCode(v=1):
seed = HelperMethods.start_process_ps_v2()
else:
seed = HelperMethods.start_process(["cmd.exe", "/C", "wmic","csproduct", "get", "uuid"],v)

if seed == "":
if seed == "" or seed == None:
machineGUID = Helpers.__read_registry_value(winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\Cryptography", "MachineGuid")

if machineGUID != None and machineGUID != "":
return machineGUID //HelperMethods.get_SHA256(machineGUID)
HelperMethods.get_SHA256(machineGUID)
return None
else:
return HelperMethods.get_SHA256(seed)
Expand Down

0 comments on commit 42b52a7

Please sign in to comment.