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

search domain discovery: add whois lookup fallback #24

Open
wants to merge 2 commits into
base: dns_domains_fallback
Choose a base branch
from

Conversation

FR4NK-W
Copy link
Contributor

@FR4NK-W FR4NK-W commented Nov 8, 2024

Add fallback feature for discovering a valid search domain by looking up the contact information for the external public IP and deriving potential search domains from the contact addresses.

Lookup the contact information for the external public IP to derive potential search domains
@FR4NK-W FR4NK-W requested a review from marcfrei November 8, 2024 15:24
Copy link
Member

@marcfrei marcfrei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

}
)

func reverseLookupWhois(addr netip.Addr) (domains []string) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whois > WHOIS for consistency with the names of the variables above?

return extractEmailDomains(response)
}

func resolveWhoisRedirects(addr netip.Addr, server string) (response string, err error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whois > WHOIS?

return
}

func queryWhois(serverTCPAddr *net.TCPAddr, queryAddr netip.Addr) (response string, err error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whois > WHOIS?

func queryWhois(serverTCPAddr *net.TCPAddr, queryAddr netip.Addr) (response string, err error) {
var tcpConn *net.TCPConn
var responseBuff []byte
tcpConn, err = net.DialTCP("tcp", nil, serverTCPAddr)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need timeouts for this operation, i.e., use net.DialTimeout plus SetDeadline on the resulting connection?

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

Successfully merging this pull request may close these issues.

2 participants