diff --git a/README.md b/README.md index da0d51c..f476332 100644 --- a/README.md +++ b/README.md @@ -23,13 +23,13 @@ Port is optional here. The script will use 443 if not specified. narbeh@narbeh-xps:~/ssl-checker$ python ssl_checker.py test.com narbeh.org:443 archive.org facebook.com:443 twitter.com github.com google.com Analyzing 7 hosts: - [+] test.com - [+] narbeh.org - [+] archive.org - [-] facebook.com failed: [Errno 111] Connection refused - [-] twitter.com failed: [Errno 111] Connection refused - [+] github.com - [+] google.com + [+] test.com Expired: False + [+] narbeh.org Expired: False + [+] archive.org Expired: False + [-] facebook.com Failed: [Errno 111] Connection refused + [-] twitter.com Failed: [Errno 111] Connection refused + [+] github.com Expired: False + [+] google.com Expired: False -5 successful and 2 failed. -``` +5 successful and 2 failed +``` \ No newline at end of file diff --git a/ssl_checker.py b/ssl_checker.py index 7e70e5f..9f588b7 100644 --- a/ssl_checker.py +++ b/ssl_checker.py @@ -81,12 +81,11 @@ def show_result(hosts): try: cert = get_cert(host, port) context[host] = get_cert_info(cert) - print('\t{}[+]{} {}'.format(Clr.GREEN, Clr.RST, host)) + print('\t{}[+]{} {:<20s} Expired: {}'.format(Clr.GREEN, Clr.RST, host, context[host]['cert_exp'])) except Exception as error: - print('\t{}[-]{} {:<20s} failed: {}'.format(Clr.RED, Clr.RST, host, error)) + print('\t{}[-]{} {:<20s} Failed: {}'.format(Clr.RED, Clr.RST, host, error)) failed_cnt += 1 - print('\n{} successful and {} failed\n'.format(len(hosts) - failed_cnt, failed_cnt)) pprint(context)