diff options
author | Josef Gustafsson <josef.gson@gmail.com> | 2015-09-07 10:12:42 +0200 |
---|---|---|
committer | Josef Gustafsson <josef.gson@gmail.com> | 2015-09-07 10:12:42 +0200 |
commit | 1be99e982addacb96724c22c23bc5786cd2de9cd (patch) | |
tree | f9c4c184526fc46d62eec7e520a95aa1123698f6 /tools/josef_experimental_auditor.py | |
parent | 6528346d374b2e8430851901f1a1946e921bac4b (diff) |
implementing continous incremental build from entries
Diffstat (limited to 'tools/josef_experimental_auditor.py')
-rwxr-xr-x | tools/josef_experimental_auditor.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/tools/josef_experimental_auditor.py b/tools/josef_experimental_auditor.py index a27da17..96a84ac 100755 --- a/tools/josef_experimental_auditor.py +++ b/tools/josef_experimental_auditor.py @@ -18,7 +18,7 @@ DEFAULT_CUR_FILE = 'all-sth.json' base_urls = [ # "https://plausible.ct.nordu.net/", # "https://ct1.digicert-ct.com/log/", - # "https://ct.izenpe.com/", + "https://ct.izenpe.com/", # "https://log.certly.io/", # "https://ct.googleapis.com/aviator/", # "https://ct.googleapis.com/pilot/", @@ -427,19 +427,21 @@ def main(args): if args.monitor: # Run for one log only - url = base_urls[0] + # url = base_urls[0] + all_subtrees = {} print time.strftime('%H:%M:%S') + " Building trees from entries. This may take a while, go get coffee or something..." - # sth[url]["tree_size"] -= 100 - subtree = fetch_and_build_subtree(sth, url) - verify_subtree(sth, subtree, url) + for url in base_urls: + all_subtrees[url] = fetch_and_build_subtree(sth, url) + verify_subtree(sth, all_subtrees[url], url) while True: time.sleep(30) new_sth = fetch_all_sth() - if sth[url]["tree_size"] != new_sth[url]["tree_size"]: - subtree = fetch_and_increment_subtree(sth, new_sth, subtree, url) - verify_subtree(sth, subtree, url) - sth = new_sth + for url in base_urls: + if sth[url]["tree_size"] != new_sth[url]["tree_size"]: + all_subtrees[url] = fetch_and_increment_subtree(sth, new_sth, all_subtrees[url], url) + verify_subtree(sth, all_subtrees[url], url) + sth = new_sth if __name__ == '__main__': |