-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkeepass-tools.py
30 lines (21 loc) · 882 Bytes
/
keepass-tools.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from pykeepass import PyKeePass
import sys
import os.path
import argparse
def handle_sys_args():
parser = argparse.ArgumentParser()
parser.add_argument("database", help="is the database file that you want to prove", type=str)
parser.add_argument("-p", "--password", help="is the password", type=str, required=False)
parser.add_argument("-k", "--keyfile", help="is your key file", type=str, required=False)
parser.add_argument("-u", "--update", help="", required=False)
parser.add_argument("-v", "--version", help="", required=False)
args = parser.parse_args()
#handle_update(args.update)
#handle_version(args.version)
return args.database, args.password, args.keyfile
def handle_update():
print('Update function running')
def main():
database, password, keyfile = handle_sys_args()
if __name__=='__main__':
main()