packages.sh 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #install packages
  2. #
  3. # Copyright (c) 2022 Barchampas Gerasimos <makindosxx@gmail.com>.
  4. # mip22 is a advanced phishing tool.
  5. #
  6. # mip22 is free software: you can redistribute it and/or modify
  7. # it under the terms of the GNU Affero General Public License as published by
  8. # the Free Software Foundation, either version 3 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # mip22 is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU Affero General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU Affero General Public License
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. #
  19. #
  20. # Terminal Colors
  21. RED="$(printf '\033[31m')"
  22. GREEN="$(printf '\033[32m')"
  23. ORANGE="$(printf '\033[33m')"
  24. BLUE="$(printf '\033[34m')"
  25. MAGENTA="$(printf '\033[35m')"
  26. CYAN="$(printf '\033[36m')"
  27. WHITE="$(printf '\033[37m')"
  28. BLACK="$(printf '\033[30m')"
  29. echo -e "\n${GREEN}[${WHITE}+${GREEN}]${CYAN} Installing required packages..."
  30. if [[ -d "/data/data/com.termux/files/home" ]]; then
  31. if [[ `command -v proot` ]]; then
  32. printf ''
  33. else
  34. echo -e "\n${GREEN}[${WHITE}+${GREEN}]${MAGENTA} Installing package : ${CYAN}proot${CYANMAGENTA}"${WHITE}
  35. pkg install proot resolv-conf -y
  36. fi
  37. fi
  38. if [[ `command -v php` && `command -v wget` && `command -v curl` && `command -v unzip` ]]; then
  39. echo -e "\n${GREEN}[${WHITE}+${GREEN}]${GREEN} Mip packages already installed."
  40. sleep 1
  41. else
  42. echo -e "\n${GREEN}[${WHITE}+${GREEN}]${MAGENTA} Installing package : ${CYAN}$pkg${MAGENTA}"${WHITE}
  43. if [[ `command -v pkg` ]]; then
  44. pkg install figlet php curl wget unzip mpv -y
  45. elif [[ `command -v apt` ]]; then
  46. apt install figlet php curl wget unzip mpv -y
  47. elif [[ `command -v apt-get` ]]; then
  48. apt-get install figlet php curl wget unzip mpv -y
  49. elif [[ `command -v pacman` ]]; then
  50. sudo pacman -S figlet php curl wget unzip mpv --noconfirm
  51. elif [[ `command -v dnf` ]]; then
  52. sudo dnf -y install figlet php curl wget unzip mpv
  53. else
  54. echo -e "\n${RED}[${WHITE}!${RED}]${RED} Unsupported package manager, Install packages manually."
  55. { sleep 2; exit 1; }
  56. fi
  57. fi