From a5c9fc02c2d9f096308f1793e46224541785c6ee Mon Sep 17 00:00:00 2001 From: Nils <32552517+byReqz@users.noreply.github.com> Date: Sun, 17 Jan 2021 22:09:52 +0000 Subject: [PATCH] tweaking fping arguments --- conn.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/conn.sh b/conn.sh index 3e8065d..947bb2e 100644 --- a/conn.sh +++ b/conn.sh @@ -29,23 +29,23 @@ while [ ! -z "$1" ]; do elif [[ $1 == "-m" ]] || [[ "$1" == "--multi" ]];then echo "multi-ip mode, portscan disabled" echo "-------------------Availability----------------------" - fping -m -e $@ + fping -e $@ echo "-----------------------------------------------------" exit elif [[ $1 == "-y" ]] || [[ $1 == "-p" ]] || [[ "$1" == "--portscan" ]] || [[ "$1" == "--yes" ]];then echo "checking connection status for $2" echo "-------------------Availability----------------------" - fping -m -e $2 + fping -e $2 echo "-----------------------------------------------------" echo "-------------------Portscan---------------------" nmap --reason -Pn $2 - fping -m -c 4 -A $2 + fping -c 4 -A $2 echo "------------------------------------------------" exit elif [[ $1 == "-n" ]] || [[ "$1" == "--no" ]];then echo "checking connection status for $2" echo "-------------------Availability----------------------" - fping -m -e $2 + fping -e $2 echo "-----------------------------------------------------" exit elif [[ $1 == "-6" ]] || [[ "$1" == "--force-ipv6" ]];then @@ -77,14 +77,14 @@ while [ ! -z "$1" ]; do done notify-send "$2 is now reachable" -u normal -t 8000 -a conn echo "-------------------Availability----------------------" - fping -m -e $2 + fping -e $2 echo "-----------------------------------------------------" echo "portscan? (y/n) (default: y)" read portscan if [[ "$portscan" = "y" ]] || [[ -z "$portscan" ]]; then echo "-------------------Portscan---------------------" nmap --reason -Pn $2 - fping -m -c 4 -A $2 + fping -c 4 -A $2 echo "------------------------------------------------" exit else @@ -111,30 +111,30 @@ while [ ! -z "$1" ]; do elif [[ "$1" =~ [0-9]{1,3}(\.[0-9]{1,3}){3} ]] && [[ "$2" =~ [0-9]{1,3}(\.[0-9]{1,3}){3} ]] || [[ "$3" =~ [0-9]{1,3}(\.[0-9]{1,3}){3} ]] && [[ ! "$1" =~ [-] ]];then echo "multi-ip input detected, portscan disabled" echo "-------------------Availability----------------------" - fping -m -e $@ + fping -e $@ echo "-----------------------------------------------------" exit elif [[ ! "$1" =~ [0-9]{1,3}(\.[0-9]{1,3}){3} ]] && [[ ! "$2" =~ [0-9]{1,3}(\.[0-9]{1,3}){3} ]] && [[ "$1" =~ [:] ]] && [[ "$2" =~ [:] ]] || [[ ! "$3" =~ [0-9]{1,3}(\.[0-9]{1,3}){3} ]] && [[ ! "$1" =~ [-] ]] && [[ ! "$1" =~ [0-9]{1,3}(\.[0-9]{1,3}){3} ]] && [[ ! "$2" =~ [0-9]{1,3}(\.[0-9]{1,3}){3} ]] && [[ "$1" =~ [:] ]] && [[ "$2" =~ [:] ]];then echo "multi-ipv6 input detected, portscan disabled" echo "-------------------Availability----------------------" - fping -m -e -6 $@ + fping -e -6 $@ echo "-----------------------------------------------------" exit else echo "checking connection status for $1" echo "-------------------Availability----------------------" - fping -m -e $1 + fping -e $1 echo "-----------------------------------------------------" echo "portscan? (y/n) (default: y)" read portscan if [[ "$portscan" = "y" ]] || [[ -z "$portscan" ]]; then echo "-------------------Portscan---------------------" nmap --reason -Pn $1 - fping -m -c 4 -A $1 + fping -c 4 -A $1 echo "------------------------------------------------" exit else exit fi fi -done \ No newline at end of file +done