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

Exit code 1 on success #49

Open
ReDemoNBR opened this issue Oct 3, 2021 · 0 comments · May be fixed by #116
Open

Exit code 1 on success #49

ReDemoNBR opened this issue Oct 3, 2021 · 0 comments · May be fixed by #116

Comments

@ReDemoNBR
Copy link

On shells, the exit code 1 means error. However, if you run these commands below, they all exit the error code 1

python3 jwt_tool.py eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpbiI6InRpY2FycGkifQ.bsSwqj2c2uI9n7-ajmi3ixVGhPUiY7jO9SUn9dm15Po
python3 jwt_tool.py --exploit n eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpbiI6InRpY2FycGkifQ.bsSwqj2c2uI9n7-ajmi3ixVGhPUiY7jO9SUn9dm15Po
python3 jwt_tool.py --query jwttool_298d3877b773b51a46e8dc441d1a9453

What are the reasons of using exit(1) instead of exit(0)?

And thinking about integration with other tools (like CI/CD for automated testing, like I am doing here with CORScanner for securing our own applications), could we change the behavior to the one below?

  • Exit code 1 when there is an error on CLI params/options (Ex: python3 jwt_tool.py -X hello -p)
  • Exit any code in 3-125 range for vulnerabilities found with given tests (Ex: found CVE-2015-2951 alg=none on https://example.com/)
  • Exit code 0 (for success) when no vulnerability is found with the given tests (Ex: tested https://example.com/ against CVE-2018-0114 Key injection but website passed test)
@benzammour benzammour linked a pull request Aug 1, 2024 that will close this issue
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 a pull request may close this issue.

1 participant