You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A lightweight Go library for passive reconnaissance of domains, discovering subdomains and URLs by querying public APIs. Scout provides a minimal, dependency-light approach to target enumeration for security testing.
Features
Ergonomic iterator-based API
Concurrent source querying with configurable parallelism
Automatic deduplication across all sources
Context-aware with timeout support
Minimal dependencies
Supported Result Types
Scout can discover:
Type
Description
Subdomains
Subdomains of the target domain (e.g., api.example.com)
URLs
Full URLs under the target domain (e.g., https://example.com/path)
Quick Start
go get github.com/go-appsec/scout@latest
package main
import (
"context""fmt""github.com/go-appsec/scout"
)
funcmain() {
ctx:=context.Background()
// Query all subdomain sources for a domainforsub, err:=rangescout.Subdomains(ctx, "example.com") {
iferr!=nil {
// Ignore or handle errors, usually rate limitscontinue
}
fmt.Println(sub)
}
}
Usage Examples
Query All Sources
ctx:=context.Background()
// Get both subdomains and URLs from all sourcesforresult, err:=rangescout.Query(ctx, "example.com") {
iferr!=nil {
// Ignore or handle errors, usually rate limitscontinue
}
fmt.Printf("[%s] %s: %s\n", result.Source, result.Type, result.Value)
}
Query URLs Only
// Get only URLs from URL-yielding sourcesforurl, err:=rangescout.URLs(ctx, "example.com") {
iferr==nil {
fmt.Println(url)
}
}
Parallelism and Timeouts
// Configure parallelism and timeoutforsub, err:=rangescout.Subdomains(ctx, "example.com",
scout.WithParallelism(4), // 4 sources at oncescout.WithTimeout(30*time.Second), // 30s per source
) {
iferr==nil {
fmt.Println(sub)
}
}
Rate Limiting
// Apply global and per-source rate limitsforsub, err:=rangescout.Subdomains(ctx, "example.com",
scout.WithGlobalRateLimit(10), // 10 req/sec globallyscout.WithSourceRateLimit("commoncrawl", 0.25), // 15 req/min for commoncrawl
) {
iferr==nil {
fmt.Println(sub)
}
}
API Keys for Enhanced Limits
// Some sources support optional API keys for higher rate limitsforsub, err:=rangescout.Subdomains(ctx, "example.com",
scout.WithAPIKey("virustotal", "your-api-key"),
scout.WithAPIKey("shodan", "your-api-key"),
) {
// Process results...
}
API Reference
Functions
Function
Description
Query(ctx, domain, ...opts)
Query sources and yield all results (subdomains and URLs)
Subdomains(ctx, domain, ...opts)
Query sources and yield only subdomains
URLs(ctx, domain, ...opts)
Query sources and yield only URLs
Options
Option
Description
WithSources([]Source)
Specify which sources to query
WithParallelism(n)
Set concurrent source count (default: NumCPU×2)
WithTimeout(duration)
Set per-source timeout (default: 30s)
WithGlobalRateLimit(rps)
Set global rate limit (requests/second)
WithSourceRateLimit(name, rps)
Set per-source rate limit
WithHTTPClient(client)
Use custom HTTP client
WithAPIKey(source, key)
Set API key for a source
Source Registry
Function
Description
sources.All()
Get all registered sources
sources.ByName(name)
Get source by name
sources.ByNames(...names)
Get multiple sources by name
sources.ByType(type)
Get sources yielding specific result type
sources.Names()
Get names of all registered sources
Types
// Result represents a discovery from a sourcetypeResultstruct {
TypeResultType// Subdomain or URLValuestring// The discovered valueSourcestring// Which source found it
}
// ResultType indicates the kind of resulttypeResultTypeuint8const (
SubdomainResultType=1<<iota// Subdomain resultURL// URL result
)
Available Sources
No API Key Required (11 sources)
Source
Yields
Description
anubis
Subdomain
Anubis subdomain database
crtsh
Subdomain
Certificate transparency logs
commoncrawl
Subdomain, URL
Common Crawl web archive
digitorus
Subdomain
Certificate details database
hudsonrock
Subdomain, URL
Data breach information
rapiddns
Subdomain
DNS record aggregator
sitedossier
Subdomain
Domain analysis tool
thc
Subdomain
THC subdomain lookup API
alienvault
URL
AlienVault OTX URL list
hackertarget
Subdomain
Host search (limited without key)
reconeer
Subdomain
Subdomain enumeration (limited without key)
About
Passive recon golang module to expand testing targets (subdomains and urls)