-
Notifications
You must be signed in to change notification settings - Fork 3
/
run_cheshire_cat.py
40 lines (33 loc) · 1.64 KB
/
run_cheshire_cat.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
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env python2
"""
Copyright (c) 2012 Alexander Abbott
This file is part of the Cheshire Cyber Defense Scoring Engine (henceforth
referred to as Cheshire).
Cheshire is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
Cheshire is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
more details.
You should have received a copy of the GNU Affero General Public License
along with Cheshire. If not, see <http://www.gnu.org/licenses/>.
"""
import sys, argparse
from CheshireCat import create_app, run_app
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("-d", "--config-dir", help="The directory in which the config is located")
parser.add_argument("-c", "--config-file", help="The filename of the config file (without the directory name)")
parser.add_argument("-s", "--configspec-file", help="The filename of the configspec file (without the directory name)")
args = parser.parse_args()
kwargs = {}
if args.config_dir is not None:
kwargs['_config_dir'] = args.config_dir
if args.config_file is not None:
kwargs['_config_filename'] = args.config_file
if args.configspec_file is not None:
kwargs['_configspec_filename'] = args.configspec_file
create_app(**kwargs)
run_app()