diff --git a/bin/executable_tcp-check.sh b/bin/executable_tcp-check.sh new file mode 100644 index 0000000..81d891a --- /dev/null +++ b/bin/executable_tcp-check.sh @@ -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