Fix conditional logic and port range validation in helper scripts#38
Open
assisted-by-ai wants to merge 1 commit intoKicksecure:masterfrom
Open
Fix conditional logic and port range validation in helper scripts#38assisted-by-ai wants to merge 1 commit intoKicksecure:masterfrom
assisted-by-ai wants to merge 1 commit intoKicksecure:masterfrom
Conversation
- get_os.sh: use `= "1"` for kali_derivative_detected check for consistency with other _detected variable checks in the codebase - ip_syntax.sh: correct error message from "0-65535" to "1-65535" since port 0 is rejected by the `-gt 0` check https://claude.ai/code/session_01CokgibdWMKM8hSYezDskTH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes two bugs in the helper scripts: a conditional logic error in distribution detection and an incorrect port range validation message.
Key Changes
kali_derivative_detectedto"1"instead of relying on implicit truthiness. The original condition would fail to properly detect when the variable was set.0-65535to1-65535to accurately reflect the actual valid port range (ports must be greater than 0).Implementation Details
The first fix ensures that the Oracle repository incompatibility check with Kali Linux distributions works correctly by using explicit value comparison rather than implicit boolean evaluation. The second fix corrects user-facing documentation in error messages to match the actual validation logic that checks
port > 0.https://claude.ai/code/session_01CokgibdWMKM8hSYezDskTH