Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output to file doesn't support TLDs with multiple periods #55

Open
NoamResnick opened this issue Apr 18, 2022 · 0 comments
Open

Output to file doesn't support TLDs with multiple periods #55

NoamResnick opened this issue Apr 18, 2022 · 0 comments

Comments

@NoamResnick
Copy link

The outputToFile function splits the target host on "." and sets the domain to the first result and the tld to the second.
The issue is with target tlds with multiple ".", (eg. com.br, co.il, co.uk, etc.)
the resulting tld loses everything after the first period (eg. com, co, etc).

for _, r := range results {
	wg.Add(1)
	s := strings.Split(r[0], ".")
	domain, tld := s[0], s[1]
	go doLookups(r[1], domain, tld, out, *resolve, *geolocate, *whoisflag)
}

the fix should be as simple as changing Split(r[0] ".") to SplitN(r[0], ".", 2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant