Closed maybebyte closed 9 months ago
Seems like you all resolved the issue, thank you! I can successfully build the binary by cloning the repository, checking out the dev branch, and using gmake build
.
$ git clone https://github.com/projectdiscovery/naabu
$ cd naabu
$ git checkout dev
$ cd v2
$ gmake build
Here's the output of the health check:
$ ./naabu -health-check
Version: 2.2.1
Operative System: openbsd
Architecture: amd64
Go Version: go1.21.1
Compiler: gc
Privileged/NET_RAW: Ko
Config file "/home/bugbounty/.config/naabu/config.yaml" Read => Ok
Config file "/home/bugbounty/.config/naabu/config.yaml" Write => Ok
TCP IPv4 connectivity to scanme.sh:80 => Ok
TCP IPv6 connectivity to scanme.sh:80 => Ok
UDP IPv4 connectivity to scanme.sh:80 => Ok
UDP IPv6 connectivity to scanme.sh:80 => Ok
Naabu version:
v2.2.1
Current Behavior:
On OpenBSD 7.4, the build fails in the same way as it did for FreeBSD in #782.
Expected Behavior:
A successful build without that error.
Steps To Reproduce:
On OpenBSD 7.4, install Go and then run
go install -v github.com/projectdiscovery/naabu/v2/cmd/naabu@v2.2.1
.Anything else:
Also, the code required to patch this probably looks similar to #856. I threw this together and it works on OpenBSD, so
os.Geteuid
is supported:Maybe it makes sense to generalize the fix for this somehow so that other systems (NetBSD, Dragonfly BSD) have a chance of working as well? Not sure how to do this offhand, I've only written really minor things in Go.