From d1124c44f5e561b80f9c04b1afdec4fc7072d318 Mon Sep 17 00:00:00 2001 From: sjanusz-r7 Date: Wed, 2 Apr 2025 15:48:42 +0100 Subject: [PATCH] Fix Rinda msfcrawler error --- Gemfile.lock | 7 +++++++ metasploit-framework.gemspec | 1 + modules/auxiliary/crawler/msfcrawler.rb | 6 ++++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e009f163c6..1c20739127 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -94,6 +94,7 @@ PATH rex-struct2 rex-text rex-zip + rinda ruby-macho ruby-mysql ruby_smb (~> 3.3.3) @@ -252,6 +253,7 @@ GEM fiddle (1.1.6) filesize (0.2.0) fivemat (1.3.7) + forwardable (1.3.3) getoptlong (0.2.1) gssapi (1.3.1) ffi (>= 1.0.1) @@ -271,6 +273,7 @@ GEM i18n (1.14.7) concurrent-ruby (~> 1.0) io-console (0.8.0) + ipaddr (1.2.7) irb (1.7.4) reline (>= 0.3.6) jmespath (1.6.2) @@ -466,6 +469,10 @@ GEM rex-zip (0.1.6) rex-text rexml (3.4.1) + rinda (0.2.0) + drb + forwardable + ipaddr rkelly-remix (0.0.7) rspec (3.13.0) rspec-core (~> 3.13.0) diff --git a/metasploit-framework.gemspec b/metasploit-framework.gemspec index 3912b83514..8fcdd242a3 100644 --- a/metasploit-framework.gemspec +++ b/metasploit-framework.gemspec @@ -270,6 +270,7 @@ Gem::Specification.new do |spec| getoptlong mutex_m ostruct + rinda ].each do |library| spec.add_runtime_dependency library end diff --git a/modules/auxiliary/crawler/msfcrawler.rb b/modules/auxiliary/crawler/msfcrawler.rb index d42f0619f8..9008a82a5f 100644 --- a/modules/auxiliary/crawler/msfcrawler.rb +++ b/modules/auxiliary/crawler/msfcrawler.rb @@ -14,6 +14,8 @@ require 'openssl' require 'pathname' require 'uri' +require 'rinda/rinda' +require 'rinda/tuplespace' class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Scanner @@ -70,7 +72,7 @@ class MetasploitModule < Msf::Auxiliary 'data' => nil } - @NotViewedQueue = Rinda::TupleSpace.new + @NotViewedQueue = ::Rinda::TupleSpace.new @ViewedQueue = Hash.new @UriLimits = Hash.new @curent_site = self.ctarget @@ -152,7 +154,7 @@ class MetasploitModule < Msf::Auxiliary #### end - rescue Rinda::RequestExpiredError + rescue ::Rinda::RequestExpiredError print_status("END.") return end