summaryrefslogtreecommitdiff
path: root/tools/josef_experimental.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/josef_experimental.py')
-rwxr-xr-xtools/josef_experimental.py37
1 files changed, 22 insertions, 15 deletions
diff --git a/tools/josef_experimental.py b/tools/josef_experimental.py
index e44dcd4..6d95894 100755
--- a/tools/josef_experimental.py
+++ b/tools/josef_experimental.py
@@ -81,6 +81,15 @@ def my_get_cert_info(s):
result[key] = value
return result
+def read_sth(fn):
+ try:
+ f = open(fn)
+ except IOError, e:
+ if e.errno == errno.ENOENT:
+ return None
+ raise e
+ return json.loads(f.read())
+
base_urls = [
"https://plausible.ct.nordu.net/",
# "https://ct1.digicert-ct.com/log/",
@@ -115,21 +124,19 @@ monitored_domains = [
"symantec.com",
]
-raw_entry = get_entries(base_urls[0], 1000, 1005)["entries"]
-orig_entries = []
-
-for item in raw_entry:
- # print item
- orig_entry = extract_original_entry(item)
- cert_info = my_get_cert_info(orig_entry[0][0])
-
- print cert_info
- # for md in monitored_domains:
- # if md in cert_info["subject"]:
- # print md + " certifed by " + cert_info["issuer"]
-
- # print "\n\n"
- # print item
+data = read_sth("plausible_cert_data.json")
+ss = []
+for item in data:
+ try:
+ s = item["subject"].split("CN=")[1]
+ print s
+ except:
+ # if not item["subject"] in ss:
+ # print item["subject"]
+ # ss.append(item["subject"])
+ pass
+
+print "\nTotal entries: " + str(len(data))