#!/bin/bash clear='\033[0m' Black='\033[0;30m' Red='\033[0;31m' Green='\033[0;32m' Yellow='\033[0;33m' Blue='\033[0;34m' Purple='\033[0;35m' Cyan='\033[0;36m' White='\033[0;37m' aaptttt() { if [[ -e $HOME/aapt/aapt2 ]] then echo -e " ${Green}[${IGreen}✔${clear}${Green}] ${IYellow}AAPT2 found... ${clear}" echo -en " ${Green}[${IGreen}✔${clear}${Green}] ${IYellow}Path of APK: ${clear}" read patoo $HOME/aapt/aapt2 dump badging $patoo|grep 'uses-permission\|launchable-activity\|package\|application-icon'|awk '{print "\033[0;32m[\033[0m\033\033[0;93m+\033[0m\033[0;32m]\033[0m \033[0;92m"$1" "$2}' else cd $HOME mkdir $HOME/aapt echo -e " ${Green}[${IGreen}✔${clear}${Green}] ${Red}Failed to find aapt2 ${clear}" echo -e " ${Green}[${IGreen}✔${clear}${Green}] ${Red}Fixing aapt2 for termux ${clear}" curl -L -o $HOME/aapt/aapt2 https://github.com/efxtv/EFX-Tv-Bookmarks/blob/main/bin/aapt2?raw=true --progress-bar chmod +x $HOME/aapt/aapt2 echo -e " ${Green}[${IGreen}✔${clear}${Green}] ${IGreen}Done... Try again ${clear}" fi } isntaal() { ctermuxorlinux=$(which bash|grep -o termux) if [ "$ctermuxorlinux" == "termux" ]; then echo -e "\t${IGreen} ${clear} ${Green}Installing metasploit in termux...${clear}" sleep 3 source <(curl -fsSL https://raw.githubusercontent.com/efxtv/Metasploit-in-termux/main/metasploit-termux-fix-2023.sh) else echo -e "\t${IGreen}├──${clear} ${Green}Installing metasploit in Linux ${clear}" echo -e "\t${IGreen}└──${clear} ${Green}Please wait...${clear}" sleep 3 curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && \ chmod 755 msfinstall && \ ./msfinstall fi } latestver() { curl https://raw.githubusercontent.com/rapid7/metasploit-framework/master/Gemfile.lock -s|grep metasploit-framework|head -1|sed 's/ //g'|tr '[:lower:]' '[:upper:]'|sed 's#(# #g;s#)##g;s# #: #g'|awk '{print $2}' } installedver() { ctermuxorlinux=$(which bash|grep -o termux) if [ "$ctermuxorlinux" == "termux" ]; then cat $PREFIX/opt/metasploit-framework/Gemfile.lock|grep metasploit-framework|head -1|sed 's/ //g'|tr '[:lower:]' '[:upper:]'|sed 's#(# #g;s#)##g;s# #: #g'|awk '{print $2}' else cat /opt/metasploit-framework/embedded/framework/Gemfile.lock|grep metasploit-framework|head -1|sed 's/ //g'|tr '[:lower:]' '[:upper:]'|sed 's#(# #g;s#)##g;s# #: #g'|awk '{print $2}' fi } versioncheckplusupdate() { latest=$(latestver) instal=$(installedver) if [ "$latest" == "$instal" ]; then echo -e "[${Green}+${clear}] Checking for metasploit updates..." sleep 4 printf "[${Green}+${clear}] Metasploit-Framework latest version installed: ";curl https://raw.githubusercontent.com/rapid7/metasploit-framework/master/Gemfile.lock -s|grep metasploit-framework|head -1|sed 's/ //g'|tr '[:lower:]' '[:upper:]'|sed 's#(# #g;s#)##g;s# #: #g'|awk '{print "\033[0;32m"$2 "\033[0m"}' echo else echo -e "[${Green}+${clear}] Checking for metasploit updates...";sleep 4;echo -e -e "[${Green}+${clear}] Update found: \c ";curl https://raw.githubusercontent.com/rapid7/metasploit-framework/master/Gemfile.lock -s|grep metasploit-framework|head -1|sed 's/ //g'|tr '[:lower:]' '[:upper:]'|sed 's#(# #g;s#)##g;s# #: #g'|awk '{print "\033[0;31m"$2 "\033[0m"}' #Install latest version echo -en "[${Green}+${clear}] Would you like to update? yY/nN: " read upd if [ "$upd" == "y" ]; then echo -e "[${Green}+${clear}] Okay" sleep 1 echo -e "[${Green}+${clear}] calling script..." sleep 3 echo -e "[${Green}+${clear}] lets install metasploit $latest " sleep 3 isntaal else echo "No problem see you again :)" fi fi } help() { echo -e "${Green} -${Yellow}-${Red}-${Yellow}-${Red}-${Yellow}-${Red}-${Yellow}-${Red}-${Yellow}-${Red}-${Yellow}-${Red}-${Yellow}-${Red}-${Yellow}-${Red}-${Yellow}-${Red}- ${clear}" echo -e "${Green}[ ${Yellow}Metasploit update${clear}${Green} ]${clear}" echo -e "${Green} -${Yellow}-${Red}-${Yellow}-${Red}-${Yellow}-${Red}-${Yellow}-${Red}-${Yellow}-${Red}-${Yellow}-${Red}-${Yellow}-${Red}-${Yellow}-${Red}-${Yellow}-${Red}- ${clear}" echo "help check install demo hook"|sed 's# #\n#g'|sed "s#^#$(tput setaf 2)[$(tput sgr0)$(tput setaf 10)✔$(tput sgr0)$(tput setaf 2)] mversion$(tput sgr0) #g" } demo() { echo "LHOST WHOST LHBind WHBind"|sed 's# #\n#g'|sed "s#^#$(tput setaf 2)[$(tput sgr0)$(tput setaf 10)✔$(tput sgr0)$(tput setaf 2)]$(tput sgr0) #g" echo -en "$(tput setaf 2)[$(tput sgr0)$(tput setaf 10)✔$(tput sgr0)$(tput setaf 2)]$(tput sgr0) Please type input: " read op case $op in LHOST) echo -e "${Green}Your pressed LHOST${clean}" source <(curl -fsSl https://raw.githubusercontent.com/efxtv/Payloads/main/Demo/LANAndroid.sh);; WHOST) echo -e "${Green}Your pressed LHOST VHOST${clean}" source <(curl -fsSl https://raw.githubusercontent.com/efxtv/Payloads/main/Demo/WANAndroid.sh);; LHBind) echo -e "${Green}You pressed LHBind${clean}" source <(curl -fsSl https://raw.githubusercontent.com/efxtv/Payloads/main/Demo/LBIND.sh);; WHBind) echo -e "${Green}You pressed VHBind${clean}" source <(curl -fsSl https://raw.githubusercontent.com/efxtv/Payloads/main/Demo/WBIND.sh);; *) echo -e "$(tput setaf 2)[$(tput sgr0)$(tput setaf 1)✗$(tput sgr0)$(tput setaf 2)]$(tput sgr0) ${Red}No no no !! Wrong input";; esac } if [[ $1 == "check" || $1 == "01" ]]; then versioncheckplusupdate 2> /dev/null elif [[ $1 == "install" || $soun == "02" ]]; then source <(curl -fsSl https://raw.githubusercontent.com/efxtv/Metasploit-in-termux/main/metasploit-termux-fix-2023.sh) rm $HOME/metasploit-termux-fix-2023.sh 2>.log.txt elif [[ $1 == "-help" || $1 == "03" ]]; then help elif [[ $1 == "demo" || $1 == "04" ]]; then demo elif [[ $1 == "hook" || $1 == "05" ]]; then aaptttt else echo "Wrong input use -help for more" fi