rapid7 / metasploit-omnibus

Packaging metasploit-framework with omnibus
243 stars 202 forks source link

Running framework tools directly does not work #126

Open adfoster-r7 opened 4 years ago

adfoster-r7 commented 4 years ago

It's currently not possible to run framework tools directly:

/opt/metasploit-framework/embedded/framework/tools/exploit/pattern_create.rb

On Kali this gives the following error:

Traceback (most recent call last):                                                                                   
        3: from /opt/metasploit-framework/embedded/framework/tools/exploit/pattern_create.rb:16:in `<main>'          
        2: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_gem.rb:62:in `gem'                                      
        1: from /usr/lib/ruby/2.7.0/rubygems/dependency.rb:323:in `to_spec'                                          
/usr/lib/ruby/2.7.0/rubygems/dependency.rb:311:in `to_specs': Could not find 'rex-text' (>= 0) among 90 total gem(s) 
(Gem::MissingSpecError)                                                                                              
Checked in 'GEM_PATH=/root/.gem/ruby/2.7.0:/var/lib/gems/2.7.0:/usr/lib/ruby/gems/2.7.0:/usr/share/rubygems-integrati│
on/2.7.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0', execute `gem env`│
for more information 

A fix is most likely required in Metasploit ommnibus to add wrappers to the tools, or something similar.

Full context: https://github.com/rapid7/metasploit-framework/issues/13411

Identical issue: https://github.com/rapid7/metasploit-framework/issues/18011

busterb commented 4 years ago

for reference, the native Kali package has this behavior: https://twitter.com/g0tmi1k/status/973570367490088960?lang=en

hum4nG0D commented 3 years ago

gem install rex-text fixed the issue for me.

https://hornenielsen.wordpress.com/2016/07/13/gem-install-rex-text-saves-the-day/

0xPhoenixx commented 1 year ago

gem install rex-text fixed the issue for me.

https://hornenielsen.wordpress.com/2016/07/13/gem-install-rex-text-saves-the-day/

Thanks @hum4nG0D, fixed it for me.