尝试安装metasploit时termux上的ruby版本出错

brjng4g3  于 2022-12-26  发布在  Ruby
关注(0)|答案(3)|浏览(388)

我正在安装metasploit与termux和它说:termux output

~ $ ls <br>
metasploit-framework  storage  wiki-termux<br>
~ $ cd metasploit-framework<br>
~/metasploit-framework $ ruby msfconsole<br>
Could not find Ascii85-1.1.0 in any of the sources<br>
Run bundle install to install missing gems.<br>
~/metasploit-framework $ bundle install<br>
Fetching gem metadata from https://rubygems.org/.........<br>
pcaprub-0.13.0 requires ruby version ~> 2.0, which is incompatible with the<br>
current version, ruby 3.0.0p0<br>

如果我尝试直接安装metaploit:
termux output

~ $ ls
metasploit-framework  storage  wiki-termux <br>
~ $ cd metasploit-framework <br>
~/metasploit-framework $ msfconsole <br>
The program msfconsole is not installed. Install it by executing: <br>
 pkg install metasploit <br>
~/metasploit-framework $ pkg install metasploit <br>
Checking availability of current mirror: ok <br>
Get:2  https://ipfs.io/ipns/k51qzi5uqu5dj05z8mr958kwvrg7a0wqouj5nnoo5uqu1btnsljvpznfaav9nk unstable InRelease [14.0 kB]<br>
Get:3 https://ipfs.io/ipns/k51qzi5uqu5dgu3homski160l4t4bmp52vb6dbgxb5bda90rewnwg64wnkwxj4 x11 InRelease [14.0 kB]<br>
Get:1 https://10.via0.com/ipns/k51qzi5uqu5dg9vawh923wejqffxiu9bhqlze5f508msk0h7ylpac27fdgaskx stable InRelease<br>
Hit:4 https://grimler.se/game-packages-24 games InRelease <br>
Hit:5 https://grimler.se/science-packages-24 science InRelease <br>
Fetched 42.0 kB in 4s (10.9 kB/s) <br>
Reading package lists... Done <br>
Building dependency tree... Done <br>
Reading state information... Done <br>
All packages are up to date. <br>
Reading package lists... Done <br>
Building dependency tree... Done <br>
Reading state information... Done <br>
E: Unable to locate package metasploit <br>
x6h2sr28

x6h2sr281#

termux已删除metasploit和hydra包https://wiki.termux.com/wiki/FAQ#Where_are_Metasploit_and_Hydra_packages

iyr7buue

iyr7buue2#

您需要Termuxblack来安装Ruby 2。
首次安装wget:

pkg install wget

现在获取Termuxblack,网址:install.sh:

wget https://github.com/Hax4us/TermuxBlack/raw/master/install.sh

然后键入

sh install.sh

现在您可以安装Ruby 2:

apt update && apt remove ruby && apt install ruby2

现在键入“bundler install”以安装缺少的gem(您应该位于metasploit-framework/目录中)。
然后您可以使用./msfconsole或./msfvenom
如果要创建快捷方式:

nano /usr/etc/profile.d/bash_aliases.sh

输入验证码:

alias msfconsole='/$HOME/path to metasploit/msfconsole' alias msfvenom='/$HOME/path to metasploit/msfvenom'

现在您可以使用msfconsole或msfvenom。

avwztpqn

avwztpqn3#

此问题已修复。请检查source

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...."

使用源代码建议的官方Metasploit存储库。

相关问题