Skip to content

Instantly share code, notes, and snippets.

@vinothkannans
Created November 1, 2024 19:16
Show Gist options
  • Save vinothkannans/783416b5732b25069ff167a3b02abc1d to your computer and use it in GitHub Desktop.
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
(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