Refactor Code and Update README.md

This commit is contained in:
Narbeh
2018-04-19 11:28:07 +04:30
parent f6d05ca3b9
commit 1dee91b82c
2 changed files with 11 additions and 12 deletions
+2 -3
View File
@@ -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)