14 lines
289 B
Bash
14 lines
289 B
Bash
#!/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
|