install.sh


SUBMITTED BY: samen

DATE: Aug. 17, 2020, 10:28 p.m.

FORMAT: Batchfile

SIZE: 1.7 kB

HITS: 578

  1. #!/bin/bash
  2. arch=$(head -n1 /etc/issue | cut -d' ' -f1)
  3. if [ -e /usr/bin/msfvenom ]; then
  4. printf "[] Msfvenom is already installed.\n"
  5. elif [ "$arch" = "Kali" ]; then
  6. printf "[!] Msfvenom is not installed but this is Kali Linux.\n"
  7. printf "[*] The Metasploit framework is available as a package via:\n"
  8. printf "[*] apt install metasploit-framework\n"
  9. else
  10. printf "[!] Msfvenom is not installed at /usr/bin/msfvenom.\n"
  11. printf "[*] If it's already installed and on your path, ignore this warning.\n"
  12. printf "[*] Otherwise, you need to install the Metasploit framework (https://github.com/rapid7/metasploit-framework/wiki/Nightly-Installers).\n"
  13. fi
  14. if [ -e /usr/bin/wine ]; then
  15. printf "[] Wine is already installed.\n"
  16. else
  17. printf "[!] Wine is not installed.\n"
  18. printf "[*] Updating the apt cache.\n"
  19. sudo apt-get -qq update || exit 1
  20. printf "\n[*]Adding x86 architecture to x86_64 system for Wine.\n"
  21. sudo dpkg --add-architecture i386 || exit 1
  22. sudo apt-get install -y wine
  23. printf "Restart install.sh.\n"
  24. exit 1
  25. fi
  26. if [ -e /usr/bin/x86_64-w64-mingw32-gcc ]; then
  27. printf "[] Mingw-w64 Compiler is already installed.\n"
  28. elif [ "$arch" = "Kali" ]; then
  29. for package in mingw-w64 mingw32; do
  30. sudo apt-get install -y $package
  31. done
  32. else
  33. printf "[!] Compilation requires Mingw-w64.\n"
  34. printf "[!] Suggest using Kali Linux. Otherwise, you will need the mingw-w64 package.\n"
  35. printf "[!] You may also need mingw32 depending on the age of your distro.\n"
  36. printf "[*] Re-run install.sh when this is resolved.\n"
  37. exit 1
  38. fi
  39. printf "\nDependencies are installed successfully.\n"
  40. printf "You can now execute by typing: \"python3 Xeexe.py\"\n"
  41. exit 0

comments powered by Disqus