diff --git a/main.go b/main.go
index c24a9a5..693af64 100644
--- a/main.go
+++ b/main.go
@@ -33,6 +33,7 @@ import (
"html/template"
"io"
"log"
+ "net"
"net/http"
"os"
"time"
@@ -51,8 +52,7 @@ type HatsSite struct {
Registrant *whoisparser.Contact
ScreenshotURL template.URL
Title string
- HTTPOpen bool
- HTTPSOpen bool
+ Notes template.HTML
}
func getSites(largest int, wd selenium.WebDriver) (sites []HatsSite, err error) {
@@ -82,6 +82,13 @@ func getSites(largest int, wd selenium.WebDriver) (sites []HatsSite, err error)
hatsSite.Registrar = result.Registrar
hatsSite.Registrant = result.Registrant
+ _, err = net.LookupHost(hatsSite.DomainName)
+ if err != nil {
+ hatsSite.Notes = template.HTML(fmt.Sprintf("DNS Error: %v
", err.Error()))
+ sites = append(sites, hatsSite)
+ continue
+ }
+
// Get web page, take screenshot
err = wd.Get(fmt.Sprintf("http://%v/", hatsSite.DomainName))
if err != nil {
diff --git a/template.html b/template.html
index d43705a..bc819dd 100644
--- a/template.html
+++ b/template.html
@@ -40,6 +40,10 @@