Some Refactors
This commit is contained in:
parent
f358f58eaf
commit
6884c2660d
@ -117,7 +117,7 @@ def get_cert_info(host, cert):
|
||||
context['issuer_ou'] = cert.get_issuer().organizationalUnitName
|
||||
context['issuer_cn'] = cert.get_issuer().commonName
|
||||
context['cert_sn'] = cert.get_serial_number()
|
||||
context['cert_sha1'] = cert.digest("sha1")
|
||||
context['cert_sha1'] = cert.digest('sha1')
|
||||
context['cert_alg'] = cert.get_signature_algorithm().decode()
|
||||
context['cert_ver'] = cert.get_version()
|
||||
context['cert_sans'] = get_cert_sans(cert)
|
||||
@ -180,7 +180,7 @@ def show_result(user_args):
|
||||
hosts = user_args.hosts
|
||||
|
||||
if not user_args.json_true:
|
||||
border_msg('Analyzing {} host(s)'.format(len(hosts)))
|
||||
border_msg(' Analyzing {} host(s) '.format(len(hosts)))
|
||||
|
||||
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))
|
||||
@ -211,7 +211,7 @@ def show_result(user_args):
|
||||
sys.exit(1)
|
||||
|
||||
if not user_args.json_true:
|
||||
print('\n{} successful and {} failed\n'.format(len(hosts) - failed_cnt, failed_cnt))
|
||||
border_msg(' {} successful and {} failed '.format(len(hosts) - failed_cnt, failed_cnt))
|
||||
|
||||
# CSV export if -c/--csv is specified
|
||||
if user_args.csv_enabled:
|
||||
|
||||
2
test.csv
Normal file
2
test.csv
Normal file
@ -0,0 +1,2 @@
|
||||
issued_to,cert_sans,valid_till,valid_from,issuer_ou,cert_ver,cert_alg,issued_o,cert_exp,cert_sha1,issuer_c,issuer_cn,issuer_o,validity_days,cert_sn
|
||||
*.snapp.ir,DNS:*.snapp.ir; DNS:snapp.ir,2020-06-26,2018-06-27,Certum Certification Authority,2,sha256WithRSAEncryption,,False,0E:B0:2A:18:11:84:E0:D1:2B:F5:45:8B:60:12:D6:7C:3C:C3:EB:3F,PL,Certum Domain Validation CA SHA2,Unizeto Technologies S.A.,730,119113201785671136860518844406779440954
|
||||
|
Loading…
x
Reference in New Issue
Block a user