From f70adf4d3da97e2e265efdac47f1c2151d1b4ec6 Mon Sep 17 00:00:00 2001 From: BreakXD <55211911+BreakXD@users.noreply.github.com> Date: Wed, 21 Aug 2024 00:05:50 -0300 Subject: [PATCH 1/2] Update methods.py --- licensing/methods.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/licensing/methods.py b/licensing/methods.py index 0b4f5a5..27fe639 100644 --- a/licensing/methods.py +++ b/licensing/methods.py @@ -1422,7 +1422,7 @@ def GetMachineCode(v=1): machineGUID = Helpers.__read_registry_value(winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\Cryptography", "MachineGuid") if machineGUID != None and machineGUID != "": - HelperMethods.get_SHA256(machineGUID) + return HelperMethods.get_SHA256(machineGUID) return None else: return HelperMethods.get_SHA256(seed) From f662099343a6ac8ab80dd0dd0107751dad208df5 Mon Sep 17 00:00:00 2001 From: BreakXD <55211911+BreakXD@users.noreply.github.com> Date: Wed, 21 Aug 2024 00:15:21 -0300 Subject: [PATCH 2/2] Update methods.py Helpers.GetMachineCode(v) can return a None --- licensing/methods.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/licensing/methods.py b/licensing/methods.py index 27fe639..f7b2ee0 100644 --- a/licensing/methods.py +++ b/licensing/methods.py @@ -1464,6 +1464,9 @@ def IsOnRightMachine(license_key, is_floating_license = False, allow_overdraft=F current_mid = Helpers.GetMachineCode(v) else: current_mid = custom_machine_code + + if current_mid is None: + return False if license_key.activated_machines == None: return False