We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8196662 commit fe5e36eCopy full SHA for fe5e36e
helpers/helpers.go
@@ -496,8 +496,14 @@ func DoDNSEnrichment(ipaddress string) (string, string) {
496
for i, v := range dnsRecords {
497
dnsRecords[i] = strings.TrimSuffix(strings.TrimSpace(v), ".")
498
}
499
- _, m, td := tldparser.ParseDomain(dnsRecords[0])
500
- domain = fmt.Sprintf("%s.%s", m, td)
+ if len(dnsRecords) == 0 {
+ dnsRecords = append(dnsRecords, "none")
501
+ }
502
+ domain := ""
503
+ if dnsRecords[0] != "none" {
504
+ _, m, td := tldparser.ParseDomain(dnsRecords[0])
505
+ domain = fmt.Sprintf("%s.%s", m, td)
506
507
recordsJoined := strings.Join(dnsRecords, "|")
508
vars.Dnsfastcache.Set([]byte(ipaddress), []byte(recordsJoined))
509
return recordsJoined, domain
0 commit comments