Implemented absolut paths

This commit is contained in:
Kevin Veen-Birkenbach 2022-12-10 21:48:24 +01:00
parent 7b33c5420d
commit c06d1d34d2
2 changed files with 8 additions and 5 deletions

View File

@ -3,8 +3,8 @@ The purpose of this software is to splitt a secret over multiple people. Just if
# testing # testing
```bash ```bash
python scripts/main.py --mode cleanup && python splitted-secret/scripts/main.py --mode cleanup &&
python scripts/main.py --amount 3 --quota 50 --mode encrypt --add-user-information --master-password "ewrwerwerew" << END_OF_INPUTS python splitted-secret/scripts/main.py --amount 3 --quota 50 --mode encrypt --add-user-information --master-password "ewrwerwerew" << END_OF_INPUTS
alpha bravo alpha bravo
123123812908 123123812908
asfdasd@asdskjd.de asfdasd@asdskjd.de
@ -46,7 +46,6 @@ END_OF_INPUTS
## todo ## todo
- implement tails setup script - implement tails setup script
- implement relativ call
- implement tmp mount for decrypted files - implement tmp mount for decrypted files
- add data-input attribut - add data-input attribut
- add data-output attribut - add data-output attribut

View File

@ -1,4 +1,5 @@
from .Cli import Cli from .Cli import Cli
import os
class AbstractSplittedSecret(Cli): class AbstractSplittedSecret(Cli):
USER_PASSWORD_LENGTHS = 64 USER_PASSWORD_LENGTHS = 64
@ -11,9 +12,12 @@ class AbstractSplittedSecret(Cli):
TYPE_ENCRYPTED="encrypted" TYPE_ENCRYPTED="encrypted"
TYPE_DECRYPTED="decrypted" TYPE_DECRYPTED="decrypted"
ROOT_PATH= os.path.join(os.path.dirname(os.path.abspath(__file__)),"../","../")
def __init__(self): def __init__(self):
super(Cli, self).__init__() super(Cli, self).__init__()
self.data_folder = "data/"
self.data_folder = os.path.join(self.ROOT_PATH,"data") + '/'
def getCoSecretHoldersRange(): def getCoSecretHoldersRange():
return range(AbstractSplittedSecret.MINIMUM_SECRET_HOLDERS,AbstractSplittedSecret.MAXIMUM_SECRET_HOLDERS) return range(AbstractSplittedSecret.MINIMUM_SECRET_HOLDERS,AbstractSplittedSecret.MAXIMUM_SECRET_HOLDERS)