mirror of
https://github.com/kevinveenbirkenbach/splitted-secret.git
synced 2024-11-26 04:01:08 +01:00
Refactored to use AbstractSplittedSecret
This commit is contained in:
parent
16040178e5
commit
f547b79675
3
scripts/classes/AbstractSplittedSecret.py
Normal file
3
scripts/classes/AbstractSplittedSecret.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
class AbstractSplittedSecret:
|
||||||
|
def __init__(self):
|
||||||
|
self.encrypted_splitted_password_files_folder = "data/encrypted/splitted_password_files/"
|
@ -0,0 +1,7 @@
|
|||||||
|
from .AbstractSplittedSecret import AbstractSplittedSecret
|
||||||
|
class Cleanup(AbstractSplittedSecret):
|
||||||
|
def __init__(self):
|
||||||
|
pass
|
||||||
|
def deleteAll(self):
|
||||||
|
|
||||||
|
pass
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
class Cli():
|
class Cli(object):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.command = ''
|
self.command = ''
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
import argparse
|
import argparse
|
||||||
from classes.Generate import Generate
|
from classes.Generate import Generate
|
||||||
|
from classes.Cleanup import Cleanup
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument('-a', '--amount',type=int, dest='amount_of_secret_holders',required=True,choices=range(1,9))
|
parser.add_argument('-m', '--mode',type=str, dest='mode',required=True,choices=['cleanup','generate'])
|
||||||
parser.add_argument('-q', '--quota', type=int, dest='decryption_quota', choices=range(1,101),required=True)
|
parser.add_argument('-a', '--amount',type=int, dest='amount_of_secret_holders',required=False,choices=range(1,9))
|
||||||
#parser.add_argument('-p', '--master-password', type=str, dest='master_password', required=False)
|
parser.add_argument('-q', '--quota', type=int, dest='decryption_quota', choices=range(1,101),required=False)
|
||||||
args = parser.parse_args()
|
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()
|
Loading…
Reference in New Issue
Block a user