From 5272c8b31dc1623d002d38b1a957e2cd76b04e66 Mon Sep 17 00:00:00 2001 From: Nika Gerson Lohman Date: Fri, 7 Dec 2018 22:45:01 +0100 Subject: [PATCH] Start vbs directly from extractor --- core/extractor/extractor.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/extractor/extractor.py b/core/extractor/extractor.py index cdc4f817..1eb2cb1e 100644 --- a/core/extractor/extractor.py +++ b/core/extractor/extractor.py @@ -17,8 +17,9 @@ def extract(filePath, outputDestination): if not os.path.exists(core.SEVENZIP): core.logger.error("EXTRACTOR: Could not find 7-zip, Exiting") return False - invislocation = os.path.join(core.PROGRAM_DIR, 'core', 'extractor', 'bin', 'invisible.cmd') - cmd_7zip = [invislocation, str(core.SHOWEXTRACT), core.SEVENZIP, "x", "-y"] + wscriptlocation = os.path.join(os.environ['WINDIR'], 'system32', 'wscript.exe') + invislocation = os.path.join(core.PROGRAM_DIR, 'core', 'extractor', 'bin', 'invisible.vbs') + cmd_7zip = [wscriptlocation, invislocation, str(core.SHOWEXTRACT), core.SEVENZIP, "x", "-y"] ext_7zip = [".rar", ".zip", ".tar.gz", "tgz", ".tar.bz2", ".tbz", ".tar.lzma", ".tlz", ".7z", ".xz"] EXTRACT_COMMANDS = dict.fromkeys(ext_7zip, cmd_7zip) # Using unix