├── msf.png ├── ruby.png ├── LICENSE ├── metasploit.sh └── README.md /msf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JesusChapman/Metasploit_by-yisus/HEAD/msf.png -------------------------------------------------------------------------------- /ruby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JesusChapman/Metasploit_by-yisus/HEAD/ruby.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Yisus7u7 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /metasploit.sh: -------------------------------------------------------------------------------- 1 | #!/data/data/com.termux/files/usr/bin/bash 2 | # Forked from: https://github.com/Hax4us/Metasploit_termux 3 | clear 4 | echo " 5 | +-+-+-+-+-+-+-+-+-+-+ +-+-+ +-+-+-+-+-+-+ 6 | |M|e|t|a|s|p|l|o|i|t| |i|n| |T|e|r|m|u|x| 7 | +-+-+-+-+-+-+-+-+-+-+ +-+-+ +-+-+-+-+-+-+ 8 | +-+-+ +-+-+-+-+-+-+-+-+-+-+ 9 | |b|y| |G|u|s|h|m|a|z|u|k|o 10 | fixed by yisus7u7 11 | +-+-+ +-+-+-+-+-+-+-+-+-+-+ 12 | " 13 | 14 | center() { 15 | termwidth=$(stty size | cut -d" " -f2) 16 | padding="$(printf '%0.1s' ={1..500})" 17 | printf '%*.*s %s %*.*s\n' 0 "$(((termwidth-2-${#1})/2))" "$padding" "$1" 0 "$(((termwidth-1-${#1})/2))" "$padding" 18 | } 19 | 20 | # Loading spinner 21 | center " Loading..." 22 | source <(echo "c3Bpbm5lcj0oICd8JyAnLycgJy0nICdcJyApOwoKY291bnQoKXsKICBzcGluICYKICBwaWQ9JCEKICBmb3IgaSBpbiBgc2VxIDEgMTBgCiAgZG8KICAgIHNsZWVwIDE7CiAgZG9uZQoKICBraWxsICRwaWQgIAp9CgpzcGluKCl7CiAgd2hpbGUgWyAxIF0KICBkbyAKICAgIGZvciBpIGluICR7c3Bpbm5lcltAXX07IAogICAgZG8gCiAgICAgIGVjaG8gLW5lICJcciRpIjsKICAgICAgc2xlZXAgMC4yOwogICAgZG9uZTsKICBkb25lCn0KCmNvdW50" | base64 -d) 23 | 24 | echo 25 | center "*** Dependencies installation..." 26 | pkg install -y autoconf bison clang coreutils curl findutils apr apr-util postgresql openssl readline libffi libgmp libpcap libsqlite libgrpc libtool libxml2 libxslt ncurses make ncurses-utils ncurses git wget unzip zip tar termux-tools termux-elf-cleaner pkg-config git -o Dpkg::Options::="--force-confnew" 27 | 28 | echo 29 | center "*** Fix ruby BigDecimal" 30 | source <(curl -sL https://github.com/termux/termux-packages/files/2912002/fix-ruby-bigdecimal.sh.txt) 31 | 32 | echo 33 | center "*** Erasing old metasploit folder..." 34 | rm -rf $HOME/metasploit-framework 35 | 36 | echo 37 | center "*** Downloading..." 38 | cd $HOME 39 | git clone https://github.com/rapid7/metasploit-framework.git 40 | 41 | echo 42 | center "*** Installation..." 43 | cd $HOME/metasploit-framework 44 | sed '/rbnacl/d' -i Gemfile.lock 45 | sed '/rbnacl/d' -i metasploit-framework.gemspec 46 | gem install bundler 47 | sed 's|nokogiri (1.*)|nokogiri (1.8.0)|g' -i Gemfile.lock 48 | 49 | gem install nokogiri -v 1.8.0 -- --use-system-libraries 50 | 51 | gem install actionpack 52 | bundle update activesupport 53 | bundle update --bundler 54 | bundle install -j5 55 | $PREFIX/bin/find -type f -executable -exec termux-fix-shebang \{\} \; 56 | rm ./modules/auxiliary/gather/http_pdf_authors.rb 57 | if [ -e $PREFIX/bin/msfconsole ];then 58 | rm $PREFIX/bin/msfconsole 59 | fi 60 | if [ -e $PREFIX/bin/msfvenom ];then 61 | rm $PREFIX/bin/msfvenom 62 | fi 63 | ln -s $HOME/metasploit-framework/msfconsole /data/data/com.termux/files/usr/bin/ 64 | ln -s $HOME/metasploit-framework/msfvenom /data/data/com.termux/files/usr/bin/ 65 | termux-elf-cleaner /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/pg-0.20.0/lib/pg_ext.so 66 | 67 | echo 68 | center "*** Database configuration..." 69 | cd $HOME/metasploit-framework/config 70 | curl -sLO https://raw.githubusercontent.com/gushmazuko/metasploit_in_termux/master/database.yml 71 | 72 | mkdir -p $PREFIX/var/lib/postgresql 73 | initdb $PREFIX/var/lib/postgresql 74 | 75 | pg_ctl -D $PREFIX/var/lib/postgresql start 76 | createuser msf 77 | createdb msf_database 78 | 79 | cd $HOME 80 | curl -sLO https://raw.githubusercontent.com/gushmazuko/metasploit_in_termux/master/postgresql_ctl.sh 81 | chmod +x postgresql_ctl.sh 82 | 83 | echo 84 | center "*" 85 | echo -e "\033[32m Installation complete. \n To start msf database use: ./postgresql_ctl.sh start \n Launch metasploit by executing: msfconsole\033[0m" 86 | center "*" 87 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | `repositorio desmantenido` 2 | Cambiese a 3 | 4 | https://github.com/gushmazuko/metasploit_in_termux 5 | 6 | # Metasploit_by-yisus 7 | Este instalador instalará Metasploit en termux solucionando el error de ruby 3.0.0 8 | 9 | Termux actualizo ruby a la versión 3.0.0, Metasploit funciona con ruby 2.7.2, 10 | Pero yo e encontrado solucion al problema, sigue 11 | estos pasos: 12 | 13 | SIGUE LOS SIGUIENTES PASOS EN ORDEN : 14 | !es recomendable usar Android 7 en adelante! 15 | 16 | # ruby 2.7.2 17 | 18 | primero eliminamos la versión 3.0.0 de ruby: 19 | 20 | pkg uninstall ruby 21 | 22 | Ahora añadiremos el repositorio de hbhacker 23 | (Gracias abhacker por mantener una compilación 24 | de ruby en tus repositorios!!) 25 | 26 | pkg install curl 27 | 28 | bash -c "$(curl -fsSL https://bit.do/abhacker-repo)" 29 | 30 | si no te funciona este comando sigue las instrucciones 31 | en su repositorio oficial : 32 | https://github.com/abhackerofficial/abhacker.repo 33 | 34 | Nota (si estas usando fish o zsh cambia tu 35 | terminal a bash) 36 | 37 | Luego actualizamos: 38 | 39 | pkg update && pkg upgrade 40 | 41 | Ahora instalamos ruby 2.7.2 : 42 | 43 | pkg install ruby2 44 | 45 | # No sirvió?, instala el 46 | paquete manualmente, para saber tu arquitectura 47 | usa el comando : 48 | 49 | uname -m 50 | 51 | Luego de saber tu arquitectura descarga el 52 | paquete compatible con ella : 53 | 54 | # Binario para Armv7l y otros celulares ARM: 55 | 56 | pkg add libyaml libffi gdbm perl tar proot aapt 57 | 58 | wget https://github.com/abhackerofficial/abhacker.repo/raw/master/dists/abhacker/main/binary-arm/ruby.deb 59 | 60 | dpkg -i ruby.deb 61 | 62 | # Binario Pará aarch64 : 63 | 64 | pkg add libyaml libffi gdbm perl tar proot aapt 65 | 66 | wget https://github.com/abhackerofficial/abhacker.repo/blob/master/dists/abhacker/main/binary-aarch64/ruby.deb 67 | 68 | dpkg -i ruby.deb 69 | 70 | # Binario para i686 : 71 | 72 | pkg add libyaml libffi gdbm perl tar proot aapt 73 | 74 | wget https://github.com/abhackerofficial/abhacker.repo/blob/master/dists/abhacker/main/binary-i686/ruby.deb 75 | 76 | dpkg -i ruby.deb 77 | 78 | # Binario para x86_64 : 79 | 80 | pkg add libyaml libffi gdbm perl tar proot aapt 81 | 82 | wget https://github.com/abhackerofficial/abhacker.repo/blob/master/dists/abhacker/main/binary-x86_64/ruby.deb 83 | 84 | dpkg -i ruby.deb 85 | 86 | 87 | # exelente 88 | 89 | ahora comprobamos que tenemos ruby 2.7.2 : 90 | 91 | ruby --version 92 | 93 | Nos debe salir esto : 94 | 95 | ![imagen 1](./ruby.png) 96 | 97 | con que salga 2.7.2 ya todo va correcto 98 | 99 | # conjelar actualizaciones 100 | 101 | Luego de tener ruby 2.7.2, conjelaremos sus actualizaciones 102 | para evitar que se actualize : 103 | 104 | apt-mark hold ruby 105 | 106 | Luego : 107 | 108 | pkg update && pkg upgrade, luego de esto veras 109 | que termux no actualizará ruby a la versión 3.0.0 110 | 111 | # instalación de Metasploit 112 | 113 | Primero clone este repositorio 114 | 115 | cd $HOME 116 | 117 | git clone https://github.com/Yisus7u7/Metasploit_by-yisus 118 | 119 | chmod +x ~/Metasploit_by-yisus/* 120 | 121 | mv ~/Metasploit_by-yisus/metasploit.sh $HOME 122 | 123 | Ahora ejecute : 124 | 125 | bash metasploit.sh 126 | 127 | O 128 | 129 | ./metasploit.sh 130 | 131 | ![imagen 2](./msf.png) 132 | 133 | # créditos : 134 | 135 | Gracias gushmazuko, hice solo una muy pequeña 136 | edición de tu script, y me gusta gente como tu, 137 | que no cifran sus scripts "para que no los copien" 138 | y los scripts que hacen no tienen sentido o son 139 | solo bobadas 140 | 141 | Repositorio de gushmazuko: 142 | https://github.com/gushmazuko/metasploit_in_termux 143 | 144 | abhaker, gracias por alojar ruby 2.7.2 en tus 145 | repositorios, gracias por eso de ante mano 146 | 147 | Repositorio de abhacker : 148 | 149 | https://github.com/abhackerofficial/abhacker.repo 150 | 151 | # Manifiesto 152 | 153 | puedes hacer reviews en tu blog, página canal de 154 | YouTube etc.., también puedes crear un repositorio 155 | con un script para que toda esta instalación 156 | sea más fácil, siempre y cuando dejes créditos 🙂🌟 157 | 158 | # apoyame!! 159 | 160 | Buscame en tik tok como: @yisus7u7v 161 | 162 | en YouTube : https://youtube.com/channel/UCjUSc4m0DpPgJ3iHNZtQmQw 163 | --------------------------------------------------------------------------------