From 42b52a747d23406c3d1693058bcaa6fe4055d1af Mon Sep 17 00:00:00 2001 From: Artem Los Date: Thu, 15 Aug 2024 14:51:13 +0200 Subject: [PATCH] Update methods.py --- licensing/methods.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/licensing/methods.py b/licensing/methods.py index aad16a0..0b4f5a5 100644 --- a/licensing/methods.py +++ b/licensing/methods.py @@ -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): @@ -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)