mirror of
https://github.com/byReqz/conn.git
synced 2024-11-22 00:53:14 +00:00
add fast mode
This commit is contained in:
parent
9df9d6ccfa
commit
52cddcda3d
16
conn.sh
16
conn.sh
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user