mirror of
https://github.com/mozilla/cipherscan.git
synced 2024-11-22 06:13:42 +01:00
add operator flag to analyze.py
This commit is contained in:
parent
cdd34fce03
commit
b009c71321
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user