projectdiscovery / pdtm

ProjectDiscovery's Open Source Tool Manager
https://projectdiscovery.io
MIT License
673 stars 50 forks source link

feat: naabu binary install #266

Closed sa7mon closed 1 month ago

sa7mon commented 3 months ago

Please describe your feature request:

Support binary install for naabu

Describe the use case of this feature:

The go install takes a long time and leaves a large cache of Go modules behind. The assets are there on the release page so I'm not sure why binary install doesn't happen.

dogancanbakir commented 3 months ago

We recently added an installation method to enhance UX, as detailed at https://github.com/projectdiscovery/pdtm/issues/201. This update mitigates compatibility issues with dynamically linked C libraries in tools like naabu and katana by advocating for go install, which leverages the existing Go environment for consistent system compatibility. Therefore, I don’t know whether we should introduce some flag to override this. I’m mentioning @Mzack9999 @ehsandeep for discussion.

sa7mon commented 3 months ago

I don’t know much about dynamic C libraries, but I do know that if I pull down the binary release from GitHub and try to run it, I just need to install libpcap-dev which I think would still be the case with a go install.

On Fri, Apr 5, 2024 at 7:32 AM, Dogan Can Bakir @.***(mailto:On Fri, Apr 5, 2024 at 7:32 AM, Dogan Can Bakir < wrote:

We recently added an installation method to enhance UX, as detailed at #201. This update mitigates compatibility issues with dynamically linked C libraries in tools like naabu and katana by advocating for go install, which leverages the existing Go environment for consistent system compatibility. Therefore, I don’t know whether we should introduce some flag to override this. I’m mentioning @.(https://github.com/Mzack9999) @.(https://github.com/ehsandeep) for discussion.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Mzack9999 commented 2 months ago

@sa7mon in the past naabu was installed in that way, but we got multiple reported cases where on older distributions the pre-compiled binary couldn't run due to mismatch with the system shared libraries. So we tried to extend the compatibility and coverage by leveraging the existing go environment which performs the compilation and linking on the system the tool it's going to run, ensuring 100% compatibility

sa7mon commented 2 months ago

@Mzack9999 Perhaps the installed libraries could be compared to those of the build system used to compile the binaries?

Mzack9999 commented 1 month ago

It's going to be difficult to maintain such approach considering the plethora of potential edge cases. At current time the go install way seems the one offering the best advantages, including updating the binary itself via go install -u. To cleanup the system after compilation, you can execute the following command:

$ go clean -cache -testcache -modcache