diff options
Diffstat (limited to 'monitor/josef_monitor.py')
-rwxr-xr-x | monitor/josef_monitor.py | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/monitor/josef_monitor.py b/monitor/josef_monitor.py index f33039a..6c189ca 100755 --- a/monitor/josef_monitor.py +++ b/monitor/josef_monitor.py @@ -133,11 +133,12 @@ class ctlog: self.log("Failed to fetch STH. " +str(e)) return - try: - check_sth_signature(self.url, new_sth, base64.b64decode(self.key)) - except: - self.log("ERROR: Could not verify STH signature") - print "ERROR: Could not verify STH signature from " + self.url + # try: + check_sth_signature(self.url, new_sth, base64.b64decode(self.key)) + # check_sth_signature(self.url, new_sth, None) + # except: + # self.log("ERROR: Could not verify STH signature") + # print "ERROR: Could not verify STH signature from " + self.url sth_time = datetime.datetime.fromtimestamp(new_sth['timestamp'] / 1000, UTC()).strftime("%Y-%m-%d %H:%M:%S") if new_sth["timestamp"] != self.sth["timestamp"]: @@ -443,17 +444,17 @@ def main(args): open(CONFIG.DOMAINS_FILE, 'w').write(json.dumps(domain_dict)) # Something went horribly wrong! - except Exception, err: - print Exception, err - for log in logs: - log.save() - - # Save info about monitored domains - domain_dict = [] - if len(monitored_domains) > 0: - for md in monitored_domains: - domain_dict.append(md.to_dict()) - open(CONFIG.DOMAINS_FILE, 'w').write(json.dumps(domain_dict)) + # except Exception, err: + # print Exception, err + # for log in logs: + # log.save() + + # # Save info about monitored domains + # domain_dict = [] + # if len(monitored_domains) > 0: + # for md in monitored_domains: + # domain_dict.append(md.to_dict()) + # open(CONFIG.DOMAINS_FILE, 'w').write(json.dumps(domain_dict)) |