small tweaks

This commit is contained in:
2024-01-19 17:43:40 -06:00
parent c1739856ce
commit 567cfe8083
6 changed files with 20 additions and 12795 deletions

View File

@@ -56,8 +56,8 @@ func main() {
}
}
if len(cves) == 0 {
if err := dns.Delete("istheinternetonfire.app", "TXT"); err != nil {
config.Cfg.Log.Error("unable to delete dns record", "error", err)
if err := dns.Update("istheinternetonfire.app", "TXT", "Safe for now!"); err != nil {
config.Cfg.Log.Error("unable to update dns record", "error", err)
time.Sleep(time.Second * time.Duration(config.Cfg.RefreshSeconds))
continue
}
@@ -70,10 +70,11 @@ func main() {
txtData += fmt.Sprintf("%s - %s - %s\n", v.CveID, v.Product, v.ShortDescription)
}
if err := dns.Update("istheinternetonfire.app", "TXT", txtData); err != nil {
config.Cfg.Log.Error("unable to add dns record", "error", err)
config.Cfg.Log.Error("unable to update dns record", "error", err)
time.Sleep(time.Second * time.Duration(config.Cfg.RefreshSeconds))
continue
}
time.Sleep(time.Second * time.Duration(config.Cfg.RefreshSeconds))
}
}()