Compare commits

..

2 Commits

4 changed files with 11 additions and 5 deletions

View File

@ -4,6 +4,11 @@ The purpose of this software is to splitt a secret over multiple people. Just if
# testing
```bash
python scripts/main.py --mode cleanup &&
echo "werewrw" > data/decrypted/main_data/test123.txt
echo "werewrw" > data/decrypted/main_data/test124.txt
mkdir data/decrypted/main_data/folder
echo "werewrw" > data/decrypted/main_data/folder/test124.txt
python scripts/main.py --amount 3 --quota 50 --mode encrypt --add-user-information --master-password "ewrwerwerew" << END_OF_INPUTS
alpha bravo
123123812908
@ -21,9 +26,10 @@ END_OF_INPUTS
python scripts/main.py --mode decrypt --master-password "ewrwerwerew"
python scripts/main.py --mode cleanup --file-types decrypted && python scripts/main.py --mode decrypt --user "1" --user-password "DDB2QYHP4X0PDR0ZX9LBLACNL6VAXLXMNEZJDOOGUTENSI6UDYGPOR5CV01YLI49" << END_OF_INPUTS
python scripts/main.py --mode cleanup --file-types decrypted &&
python scripts/main.py --mode decrypt --user "1" --user-password "Y4GYTEW80SCQQDTIKOJ6YNCIP6MBBEM68SCKBAA1VWAQFRSPNGHEBKHSFZQENDRB" << END_OF_INPUTS
2
EOQXCYGEY2IMKAJP5VOCRVRH9LPYAPK9IC0ID0GMSJ5KXNXJHPNUBUKEVLE2WHQJ
VGCQPW2LIKJ7SDFFLUZXBXGFPZ6L8RGPTS7TLCNN9GLR82RPHRSN34YZUXF0L27V
END_OF_INPUTS
```
# Requirements to know
@ -48,6 +54,7 @@ END_OF_INPUTS
- implement tails setup script
- add data-input attribut
- add data-output attribut
- write scenario test
## Further Information
- https://www.tutorialspoint.com/python/python_command_line_arguments.htm

View File

@ -114,4 +114,4 @@ 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 -')

View File

@ -127,7 +127,7 @@ 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() + '"')
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.")