Update README.md and Add Message Box

This commit is contained in:
Narbeh 2018-04-23 10:39:03 +04:30
parent 9a63168982
commit d8a2be6f59
2 changed files with 16 additions and 1 deletions

View File

@ -224,6 +224,13 @@ cert_sn,338163108483756707389368573553026254634358
## Todo
- Enable timeout for connections and handshakes
- HTML export ability
### Author ### Author
Narbeh Arakil Narbeh Arakil

View File

@ -44,6 +44,14 @@ def get_cert(host, port, user_args):
return cert return cert
def border_msg(message):
"""Print the message in the box."""
row = len(message)
h = ''.join(['+'] + ['-' * row] + ['+'])
result = h + '\n' "|" + message + "|"'\n' + h
print(result)
def analyze_ssl(host, context): def analyze_ssl(host, context):
"""Analyze the security of the SSL certificate.""" """Analyze the security of the SSL certificate."""
from json import loads from json import loads
@ -147,7 +155,7 @@ def show_result(user_args):
hosts = user_args.hosts hosts = user_args.hosts
if not user_args.json_true: if not user_args.json_true:
print('Analyzing {} host(s):\n{}\n'.format(len(hosts), '-' * 21)) border_msg('Analyzing {} host(s)'.format(len(hosts)))
if not user_args.json_true and user_args.analyze: if not user_args.json_true and user_args.analyze:
print('{}Warning: -a/--analyze is enabled. It takes more time...{}\n'.format(Clr.YELLOW, Clr.RST)) print('{}Warning: -a/--analyze is enabled. It takes more time...{}\n'.format(Clr.YELLOW, Clr.RST))