Metasploit Issues

This copy of metasploit-framework is more than two weeks old – /opt/metasploit-framework/embedded/lib/ruby/3.0.0/ipaddr.rb:622:in `match’: stack level too deep (SystemStackError)

I recently got this error ‘This copy of metasploit-framework is more than two weeks old – /opt/metasploit-framework/embedded/lib/ruby/3.0.0/ipaddr.rb:622:in `match’: stack level too deep (SystemStackError)’

I tried many different ways to solve this including reinstalling Metasploit, If i were you I wouldn’t bother as the metaspolit is native to Kali as standard and you don’t need to go messing with this.

The confirmed way to fix this is overwrite ‘ipaddr.rb’ https://github.com/ruby/ipaddr/blob/master/lib/ipaddr.rb

cd /opt/metasploit-framework/embedded/lib/ruby/3.0.0/

sudo nano

paste the contents from the url into the blank text editor

Ctrl + O to write Out + give it the name 'ipaddr.rb'

Accept overwrite popup and exit (Ctrl +X)