Skip to content

Commit ca60723

Browse files
committed
added the use of DetectRegistrantPlaceholder
1 parent fe4d57b commit ca60723

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

engine/plugins/whois/domain_record.go

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ func (r *domrec) store(e *et.Event, resp *whoisparser.WhoisInfo, asset *dbt.Enti
174174
{resp.Billing, "billing_contact", base + "Billing Contact Info"},
175175
}
176176
for _, c := range contacts {
177-
if c.WhoisContact != nil {
177+
if c.WhoisContact != nil &&
178+
(c.RelationName != "registrant_contact" || !r.hasPlaceholders(c.WhoisContact)) {
178179
r.storeContact(e, c, asset, m)
179180
}
180181
}
@@ -300,3 +301,23 @@ func (r *domrec) createSimpleEdge(sess et.Session, rel oam.Relation, from, to *d
300301
})
301302
}
302303
}
304+
305+
func (r *domrec) hasPlaceholders(contact *whoisparser.Contact) bool {
306+
fields := []string{
307+
contact.Name,
308+
contact.Organization,
309+
contact.Street,
310+
contact.City,
311+
contact.Province,
312+
contact.Phone,
313+
contact.Fax,
314+
contact.Email,
315+
}
316+
317+
for _, field := range fields {
318+
if d := DetectRegistrantPlaceholder(field); d.IsPlaceholder {
319+
return true
320+
}
321+
}
322+
return false
323+
}

0 commit comments

Comments
 (0)