mirror of
https://github.com/kevinveenbirkenbach/splitted-secret.git
synced 2025-09-09 19:57:17 +02:00
optimized cli workflow
This commit is contained in:
@@ -26,7 +26,11 @@ class Cleanup(AbstractSplittedSecret):
|
||||
self.deleteAllFilesInFolder(folder_path)
|
||||
|
||||
def cleanupForUser(self,user):
|
||||
self.executeCommand('find "' + self.getFolderPath("encrypted") + '" -not -name "*' + str(user) +'*" -type f -print | xargs rm -v')
|
||||
try:
|
||||
self.executeCommand('find "' + self.getFolderPath("encrypted") + '" -not -name "*' + str(user) +'*" -type f -print | xargs rm -v')
|
||||
except:
|
||||
pass
|
||||
self.deleteAllFiles("decrypted")
|
||||
|
||||
def deleteAll(self):
|
||||
self.deleteAllFiles("encrypted")
|
||||
|
@@ -20,6 +20,9 @@ class Decryption(AbstractSplittedSecret):
|
||||
file.close()
|
||||
return data
|
||||
|
||||
def getNeededEncryptersAmount(self):
|
||||
return len(str(list(self.user_data['groups'].keys())[0]))-1
|
||||
|
||||
def decryptFile(self,password,input_file_path,output_file_path):
|
||||
self.executeCommand('gpg --batch --passphrase "'+ password + '" -o "' + output_file_path +'" "'+ input_file_path+'"')
|
||||
|
||||
|
Reference in New Issue
Block a user