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

print requirement info #166

Merged
merged 3 commits into from
Jul 14, 2023

Conversation

dogancanbakir
Copy link
Member

This PR prints tool requirement info for given tools. Closes #6.

@dogancanbakir dogancanbakir linked an issue Jun 20, 2023 that may be closed by this pull request
@dogancanbakir dogancanbakir self-assigned this Jun 20, 2023
Copy link
Member

@Mzack9999 Mzack9999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggesting fmt.xxx => gologger

internal/runner/runner.go Outdated Show resolved Hide resolved
internal/runner/runner.go Outdated Show resolved Hide resolved
Copy link
Member

@Mzack9999 Mzack9999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like there is some issue with deps detection on osx:

$ ./pdtm -i naabu

                ____          
     ____  ____/ / /_____ ___ 
    / __ \/ __  / __/ __ __  \
   / /_/ / /_/ / /_/ / / / / /
  / .___/\__,_/\__/_/ /_/ /_/ 
 /_/                         

                projectdiscovery.io

[INF] Current pdtm version v0.0.7 (latest)
[INF] Run `source ~/.bashrc` to add /Users/marcornvh/.pdtm/go/bin to $PATH 
[INF] installing naabu...
[INF] installed naabu 2.1.6 (latest)
[INF] naabu requirements:
required To install libpcap on macOS, run the following command in the terminal: sudo brew install libpcap
$ brew install libpcap
Warning: libpcap 1.10.4 is already installed and up-to-date.

We can try a more straightforward strategy, like executing the binary just downloaded and checking the output for errors, then suggesting how to install deps. What do you think?

@dogancanbakir
Copy link
Member Author

dogancanbakir commented Jun 22, 2023

It seems like there is some issue with deps detection on osx:

$ ./pdtm -i naabu

                ____          
     ____  ____/ / /_____ ___ 
    / __ \/ __  / __/ __ __  \
   / /_/ / /_/ / /_/ / / / / /
  / .___/\__,_/\__/_/ /_/ /_/ 
 /_/                         

                projectdiscovery.io

[INF] Current pdtm version v0.0.7 (latest)
[INF] Run `source ~/.bashrc` to add /Users/marcornvh/.pdtm/go/bin to $PATH 
[INF] installing naabu...
[INF] installed naabu 2.1.6 (latest)
[INF] naabu requirements:
required To install libpcap on macOS, run the following command in the terminal: sudo brew install libpcap
$ brew install libpcap
Warning: libpcap 1.10.4 is already installed and up-to-date.

We can try a more straightforward strategy, like executing the binary just downloaded and checking the output for errors, then suggesting how to install deps. What do you think?

@Mzack9999, the problem may be linked to how the OS names files. For further details, please refer to https://github.com/projectdiscovery/utils/blob/main/syscallutil/syscallutil_test.go#L15. Your suggestion appears more practical, we can proceed with it. However, before implementing any changes, it's worth noting that our tools may not check for dependencies when run without any flag. While a health check might work, not all tools have this functionality. Any suggestion?

@Mzack9999
Copy link
Member

@dogancanbakir I think we can improve the multi-platform check and make it more precise with additional steps (like running the tool and seeing if any error gets printed to stdout/stderr - as previously mentioned. I changed red to yellow for now since the missing dependency might prevent the tool from running under certain conditions but not being installed as we are downloading the binary directly.

@Mzack9999 Mzack9999 requested a review from ehsandeep June 28, 2023 07:35
@ehsandeep ehsandeep merged commit 37d6d82 into projectdiscovery:dev Jul 14, 2023
8 checks passed
@ehsandeep ehsandeep linked an issue Jul 14, 2023 that may be closed by this pull request
@dogancanbakir dogancanbakir deleted the tool_requirement branch July 17, 2023 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for pre/post hooks instructions Tools Requirements
3 participants