From d214e3f363e91396f7590931c20c8a799f83a534 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 30 Sep 2021 17:43:09 -0600 Subject: [PATCH] Adjust whitelist usage --- scripts/wk/repairs/win.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/wk/repairs/win.py b/scripts/wk/repairs/win.py index 07f87bb9..9a197d5e 100644 --- a/scripts/wk/repairs/win.py +++ b/scripts/wk/repairs/win.py @@ -150,8 +150,9 @@ REG_UAC_DEFAULT_SETTINGS = { ), }, } -RKILL_WHITELIST = ( - CONEMU_EXE, +SYSTEMDRIVE = os.environ.get('SYSTEMDRIVE', 'C:') +WHITELIST = '\n'.join(( + str(CONEMU_EXE), fr'{PROGRAMFILES_32}\TeamViewer\TeamViewer.exe', fr'{PROGRAMFILES_32}\TeamViewer\TeamViewer_Desktop.exe', fr'{PROGRAMFILES_32}\TeamViewer\TeamViewer_Note.exe', @@ -159,8 +160,7 @@ RKILL_WHITELIST = ( fr'{PROGRAMFILES_32}\TeamViewer\tv_w32.exe', fr'{PROGRAMFILES_32}\TeamViewer\tv_x64.exe', sys.executable, - ) -SYSTEMDRIVE = os.environ.get('SYSTEMDRIVE', 'C:') + )) WIDTH = 50 TRY_PRINT = TryAndPrint() TRY_PRINT.width = WIDTH @@ -1101,9 +1101,7 @@ def run_rkill(): log_path = format_log_path(log_name='RKill', timestamp=True, tool=True) log_path.parent.mkdir(parents=True, exist_ok=True) whitelist_path = log_path.with_suffix('.wl') - whitelist_path.write_text( - '\n'.join(map(str, RKILL_WHITELIST)), encoding='utf-8', - ) + whitelist_path.write_text(WHITELIST, encoding='utf-8') cmd_args = ( '-l', log_path, '-w', whitelist_path,