Unverified Commit c18cd12f authored by sudokit's avatar sudokit Committed by GitHub
Browse files

Added arch linux support bc feature request #231

- Added Arch Linux support because feature request #231.
- Fixed "./test.sh: line 107: [: invinput123: integer expression expected" when entering letters instead of a integer.
parent 0a4faeac
Loading
Loading
Loading
Loading
+35 −20
Original line number Diff line number Diff line
@@ -31,32 +31,39 @@ echo -e "${RED} [!] This Tool Must Run As ROOT
echo ""
echo -e ${CYAN}              "Select Best Option : "
echo ""
echo -e "${WHITE}              [1] Kali Linux / Parrot-Os "
echo -e "${WHITE}              [1] Kali Linux / Parrot-Os (apt)"
echo -e "${WHITE}              [2] Arch Linux (pacman)" # added arch linux support because of feature request #231
echo -e "${WHITE}              [0] Exit "
echo -n -e "Z4nzu >> "
read choice
INSTALL_DIR="/usr/share/doc/hackingtool"
BIN_DIR="/usr/bin/"
if [ $choice == 1 ]; then 
if [ $choice == 1 ] || [ $choice == 2 ]; then
	echo "[*] Checking Internet Connection .."
	wget -q --tries=10 --timeout=20 --spider https://google.com
	if [[ $? -eq 0 ]]; then
	if [[ $? == 0 ]]; then
	    echo -e ${BLUE}"[✔] Loading ... "
      if [ $choice == 1 ]; then
	        sudo apt-get update && apt-get upgrade
	        sudo apt-get install python-pip
      elif [ $choice == 2 ]; then # added arch linux support because of feature request #231
          sudo pacman -Suy
          sudo pacman -S python-pip
          sudo pacman -S yay
      fi
	    echo "[✔] Checking directories..."
	    if [ -d "$INSTALL_DIR" ]; then
	        echo "[!] A Directory hackingtool Was Found.. Do You Want To Replace It ? [y/n]:" ;
	        read input
	        if [ "$input" = "y" ]; then
	            rm -R "$INSTALL_DIR"
	            sudo rm -R "$INSTALL_DIR"
	        else
	            exit
	        fi
	    fi
    		echo "[✔] Installing ...";
		echo "";
		git clone https://github.com/Z4nzu/hackingtool.git "$INSTALL_DIR";
		sudo git clone https://github.com/Z4nzu/hackingtool.git "$INSTALL_DIR";
		echo "#!/bin/bash
		python3 $INSTALL_DIR/hackingtool.py" '${1+"$@"}' > hackingtool;
		sudo chmod +x hackingtool;
@@ -64,12 +71,21 @@ if [ $choice == 1 ]; then
		rm hackingtool;
		echo "";
		echo "[✔] Trying to installing Requirements ..."
    if [ $choice == 1 ]; then
		    sudo pip3 install lolcat
		    sudo apt-get install -y figlet
		    sudo pip3 install boxes
		    sudo apt-get install boxes
		    sudo pip3 install flask
		    sudo pip3 install requests
    elif [ $choice == 2 ]; then # added arch linux support because of feature request #231
        sudo pip3 install lolcat
        sudo pacman -S figlet
        sudo pip3 install boxes
        sudo yay -S boxes --noconfirm
        sudo pip3 install flask
        sudo pip3 install requests
    fi
	else
		  echo -e $RED "Please Check Your Internet Connection ..!!"
	fi
@@ -88,8 +104,7 @@ if [ $choice == 1 ]; then
        echo "[✘] Installation Failed !!! [✘]";
        exit
    fi
elif [ $choice -eq 0 ];
then
elif [ $choice == 0 ] && [ $choice != 1 ] && [ $choice != 2 ]; then # fixed the "./test.sh: line 107: [: asd: integer expression expected" when entering any invalid input containing letters
    echo -e $RED "[✘] THank Y0u !! [✘] "
    exit
else