mirror of
https://github.com/mozilla/cipherscan.git
synced 2024-11-22 14:23:41 +01:00
add ability to ignore results from untrusted servers
This commit is contained in:
parent
167ef8b502
commit
9f43f3df2d
@ -9,6 +9,8 @@ import sys
|
|||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
report_untrused=False
|
||||||
|
|
||||||
cipherstats = defaultdict(int)
|
cipherstats = defaultdict(int)
|
||||||
pfsstats = defaultdict(int)
|
pfsstats = defaultdict(int)
|
||||||
protocolstats = defaultdict(int)
|
protocolstats = defaultdict(int)
|
||||||
@ -43,6 +45,7 @@ for r,d,flist in os.walk(path):
|
|||||||
TLS1_2 = False
|
TLS1_2 = False
|
||||||
dualstack = False
|
dualstack = False
|
||||||
ECDSA = False
|
ECDSA = False
|
||||||
|
trusted = False
|
||||||
|
|
||||||
""" process the file """
|
""" process the file """
|
||||||
f_abs = os.path.join(r,f)
|
f_abs = os.path.join(r,f)
|
||||||
@ -62,6 +65,9 @@ for r,d,flist in os.walk(path):
|
|||||||
""" loop over list of ciphers """
|
""" loop over list of ciphers """
|
||||||
for entry in results['ciphersuite']:
|
for entry in results['ciphersuite']:
|
||||||
|
|
||||||
|
if 'True' in entry['trusted']:
|
||||||
|
trusted = True
|
||||||
|
|
||||||
""" store the ciphers supported """
|
""" store the ciphers supported """
|
||||||
if 'AES-GCM' in entry['cipher']:
|
if 'AES-GCM' in entry['cipher']:
|
||||||
if not AESGCM:
|
if not AESGCM:
|
||||||
@ -126,6 +132,10 @@ for r,d,flist in os.walk(path):
|
|||||||
TLS1_2 = True
|
TLS1_2 = True
|
||||||
json_file.close()
|
json_file.close()
|
||||||
|
|
||||||
|
""" don't store stats from unusued servers """
|
||||||
|
if report_untrused == False and trusted == False:
|
||||||
|
continue
|
||||||
|
|
||||||
""" done with this file, storing the stats """
|
""" done with this file, storing the stats """
|
||||||
if DHE or ECDHE:
|
if DHE or ECDHE:
|
||||||
pfsstats['Support PFS'] += 1
|
pfsstats['Support PFS'] += 1
|
||||||
|
Loading…
Reference in New Issue
Block a user