mirror of
https://github.com/certbot/certbot.git
synced 2026-08-02 00:22:28 +02:00
Merge branch 'misc' of ssh://github.com/EFForg/starttls-everywhere into misc
This commit is contained in:
@@ -15,8 +15,15 @@ from collections import defaultdict
|
|||||||
|
|
||||||
csvreader = csv.reader(codecs.open(sys.argv[1], "rU", "utf-8"), delimiter=',', quotechar='"')
|
csvreader = csv.reader(codecs.open(sys.argv[1], "rU", "utf-8"), delimiter=',', quotechar='"')
|
||||||
d = defaultdict(set)
|
d = defaultdict(set)
|
||||||
for (address_suffix, hostname_suffix, direction, region, fraction_encrypted) in csvreader:
|
# Google's report doesn't include gmail.com because it's local delivery, but we
|
||||||
|
# know they support STARTTLS, so manually include them.
|
||||||
|
d["gmail.com"] = set([1])
|
||||||
|
for (address_suffix, hostname_suffix, direction, region, region_name, fraction_encrypted) in csvreader:
|
||||||
if direction == "outbound":
|
if direction == "outbound":
|
||||||
|
# Some domains exist in many TLDs and are summarized as, e.g. yahoo.{...}.
|
||||||
|
# We're tryingto get a solid list of the relevant TLDs, but in the meantime
|
||||||
|
# just use .com.
|
||||||
|
address_suffix = address_suffix.replace("{...}", "com")
|
||||||
try:
|
try:
|
||||||
d[address_suffix].add(float(fraction_encrypted))
|
d[address_suffix].add(float(fraction_encrypted))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
@@ -24,4 +31,4 @@ for (address_suffix, hostname_suffix, direction, region, fraction_encrypted) in
|
|||||||
|
|
||||||
for address_suffix, fraction_encrypted in d.iteritems():
|
for address_suffix, fraction_encrypted in d.iteritems():
|
||||||
if min(fraction_encrypted) >= 0.99:
|
if min(fraction_encrypted) >= 0.99:
|
||||||
print min(fraction_encrypted), address_suffix
|
print address_suffix
|
||||||
|
|||||||
Reference in New Issue
Block a user