add fast mode

This commit is contained in:
Nils 2021-01-21 21:17:46 +00:00 committed by GitHub
parent 9df9d6ccfa
commit 52cddcda3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 0 deletions

16
conn.sh
View File

@ -19,6 +19,8 @@ fi
echo " -p/--portscan -- same as -y"
echo " -w/--wait -- wait for active connection"
echo " -u/--update -- update the script to the newest version"
echo " -f/ --fast -- disable os check"
echo " -s/ --simple -- same as -f"
exit
done
while [ ! -z "$1" ]; do
@ -34,6 +36,8 @@ fi
echo " -p/--portscan -- same as -y"
echo " -w/--wait -- wait for active connection"
echo " -u/--update -- update the script to the newest version"
echo " -f/ --fast -- disable os check"
echo " -s/ --simple -- same as -f"
exit
elif [[ $1 == "-m" ]] || [[ "$1" == "--multi" ]];then
echo "multi-ip mode, portscan disabled"
@ -41,6 +45,18 @@ fi
fping -e $@
echo "-----------------------------------------------------"
exit
elif [[ $1 == "-f" ]] || [[ "$1" == "--fast" ]] || [[ $1 == "-s" ]] || [[ "$1" == "--simple" ]];then
echo "$1 used, skipping os check"
echo "checking connection status for $2"
echo "-------------------Availability----------------------"
fping -e $2
echo "-----------------------------------------------------"
echo "-------------------Portscan---------------------"
nmap --reason -Pn $2
echo ""
fping -c 4 $2
echo "------------------------------------------------"
exit
elif [[ $1 == "-y" ]] || [[ $1 == "-p" ]] || [[ "$1" == "--portscan" ]] || [[ "$1" == "--yes" ]];then
echo "checking connection status for $2"
fping=$(fping -a $2)