OCLP-CLI updates

This commit is contained in:
Dhinak G
2021-06-21 11:06:40 -04:00
parent db2721354c
commit 2b81e38ea8
6 changed files with 56 additions and 32 deletions

View File

@@ -66,9 +66,11 @@ def csr_decode(csr_active_config):
else:
return True
def friendly_hex(integer: int):
return "{:02X}".format(integer)
def patching_status():
# Detection for Root Patching
sip_enabled = True # System Integrity Protection
@@ -94,7 +96,18 @@ def patching_status():
return sip_enabled, sbm_enabled, amfi_enabled, fv_enabled
clear = True
def disable_cls():
global clear
clear = False
def cls():
global clear
if not clear:
return
if not check_recovery():
os.system("cls" if os.name == "nt" else "clear")
else:
@@ -117,6 +130,7 @@ def get_nvram(variable: str, uuid: str = None, *, decode: bool = False):
value = value.strip(b"\0").decode()
return value
def download_file(link, location):
print("- Attempting download from following link:")
print(link)
@@ -140,6 +154,7 @@ def download_file(link, location):
chunk = file.read(1024 * 1024 * 16)
print(f"- Checksum: {checksum.hexdigest()}")
# def menu(title, prompt, menu_options, add_quit=True, auto_number=False, in_between=[], top_level=False):
# return_option = ["Q", "Quit", None] if top_level else ["B", "Back", None]
# if add_quit: menu_options.append(return_option)