Created
November 1, 2024 19:16
-
-
Save vinothkannans/783416b5732b25069ff167a3b02abc1d to your computer and use it in GitHub Desktop.
To check whether a port is open or closed in IP when telnet and netcat are not available
This file contains 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
(timeout 1 bash -c '</dev/tcp/127.0.0.1/17500 && echo PORT OPEN || echo PORT CLOSED') 2>/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment