-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart_test
executable file
·21 lines (19 loc) · 990 Bytes
/
start_test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python
from verifier.verifier import verify, export_evidences, process_evidence
from verifier.evidence_savers import evidence_savers
import argparse
parser = argparse.ArgumentParser("Automatically verify issues for host")
parser.add_argument("target", nargs='+', help="Target to verify the issues for")
parser.add_argument("-s", "--save", nargs='?', default=argparse.SUPPRESS, choices=evidence_savers.keys(), help="Save the issue using the default issue saver")
parser.add_argument('-l', '--lang', default="en", help="Reporting language")
parser.add_argument('-x', '--export_file', help="File to export results to")
args, extra_args = parser.parse_known_args()
evidences = []
try:
for evidence in verify(['all'], args.target, save=args.save, extra_args=extra_args, lang=args.lang):
if evidence:
process_evidence(evidence)
evidences.append(evidence)
finally:
if args.export_file:
export_evidences(evidences, args.export_file)