added debugging to extractor. #1399

This commit is contained in:
clinton-hall 2018-12-05 21:28:59 +13:00
commit e2accb9ec2
3 changed files with 184 additions and 180 deletions

View file

@ -80,6 +80,8 @@ def extract(filePath, outputDestination):
else: else:
if ext[1] in EXTRACT_COMMANDS: if ext[1] in EXTRACT_COMMANDS:
cmd = EXTRACT_COMMANDS[ext[1]] cmd = EXTRACT_COMMANDS[ext[1]]
core.logger.debug("EXTRACTOR: cmd: {cmd} set for file: {file}".format
(cmd=cmd, file=filePath))
else: else:
core.logger.debug("EXTRACTOR: Unknown file type: {ext}".format core.logger.debug("EXTRACTOR: Unknown file type: {ext}".format
(ext=ext[1])) (ext=ext[1]))
@ -87,6 +89,8 @@ def extract(filePath, outputDestination):
# Create outputDestination folder # Create outputDestination folder
core.makeDir(outputDestination) core.makeDir(outputDestination)
core.logger.debug("EXTRACTOR: output folder: {folder} exists".format
(folder=outputDestination))
if core.PASSWORDSFILE != "" and os.path.isfile(os.path.normpath(core.PASSWORDSFILE)): if core.PASSWORDSFILE != "" and os.path.isfile(os.path.normpath(core.PASSWORDSFILE)):
passwords = [line.strip() for line in open(os.path.normpath(core.PASSWORDSFILE))] passwords = [line.strip() for line in open(os.path.normpath(core.PASSWORDSFILE))]