Skip to content

Commit

Permalink
Merge pull request #583 from projectdiscovery/issue-582-passive
Browse files Browse the repository at this point in the history
Skip host discovery with passive mode
  • Loading branch information
ehsandeep authored Mar 7, 2023
2 parents 091fe25 + 9c6e4bb commit 8b5fcb5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
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

0 comments on commit 8b5fcb5

Please sign in to comment.