Refactor Code and Update README.md
This commit is contained in:
parent
f6d05ca3b9
commit
1dee91b82c
18
README.md
18
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
|
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:
|
Analyzing 7 hosts:
|
||||||
|
|
||||||
[+] test.com
|
[+] test.com Expired: False
|
||||||
[+] narbeh.org
|
[+] narbeh.org Expired: False
|
||||||
[+] archive.org
|
[+] archive.org Expired: False
|
||||||
[-] facebook.com failed: [Errno 111] Connection refused
|
[-] facebook.com Failed: [Errno 111] Connection refused
|
||||||
[-] twitter.com failed: [Errno 111] Connection refused
|
[-] twitter.com Failed: [Errno 111] Connection refused
|
||||||
[+] github.com
|
[+] github.com Expired: False
|
||||||
[+] google.com
|
[+] google.com Expired: False
|
||||||
|
|
||||||
5 successful and 2 failed.
|
5 successful and 2 failed
|
||||||
```
|
```
|
||||||
@ -81,12 +81,11 @@ def show_result(hosts):
|
|||||||
try:
|
try:
|
||||||
cert = get_cert(host, port)
|
cert = get_cert(host, port)
|
||||||
context[host] = get_cert_info(cert)
|
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:
|
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
|
failed_cnt += 1
|
||||||
|
|
||||||
|
|
||||||
print('\n{} successful and {} failed\n'.format(len(hosts) - failed_cnt, failed_cnt))
|
print('\n{} successful and {} failed\n'.format(len(hosts) - failed_cnt, failed_cnt))
|
||||||
|
|
||||||
pprint(context)
|
pprint(context)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user