@@ 94,16 94,16 @@ func main() {
}
} else if !result.Dnssec {
log.Printf("No DNSSEC for %s\n", host)
- rclient.HIncrBy(context.Background(), "mitm_monitor_hosts", host, 1)
+ rclient.HIncrBy(context.Background(), "mitm_monitor_hosts", host, 2)
publish(host, fmt.Sprintf("DNSSEC failed for %s", host))
} else if !result.Daneok {
log.Printf("DANE failed for %s\n", host)
- rclient.HIncrBy(context.Background(), "mitm_monitor_hosts", host, 1)
+ rclient.HIncrBy(context.Background(), "mitm_monitor_hosts", host, 2)
publish(host, fmt.Sprintf("Certificate check failed for %s: possible MITM or you changed your public key", host))
} else {
log.Printf("Success for %s\n", host)
errCountI, _ := strconv.Atoi(errCount)
- if errCountI > 0 {
+ if errCountI > 1 {
rclient.HSet(context.Background(), "mitm_monitor_hosts", host, 0)
publish(host, fmt.Sprintf("Certificate checks passed for %s", host))
}