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
{{ message }}
Repository navigation
-max-queries does not stop memory growth in recursive mode (visited map keeps growing after the cap) #51
-max-queries is the safety valve that makes large recursive scans viable. After the cap is reached, the dispatcher still accepts and records every child name, so memory and CPU keep growing in proportion to found × wordlist.
Evidence
internal/scan/runner.go:347-355: visited[j.domain] = true runs before the cap check.
internal/scan/runner.go:520-527: each found parent pushes len(Entries) children one at a time through the unbuffered enqueue channel.
Scenario: a 100k wordlist with 1,000 found names produces about 100M strings in visited (several GB) and about 100M channel handoffs, after the scan has already stopped sending queries.
Suggested approach
Expose an atomic "cap reached" flag; workers check it and stop enqueueing children.
The dispatcher counts skipped names without storing them.
Done when
A test with -recursive -max-queries N shows visited size bounded by about N plus in-flight jobs.
Activity