fixed shred command

This commit is contained in:
2022-12-30 14:42:07 -05:00
parent d941867273
commit 1cb3255f40

View File

@@ -445,7 +445,7 @@ if __name__ == "__main__":
logger.debug((bitwarden_login_output.stdout).decode())
bitwarden_status = json.loads(((subprocess.run([bitwarden_cli_executable, 'status'], capture_output=True)).stdout).decode())
logger.debug("Bitwarden Status: {}".format(bitwarden_status))
if bitwarden_status['status'] == "locked":
if bitwarden_status['status'] == "locked":
logger.info("Successfully Logged in")
bitwarden_unlock_output = subprocess.run([bitwarden_cli_executable, 'unlock', vault_password, '--raw', '--nointeraction'], capture_output=True)
bitwarden_session_key = (bitwarden_unlock_output.stdout).decode()
@@ -543,7 +543,7 @@ if __name__ == "__main__":
logger.debug((subprocess.run([sdelete_executable, '-p', '5', zip_filename + ".zip"], capture_output=True).stdout).decode())
elif os_detected == "Linux":
# find <directory> -depth -type f -exec shred -v -n 1 -z -u {} \;
logger.debug((subprocess.run(['find', working_directory, '-depth', '-type', 'f', '-exec', 'shred', '-v', '-n', '5', '-u', '/{/}', '\/', ';'], capture_output=True).stdout).decode())
logger.debug((subprocess.run(['find', working_directory, '-depth', '-type', 'f', '-exec', 'shred', '-v', '-n', '5', '-u', '/{/}', '\;'], capture_output=True).stdout).decode())
if not opts.no_encrypt:
logger.debug((subprocess.run(['shred', '-v', '-u', '-n', '5', zip_filename + '.zip'], capture_output=True).stdout).decode())