Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on May 15, 2024. It is now read-only.

Commit 7081173

Browse files
Merge branch 'release/0.1' into main
2 parents bd41183 + 999398b commit 7081173

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

‎config.yaml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ JSONFILE: "./DATA/metasploit-framework/db/modules_metadata_base.json"
66
MTSP_OUTFILE_CVE: "./DATA/metasploit_cves.csv"
77
MTSP_OUTFILE_ALL: "./DATA/metasploit_all_vul_ids.csv"
88
N_RECS: 5
9+
10+
# DEBUG=true overrides VERBOSE
11+
DEBUG: true
12+
VERBOSE: true

‎main.py‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
from mtsp_parser.repo_manager import RepoManager
99

1010
logger = logging.getLogger()
11-
logger.setLevel(logging.DEBUG)
11+
# we now set this in main
12+
# logger.setLevel(logging.DEBUG)
1213
hdlr = logging.StreamHandler(sys.stderr)
1314
logger.addHandler(hdlr)
1415

@@ -23,10 +24,22 @@ def read_config(cfgfile):
2324
if __name__ == '__main__':
2425
# load config
2526
cfg = read_config(CONFIGFILE)
27+
DEBUG = cfg['DEBUG']
28+
VERBOSE = cfg['VERBOSE']
29+
30+
if DEBUG:
31+
logger.setLevel(logging.DEBUG)
32+
elif VERBOSE:
33+
logger.setLevel(logging.INFO)
34+
else:
35+
logger.setLevel(logging.WARN)
36+
2637
logger.debug("Config values:")
2738
for k,v in cfg.items():
2839
logger.debug(f"\t{k}: {v}")
2940

41+
42+
3043
local_data_ = cfg['LOCAL_DATA']
3144
clone_to_ = cfg['CLONE_TARGET']
3245
clone_from_ = cfg['GIT_REPO']

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /