diff options
-rwxr-xr-x | monitor/josef_experimental.py | 15 | ||||
-rw-r--r-- | monitor/josef_lib.py | 5 |
2 files changed, 12 insertions, 8 deletions
diff --git a/monitor/josef_experimental.py b/monitor/josef_experimental.py index 608c655..255c883 100755 --- a/monitor/josef_experimental.py +++ b/monitor/josef_experimental.py @@ -184,15 +184,16 @@ if __name__ == '__main__': # Experimental - # if True: - # log = CTLOGS[0] - # entries = get_entries(log["url"],1000 ,1001)["entries"] - # entry = entries[0] - # res = check_domain_extended(entry) - # print parse_entry(res,0,log) + if True: + log = CTLOGS[9] + entries = get_entries(log["url"],1 ,1)["entries"] + entry = entries[0] + print check_domain_all(entry) + # res = check_domain_extended(entry) + # print parse_entry(res,0,log) # Data gathering for Niklas - if True: + if False: logs = [CTLOGS[9]] for log in logs: filename = log["name"] + "_content.txt" diff --git a/monitor/josef_lib.py b/monitor/josef_lib.py index c5cddf7..4e5278d 100644 --- a/monitor/josef_lib.py +++ b/monitor/josef_lib.py @@ -272,7 +272,10 @@ def my_get_more_cert_info(s): if "Subject Alternative Name" in prev: result["SAN"] = line.lstrip() if "Serial Number:" in prev: - result["serial"] = line.lstrip() + if len(prev.split("Serial Number:")) == 1: + result["serial"] = line.lstrip() + else: + result["serial"] = prev.split("Serial Number: ")[1] if "Not After" in line: result["not_after"] = line.split(": ")[1] if "Not Before" in line: |