summaryrefslogtreecommitdiff
path: root/whois.go
diff options
context:
space:
mode:
Diffstat (limited to 'whois.go')
-rw-r--r--whois.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/whois.go b/whois.go
index 7e0a50e..bd4377e 100644
--- a/whois.go
+++ b/whois.go
@@ -59,6 +59,9 @@ func findIPBlock(domains ...string) (pairs map[string]string, err error) {
pairs = make(map[string]string, len(lines)-2)
for _, line := range lines[1 : len(lines)-1] {
content := strings.Split(line, "|")
+ if len(content) < 3 {
+ continue
+ }
ipaddr := strings.TrimSpace(content[1])
ipb := strings.TrimSpace(content[2])
pairs[ipaddr] = ipb