Added bash script to check if a remote port is reachable.

This commit is contained in:
arch-enemy 2023-03-02 10:53:00 +01:00
parent 9aa78caeee
commit dd7c7e7e0c

View 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