|
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +if [ "$EUID" -ne 0 ] |
| 4 | + then echo "[x] Root privileges required!" |
| 5 | + exit |
| 6 | +fi |
| 7 | + |
| 8 | +PROGRAMNAME="" |
| 9 | +DEVELOPERNAME="" |
| 10 | +SHORTPROGRAMNAME="" |
| 11 | + |
| 12 | +echo "Welcome to the $PROGRAMNAME installer |
| 13 | +
|
| 14 | +By using this software you must agree all below terms: |
| 15 | + 1) Usage of this tools for attacking targets without prior mutual consent is illegal. |
| 16 | + 2) By using this software, it's the end user’s responsibility to obey all applicable local, state and federal laws. |
| 17 | + 3) $DEVELOPERNAME isn't responsible for any damage caused by this software. |
| 18 | +
|
| 19 | +[?] If you agree, press [Enter] to procede:" |
| 20 | +read junk |
| 21 | + |
| 22 | +# TODO: Implement non-APT environment installation |
| 23 | +if [ $(dpkg-query -W -f='${Status}' python3 > /dev/null 2>&1 | grep -c "ok installed") -eq 0 ]; then |
| 24 | + # Python3 not installed on the system, just install it! |
| 25 | + echo "[*] Installing python interpreter on the system..." |
| 26 | + apt update > /dev/null 2>&1; |
| 27 | + apt install python3 > /dev/null 2>&1; |
| 28 | +fi |
| 29 | + |
| 30 | +# Install python requirements |
| 31 | +echo "[*] Installing python requirements..." |
| 32 | +pip3 install -r requirements.txt > /dev/null 2>&1; |
| 33 | + |
| 34 | +# Install the script in the opt directory |
| 35 | +echo "[*] Installing the software..." |
| 36 | +mkdir /opt/$SHORTPROGRAMNAME > /dev/null 2>&1; |
| 37 | +cp src/$SHORTPROGRAMNAME.py /opt/$SHORTPROGRAMNAME > /dev/null 2>&1; |
| 38 | +chmod +x /opt/$SHORTPROGRAMNAME/$SHORTPROGRAMNAME.py > /dev/null 2>&1; |
| 39 | + |
| 40 | +# Create the command for the shell |
| 41 | +echo "[*] Setting up the environment..." |
| 42 | +ln -s /opt/$SHORTPROGRAMNAME/$SHORTPROGRAMNAME.py /usr/bin/$SHORTPROGRAMNAME > /dev/null 2>&1; |
| 43 | + |
| 44 | +echo "" |
| 45 | +echo "[v] Successfully installed $PROGRAMNAME in your system!"; |
0 commit comments