Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the WalkthroughUpdates host-discovery gating during CIDR enumeration: when Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Runner
participant DenyList as ExcludedIpsNP
participant Discovery as Host Discovery
User->>Runner: RunEnumeration(CIDR)
loop for each IP in CIDR
alt DenyList is nil
note right of Runner #E6F7FF: New: allow discovery for all IPs
Runner->>Discovery: discover(IP)
else DenyList present
Runner->>DenyList: ValidateAddress(IP)
alt Valid
Runner->>Discovery: discover(IP)
else Invalid
note right of Runner #FFF4E6: Skip IP
end
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
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: 0
🧹 Nitpick comments (1)
pkg/runner/runner.go (1)
325-327: Solid fix; simplify the conditional for clarity (no behavior change).The new gating correctly restores host discovery when no denylist is set. You can drop the redundant nil-check in the second disjunct.
- if r.excludedIpsNP == nil || (r.excludedIpsNP != nil && r.excludedIpsNP.ValidateAddress(ip)) { + if r.excludedIpsNP == nil || r.excludedIpsNP.ValidateAddress(ip) { r.handleHostDiscovery(ip) }
Fixes #1531
Bug introduced in PR #1431 if no
excludedIpsNPis set on runner.Version 2.3.5
Host discovery is not outputted.
$ sudo naabu -host google.com -sn __ ___ ___ ___ _/ / __ __ / _ \/ _ \/ _ \/ _ \/ // / /_//_/\_,_/\_,_/_.__/\_,_/ projectdiscovery.io [INF] Current naabu version 2.3.5 (latest) [WRN] UI Dashboard is disabled, Use -dashboard option to enable [INF] Running host discovery scanHost discovery outputs as expected when a host is excluded.
$ sudo naabu -host google.com -sn -exclude-hosts 0.0.0.0 __ ___ ___ ___ _/ / __ __ / _ \/ _ \/ _ \/ _ \/ // / /_//_/\_,_/\_,_/_.__/\_,_/ projectdiscovery.io [INF] Current naabu version 2.3.5 (latest) [WRN] UI Dashboard is disabled, Use -dashboard option to enable [INF] Running host discovery scan [INF] Found alive host google.com (74.125.206.100) google.comThis PR
Host discovery outputs again as expected
$ sudo ./naabu -host google.com -sn __ ___ ___ ___ _/ / __ __ / _ \/ _ \/ _ \/ _ \/ // / /_//_/\_,_/\_,_/_.__/\_,_/ projectdiscovery.io [INF] Current naabu version 2.3.5 (latest) [WRN] UI Dashboard is disabled, Use -dashboard option to enable [INF] Running host discovery scan [INF] Found alive host google.com (74.125.206.139) google.comSummary by CodeRabbit