def main(self):
domain = self.get_options('domain')
if "://" in domain:
domain = domain.split("://")[1]
if domain[:-1] == "/":
domain = domain[-1]
try:
response = subprocess.check_output(["sslyze", "--regular", domain])
if response != "":
explode = response.split('\n')
for line in explode:
self.export.append(line)
print Fore.BLUE + "* " + Style.RESET_ALL + line
else:
print Fore.RED + "* " + Style.RESET_ALL + "Can't get SSL/TLS with sslyze"
except OSError as e:
if e.errno == os.errno.ENOENT:
print e
else:
# Something else went wrong while trying to run `sslyze`
raise
评论列表
文章目录