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

Skip host discovery with passive mode #583

Merged
merged 2 commits into from
Mar 7, 2023
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
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
FROM golang:1.20.1-alpine AS builder
RUN apk add build-base libpcap-dev
RUN go install -v github.com/projectdiscovery/naabu/v2/cmd/naabu@latest
WORKDIR /app
COPY . /app
WORKDIR /app/v2
RUN go mod download
RUN go build ./cmd/naabu

FROM alpine:3.17.2
RUN apk add nmap libpcap-dev bind-tools ca-certificates nmap-scripts
COPY --from=builder /go/bin/naabu /usr/local/bin/naabu
COPY --from=builder /app/v2/naabu /usr/local/bin/naabu
ENTRYPOINT ["naabu"]
2 changes: 1 addition & 1 deletion v2/pkg/runner/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func (options *Options) ShouldLoadResume() bool {
}

func (options *Options) shouldDiscoverHosts() bool {
return options.OnlyHostDiscovery || !options.SkipHostDiscovery
return (options.OnlyHostDiscovery || !options.SkipHostDiscovery) && !options.Passive
}

func (options *Options) hasProbes() bool {
Expand Down