mirror of
https://github.com/jtesta/ssh-audit.git
synced 2024-12-22 00:55:10 +01:00
* fix for https://github.com/jtesta/ssh-audit/issues/280 * changed json format to min. the damage for a change
This commit is contained in:
parent
ea117b203b
commit
bc2a89eb11
@ -735,7 +735,7 @@ def evaluate_policy(out: OutputBuffer, aconf: AuditConf, banner: Optional['Banne
|
||||
|
||||
passed, error_struct, error_str = aconf.policy.evaluate(banner, kex)
|
||||
if aconf.json:
|
||||
json_struct = {'host': aconf.host, 'policy': aconf.policy.get_name_and_version(), 'passed': passed, 'errors': error_struct}
|
||||
json_struct = {'host': aconf.host, 'port': aconf.port, 'policy': aconf.policy.get_name_and_version(), 'passed': passed, 'errors': error_struct}
|
||||
out.info(json.dumps(json_struct, indent=4 if aconf.json_print_indent else None, sort_keys=True))
|
||||
else:
|
||||
spacing = ''
|
||||
|
Loading…
Reference in New Issue
Block a user