jimen0/fdns

proposal: allow wildcard searches

uBadRequest opened this issue · 1 comments

I'm looking to be able to find all the domains that contain a specific keyword, would you be able to add a flag for wildcard and returning just the top domain?

Hi @uBadRequest,

Thanks for your proposal. Could you please detail it a bit more? Currently, fdns accepts a set of domains it looks for. Its main use case is to be used as a library and not as a CLI tool, so I'm not sure if your proposal fits my project's goal, but I want to know more about it before declining it or implementing it.

Would you like to be able to support arbitrary strings instead of full domains in the parser? See:

fdns/fdns.go

Lines 92 to 100 in 346db72

// IsInterestingDomain reports if the domain contains an interesting domain.
func (p *Parser) IsInterestingDomain(e entry) bool {
for _, d := range p.Domains {
if strings.HasSuffix(e.Name, d) {
return true
}
}
return false
}

So, instead of complete domains and querying for entries with that suffixes, just plain strings and querying for entries that contain them, right?

Just for your information, they would have to be raw strings, I'm not planning to add support for regular expressions by any means.

Thanks,