Step 1 Download termux and termux api from F-Droid
Download and execute the script
pkg update; pkg upgrade pkg install wget curl cd $HOME;wget https://raw.githubusercontent.com/VirajLR/Metasploit-in-termux/main/metasploit-6-termux.sh -q;bash metasploit-6-termux.sh
rm -rf /data/data/com.termux/files/usr/bin/msfvenom cd;cd metasploit-framework;ln -s $HOME/metasploit-framework/msfvenom /data/data/com.termux/files/usr/bin/
After installing the Metasploit-Framework 6 in termux copy paste the everything in the home directory
cd metasploit-framework; sed -i '13,15 {s/^/#/}' /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/hrr_rb_ssh-0.4.2/lib/hrr_rb_ssh/transport/encryption_algorithm/functionable.rb; sed -i '14 {s/^/#/}' /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/hrr_rb_ssh-0.4.2/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp256.rb; sed -i '14 {s/^/#/}' /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/hrr_rb_ssh-0.4.2/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp384.rb; sed -i '14 {s/^/#/}' /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/hrr_rb_ssh-0.4.2/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp521.rb; clear;echo "Done...."
Finally go to home cd Now run msfconsole ๐ *** Powered by VirajLR ***