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

Incorrect behavior in case of invalid CLI arguments #118

Open
forgedhallpass opened this issue Jun 19, 2023 · 0 comments · May be fixed by #159
Open

Incorrect behavior in case of invalid CLI arguments #118

forgedhallpass opened this issue Jun 19, 2023 · 0 comments · May be fixed by #159
Assignees
Labels
Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@forgedhallpass
Copy link
Contributor

The code silently fails if there is an incorrect positional CLI argument and ignores every other parameter coming after it.

Example:

nuclei -no-interactsh test -v -debug -u http://projectdiscovery.io -id tech-detect

-no-interactsh is a boolean type which has an invalid positional argument after (test). When executing the above command nuclei will not parse the other arguments after it, hence it won't execute the tech-detect template as expected.

Since the solution doesn't even warn about the incorrect parameters the execution will be non-deterministic and will cause a lot of confusion.

I made the following mistake by adding a URL after the -pi boolean flag and was incorrectly assuming that the proxy functionality is not working in the following example:

nuclei -id tech-detect -u https://projectdiscovery.io -v -debug -pi http://localhost:8080 -proxy http://localhost:8080
@Mzack9999 Mzack9999 added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Jun 21, 2023
@dogancanbakir dogancanbakir self-assigned this Dec 7, 2023
@dogancanbakir dogancanbakir linked a pull request Dec 7, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants