Added bash script to check if a remote port is reachable.
This commit is contained in:
parent
9aa78caeee
commit
dd7c7e7e0c
13
bin/executable_tcp-check.sh
Normal file
13
bin/executable_tcp-check.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Vom ITZ Wiki abgeschaut
|
||||
|
||||
host=${1:-127.0.0.1}
|
||||
port=${2:-22}
|
||||
|
||||
if echo "Hi from poor man's scanner at $(uname -n)" 2>/dev/null > /dev/tcp/"$host"/"$port"
|
||||
then
|
||||
echo -e "\033[32m success at $host:$port \033[0m"
|
||||
else
|
||||
echo -e "\033[31m failure at $host:$port \033[0m"
|
||||
fi
|
||||
Loading…
Reference in New Issue
Block a user