From 65e738a118ed8bee7432bd75fb0f0b7742f25613 Mon Sep 17 00:00:00 2001 From: Nils Date: Wed, 10 Mar 2021 22:54:52 +0100 Subject: [PATCH] added windows detection to every option --- conn.sh | 15 +++++++++++++++ hash | 1 - 2 files changed, 15 insertions(+), 1 deletion(-) delete mode 100644 hash diff --git a/conn.sh b/conn.sh index c554bd1..75026f4 100755 --- a/conn.sh +++ b/conn.sh @@ -80,6 +80,8 @@ fi echo "note: this seems to be a linux machine" elif [[ -n $(echo $rescue | grep "Successful connections: 2") ]];then echo "note: this machine seems to be in the rescue system" + elif [[ -n $(echo $p135 | grep "Successful connections: 1") ]] || [[ -n $(echo $p3389 | grep "Successful connections: 1") ]];then + echo "note: this machine seems to be booted into windows" fi echo "-----------------------------------------------------" fi @@ -109,6 +111,8 @@ fi echo "note: this seems to be a linux machine" elif [[ -n $(echo $rescue | grep "Successful connections: 2") ]];then echo "note: this machine seems to be in the rescue system" + elif [[ -n $(echo $p135 | grep "Successful connections: 1") ]] || [[ -n $(echo $p3389 | grep "Successful connections: 1") ]];then + echo "note: this machine seems to be booted into windows" fi echo "-----------------------------------------------------" fi @@ -139,6 +143,8 @@ fi echo "note: this seems to be a linux machine" elif [[ -n $(echo $rescue | grep "Successful connections: 2") ]];then echo "note: this machine seems to be in the rescue system" + elif [[ -n $(echo $p135 | grep "Successful connections: 1") ]] || [[ -n $(echo $p3389 | grep "Successful connections: 1") ]];then + echo "note: this machine seems to be booted into windows" fi echo "-----------------------------------------------------" fi @@ -170,6 +176,8 @@ fi echo "note: this seems to be a linux machine" elif [[ -n $(echo $rescue | grep "Successful connections: 2") ]];then echo "note: this machine seems to be in the rescue system" + elif [[ -n $(echo $p135 | grep "Successful connections: 1") ]] || [[ -n $(echo $p3389 | grep "Successful connections: 1") ]];then + echo "note: this machine seems to be booted into windows" fi echo "-----------------------------------------------------" fi @@ -221,6 +229,9 @@ fi elif [[ -n $(echo $rescue | grep "Successful connections: 2") ]];then echo "note: this machine seems to be in the rescue system" notify-send "$2 is now reachable" "and seems to be in the rescue system" -u normal -t 30000 -a conn + elif [[ -n $(echo $p135 | grep "Successful connections: 1") ]] || [[ -n $(echo $p3389 | grep "Successful connections: 1") ]];then + echo "note: this machine seems to be booted into windows" + notify-send "$2 is now reachable" "and seems to be booted into windows" -u normal -t 30000 -a conn else notify-send "$2 is now reachable" -u normal -t 30000 -a conn fi @@ -308,6 +319,8 @@ fi echo "note: this seems to be a linux machine" elif [[ -n $(echo $rescue | grep "Successful connections: 2") ]];then echo "note: this machine seems to be in the rescue system" + elif [[ -n $(echo $p135 | grep "Successful connections: 1") ]] || [[ -n $(echo $p3389 | grep "Successful connections: 1") ]];then + echo "note: this machine seems to be booted into windows" fi echo "-----------------------------------------------------" fi @@ -356,6 +369,8 @@ fi echo "note: this seems to be a linux machine" elif [[ -n $(echo $rescue | grep "Successful connections: 2") ]];then echo "note: this machine seems to be in the rescue system" + elif [[ -n $(echo $p135 | grep "Successful connections: 1") ]] || [[ -n $(echo $p3389 | grep "Successful connections: 1") ]];then + echo "note: this machine seems to be booted into windows" fi echo "-----------------------------------------------------" fi diff --git a/hash b/hash deleted file mode 100644 index 0229094..0000000 --- a/hash +++ /dev/null @@ -1 +0,0 @@ -54673592256c80bf11c8c6444c4fdafe