Return enumerated subdomain results in realtime#1652
Return enumerated subdomain results in realtime#1652dogancanbakir merged 3 commits intoprojectdiscovery:devfrom
Conversation
WalkthroughAdds immediate ResultCallback emissions when a subdomain is discovered (if RemoveWildcard is false) and when wildcard-resolution produces a non-wildcard result; removes the final consolidated callback emission loop while keeping output writing and wildcard queuing intact. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant E as Enumerator
participant D as DNS/Discovery
participant W as Wildcard Resolver Pool
participant C as ResultCallback
rect rgba(220,235,255,0.4)
note right of E: Discovery path (RemoveWildcard = false)
E->>D: Discover subdomain
D-->>E: HostEntry discovered
E-->>C: Callback(HostEntry) [immediate]
end
rect rgba(235,255,220,0.4)
note right of E: Wildcard resolution path
E->>D: Queue candidate host(s)
D-->>W: Submit for wildcard resolution
W-->>E: Resolved HostEntry (non-wildcard)
E-->>C: Callback(HostEntry) [on resolution]
end
rect rgba(255,230,230,0.15)
note over E: Removed final aggregated emission loop
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code graph analysis (1)pkg/runner/enumerate.go (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🔇 Additional comments (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
pkg/runner/enumerate.go(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
pkg/runner/enumerate.go (1)
pkg/resolve/resolve.go (1)
HostEntry(27-31)
🔇 Additional comments (1)
pkg/runner/enumerate.go (1)
97-99: Verify concurrent safety of OnResultCallback
OnResultCallback (typefunc(*resolve.HostEntry)) is now invoked from multiple goroutines (e.g., inenumerate.go), so any provided callback must safely handle concurrent calls.
|
Thanks for the PR! |
Refer to #1649.
I've not tested the
RemoveWildcard = truepath yet, but the code looks fine to me. I've removed the originalResultCallbackcalls and placed them where they will be called sooner, which is hopefully acceptable.Summary by CodeRabbit
New Features
Refactor