Skip to content

Commit

Permalink
Add failed in json output
Browse files Browse the repository at this point in the history
  • Loading branch information
narbehaj committed Jun 6, 2024
1 parent 10694d8 commit be60001
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ssl_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,12 @@ def show_result(self, user_args):
if not user_args.json_true and not user_args.summary_true:
self.print_status(host, context, user_args.analyze)
except SSL.SysCallError:
context[host] = 'failed'
if not user_args.json_true:
print('\t{}[\u2717]{} {:<20s} Failed: Misconfigured SSL/TLS\n'.format(Clr.RED, Clr.RST, host))
self.total_failed += 1
except Exception as error:
context[host] = 'failed'
if not user_args.json_true:
print('\t{}[\u2717]{} {:<20s} Failed: {}\n'.format(Clr.RED, Clr.RST, host, error))
self.total_failed += 1
Expand Down

0 comments on commit be60001

Please sign in to comment.