From bdee87c7d3cbb0f5730485fc0e28c92faceb9166 Mon Sep 17 00:00:00 2001 From: Andris Raugulis Date: Thu, 8 Sep 2016 19:00:35 +0300 Subject: [PATCH] Do not use padding, when outputting in batch mode. --- ssh-audit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ssh-audit.py b/ssh-audit.py index 87181fe..f4d20cf 100755 --- a/ssh-audit.py +++ b/ssh-audit.py @@ -768,7 +768,7 @@ def output_algorithm(alg_type, alg_name, alg_max_len=0): prefix = '(' + alg_type + ') ' if alg_max_len == 0: alg_max_len = len(alg_name) - padding = ' ' * (alg_max_len - len(alg_name)) + padding = '' if out.batch else ' ' * (alg_max_len - len(alg_name)) texts = [] if alg_name in KexDB.ALGORITHMS[alg_type]: alg_desc = KexDB.ALGORITHMS[alg_type][alg_name] @@ -830,7 +830,7 @@ def output_security_cve(software, padlen): if not software.version_between(vfrom, vtill): continue cve, cvss, descr = line[2:5] - padding = ' ' * (padlen - len(cve)) + padding = '' if out.batch else ' ' * (padlen - len(cve)) out.fail('(cve) {0}{1} -- ({2}) {3}'.format(cve, padding, cvss, descr))