diff --git a/scripts/classes/AbstractSplittedSecret.py b/scripts/classes/AbstractSplittedSecret.py new file mode 100644 index 0000000..f5c5748 --- /dev/null +++ b/scripts/classes/AbstractSplittedSecret.py @@ -0,0 +1,3 @@ +class AbstractSplittedSecret: + def __init__(self): + self.encrypted_splitted_password_files_folder = "data/encrypted/splitted_password_files/" \ No newline at end of file diff --git a/scripts/classes/Cleanup.py b/scripts/classes/Cleanup.py index e69de29..bf09b3f 100644 --- a/scripts/classes/Cleanup.py +++ b/scripts/classes/Cleanup.py @@ -0,0 +1,7 @@ +from .AbstractSplittedSecret import AbstractSplittedSecret +class Cleanup(AbstractSplittedSecret): + def __init__(self): + pass + def deleteAll(self): + + pass \ No newline at end of file diff --git a/scripts/classes/Cli.py b/scripts/classes/Cli.py index df5ec68..04b1de2 100644 --- a/scripts/classes/Cli.py +++ b/scripts/classes/Cli.py @@ -3,7 +3,7 @@ import subprocess -class Cli(): +class Cli(object): def __init__(self): self.command = '' diff --git a/scripts/classes/__init__.py b/scripts/classes/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/scripts/main.py b/scripts/main.py index f4673fb..ed30f15 100644 --- a/scripts/main.py +++ b/scripts/main.py @@ -1,18 +1,19 @@ import argparse from classes.Generate import Generate +from classes.Cleanup import Cleanup if __name__ == '__main__': parser = argparse.ArgumentParser() - parser.add_argument('-a', '--amount',type=int, dest='amount_of_secret_holders',required=True,choices=range(1,9)) - parser.add_argument('-q', '--quota', type=int, dest='decryption_quota', choices=range(1,101),required=True) - #parser.add_argument('-p', '--master-password', type=str, dest='master_password', required=False) + parser.add_argument('-m', '--mode',type=str, dest='mode',required=True,choices=['cleanup','generate']) + parser.add_argument('-a', '--amount',type=int, dest='amount_of_secret_holders',required=False,choices=range(1,9)) + parser.add_argument('-q', '--quota', type=int, dest='decryption_quota', choices=range(1,101),required=False) args = parser.parse_args() - #master_password = args.master_password - generate = Generate(args.amount_of_secret_holders, args.decryption_quota) - generate.execute() - #savePassword(master_password,decrypted_master_password_file_path) - - #print(password_groups) - - + if args.mode == 'cleanup': + cleanup = Cleanup() + exit() + + if args.mode == 'generate': + generate = Generate(args.amount_of_secret_holders, args.decryption_quota) + generate.execute() + exit() \ No newline at end of file