diff --git a/analyze.py b/analyze.py index 991354b..3acc4b6 100755 --- a/analyze.py +++ b/analyze.py @@ -307,6 +307,8 @@ def process_results(data, level=None, do_json=False): json_output['compliance'] = False if json_output['level'] == json_output['target_level']: json_output['compliance'] = True + if operator: + json_output['operator'] = operator else: print(results['target'] + " has " + evaluate_all(results) + " ssl/tls") except TypeError, e: @@ -411,6 +413,8 @@ def main(): help='path to openssl binary, if you don\'t like the default') parser.add_argument('-j', dest='json', action='store_true', help='output results in json format') + parser.add_argument('--ops', dest='operator', + help='optional name of the operator\'s team added into the JSON output (for database insertion)') args = parser.parse_args() if args.debug: @@ -418,6 +422,11 @@ def main(): else: logging.basicConfig(stream=sys.stderr, level=logging.INFO) + global operator + operator='' + if args.operator: + operator=args.operator + build_ciphers_lists(args.openssl) if args.target: