From 9daa0a69d925c7ae69d61e4441b732ca67637f91 Mon Sep 17 00:00:00 2001 From: Narbeh Arakil Date: Sat, 29 Jun 2019 00:42:40 +0430 Subject: [PATCH] Fix Input File New Error --- ssl_checker.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ssl_checker.py b/ssl_checker.py index ae24f22..6ebe2bc 100755 --- a/ssl_checker.py +++ b/ssl_checker.py @@ -165,9 +165,10 @@ def print_status(host, context, analyze=False): print('\t\tDrown vulnerability: {}'.format(context[host]['drownVulnerable'])) print('\t\tExpired: {}'.format(context[host]['cert_exp'])) - print('\t\tCertificate SANs: ') + print('\t\tCertificate SAN\'s: ') + for san in context[host]['cert_sans'].split(';'): - print('\t\t\t{}'.format(san)) + print('\t\t \\_ {}'.format(san.strip())) def show_result(user_args): @@ -276,9 +277,8 @@ def get_args(): # Get hosts from file if provided if args.host_file: - hosts_file = open(args.host_file, 'r') - args.hosts = hosts_file.readlines() - hosts_file.close() + with open(args.host_file) as f: + args.hosts = f.read().splitlines() # Checks hosts list if isinstance(args.hosts, list):