https://github.com/clarketm/check
Check if a TCP/UDP port is open on a host(s) using UNIX command line tools.
https://github.com/clarketm/check
bash proxy unix unix-command
Last synced: 19 days ago
JSON representation
Check if a TCP/UDP port is open on a host(s) using UNIX command line tools.
- Host: GitHub
- URL: https://github.com/clarketm/check
- Owner: clarketm
- License: mit
- Created: 2017-05-11T04:52:32.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-01T23:09:35.000Z (over 7 years ago)
- Last Synced: 2025-03-28T00:44:17.803Z (about 1 month ago)
- Topics: bash, proxy, unix, unix-command
- Language: Shell
- Homepage:
- Size: 271 KB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# check
Check if a TCP/UDP port is open on a host(s) using UNIX command line tools.### Installation
#### Source
```bash
$ git clone "https://github.com/clarketm/check.git"
$ cd check && sudo sh install.sh
```### Usage
```bash
$ check --helpNAME:
check – check if a TCP/UDP port is open on a host(s).SYNOPSIS:
check [opts...] [hostname...]OPTIONS:
-h, --help Print options and usage information.
-n, --noexit Continue processing hostnames on failure.
-p, --port port Port number (default: 80).
-s, --silent Suppress terminal output.
-t, --timeout seconds Timeout for the connection (default: 5).
--tcp TCP probe mode (default).
--udp UDP probe mode.
-v, --version Print current version number.EXIT CODE:
0 SUCCESS: Port is open on the specified host.
1 FAILURE: Port is closed on the specified host.
2 ERROR: Option parsing error.
3 ERROR: Option argument missing.
4 ERROR: Invalid option argument.
5 ERROR: GNU getopt not found on PATH.
6 ERROR: Multiple probe modes.
7 ERROR: General or unknown error.EXAMPLES:
check "www.travismclarke.com" "www.google.com" --port 443 --timeout 3
```### Example
```bash
$ check "www.travismclarke.com" "www.google.com" --port 443 --timeout 3 ; echo "exit_code: $?"# output
www.travismclarke.com: success
www.google.com: success
exit_code: 0
```