Solved decryption encryption bug

This commit is contained in:
2022-12-11 10:19:35 +01:00
parent c85c108db5
commit 4c3661de76
4 changed files with 15 additions and 5 deletions

View File

@@ -114,4 +114,6 @@ class Decryption():
self.decryptFile(self.user_password, input_file_path, output_file_path)
def decryptMainData(self):
self.cli.executeCommand('gpg --batch --passphrase "' + self.getMasterPassword() + '" -d "' + self.paths.getEncryptedMainDataFile() + '" | tar -xvzf - "' + self.paths.getDecryptedMainDataStandartFolder() + '"')
self.cli.executeCommand('gpg --batch --passphrase "' + self.getMasterPassword() + '" -d "' + self.paths.getEncryptedMainDataFile() + '" | tar --one-top-level="' + self.paths.getDecryptedMainDataStandartFolder() + '" -xvzf -')
print(self.cli.getCommandString())
print(self.cli.getOutputString())

View File

@@ -127,7 +127,9 @@ class Encryption():
self.encryptToJsonFile(data,file_path,self.master_password)
def encryptMainData(self):
self.cli.executeCommand('tar -cvzf - "' + self.paths.getDecryptedMainDataStandartFolder() + '" | gpg -c --batch --passphrase "' + self.master_password +'" > "' + self.paths.getEncryptedMainDataFile() + '"');
self.cli.executeCommand('tar -C"' + self.paths.getDecryptedMainDataStandartFolder() + '" -cvzf - ./ | gpg -c --batch --passphrase "' + self.master_password +'" > "' + self.paths.getEncryptedMainDataFile() + '"')
print(self.cli.getCommandString())
print(self.cli.getOutputString())
def encryptAll(self):
self.encryptUserFile()

View File

@@ -148,7 +148,6 @@ try:
encrypt.addInformationToUser(user_id, label, str(input()))
encrypt.compileData()
encrypt.encryptAll()
dirty_exit()
except KeyboardInterrupt:
print("Program interrupted by user.")