small tweaks
This commit is contained in:
7
main.go
7
main.go
@@ -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))
|
||||
}
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user