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

Get given domain onresultcallback #800

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions v2/pkg/resolve/resolve.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type ResolutionPool struct {

// HostEntry defines a host with the source
type HostEntry struct {
Domain string
Host string
Source string
}
Expand Down
2 changes: 1 addition & 1 deletion v2/pkg/runner/enumerate.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (r *Runner) EnumerateSingleDomainWithCtx(ctx context.Context, domain string
continue
}

hostEntry := resolve.HostEntry{Host: subdomain, Source: result.Source}
hostEntry := resolve.HostEntry{Domain: domain, Host: subdomain, Source: result.Source}

uniqueMap[subdomain] = hostEntry
// If the user asked to remove wildcard then send on the resolve
Expand Down
2 changes: 1 addition & 1 deletion v2/pkg/runner/outputter.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func writeJSONHostIP(input string, results map[string]resolve.Result, writer io.
func (o *OutputWriter) WriteHostNoWildcard(input string, results map[string]resolve.Result, writer io.Writer) error {
hosts := make(map[string]resolve.HostEntry)
for host, result := range results {
hosts[host] = resolve.HostEntry{Host: result.Host, Source: result.Source}
hosts[host] = resolve.HostEntry{Domain: host, Host: result.Host, Source: result.Source}
}

return o.WriteHost(input, hosts, writer)
Expand Down