From b4fd64bfb5ed5d310a55f362a1e87eb7e8362c8e Mon Sep 17 00:00:00 2001 From: Lucien Date: Sat, 22 Oct 2022 16:21:26 +0200 Subject: [PATCH] Fix tor service and exit condition --- ghostshell.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ghostshell.sh b/ghostshell.sh index aadb00b..7c71ee7 100644 --- a/ghostshell.sh +++ b/ghostshell.sh @@ -13,7 +13,11 @@ toilet -f smbraille --gay 'GhostShell' echo -e "\n" echo -e "${YELLOW}[+] Starting Shell...${ENDCOLOR}\n" -service tor status | grep " active" >/dev/null +if [ -d "/run/systemd/system" ]; then + systemctl status tor | grep " active" >/dev/null +else + /etc/init.d/tor status | grep " active" >/dev/null +fi e=$(echo $?) if [ $e == 0 ]; then @@ -23,12 +27,12 @@ else exit fi - -while [ "$command" != "exit" ] +while true do echo -e "${BLUE}" read -p "ghost@$hostname~# " command echo -e "${ENDCOLOR}" - proxychains4 -q $command + [[ $command != "exit" && -n "$command" ]] &&\ + proxychains4 -q $command || exit done