utilities.py: Fix amfi check

This commit is contained in:
Mykola Grymalyuk
2022-05-28 09:43:31 -06:00
parent a129d611fb
commit fe4914f67b

View File

@@ -150,15 +150,14 @@ def amfi_status():
amfi_1 = "amfi_get_out_of_my_way=0x1" amfi_1 = "amfi_get_out_of_my_way=0x1"
amfi_2 = "amfi_get_out_of_my_way=1" amfi_2 = "amfi_get_out_of_my_way=1"
if get_nvram("OCLP-Settings", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=False): oclp_guid = get_nvram("OCLP-Settings", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=False)
if "-allow_amfi" in get_nvram("OCLP-Settings", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True): if oclp_guid:
if "-allow_amfi" in oclp_guid:
return False return False
else: boot_args = get_nvram("boot-args", decode=False)
return True if boot_args:
elif get_nvram("boot-args", decode=False): if amfi_1 in boot_args or amfi_2 in boot_args:
if amfi_1 in get_nvram("boot-args", decode=False) or amfi_2 in get_nvram("boot-args", decode=False):
return False return False
else:
return True return True