diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index d36a1252ad620..fec65ab721485 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -64,10 +64,10 @@ jobs: fail-fast: true matrix: ruby: - - '2.7' - '3.0' - '3.1' - '3.2' + - '3.3.0-preview1' os: - ubuntu-20.04 - ubuntu-latest @@ -99,6 +99,8 @@ jobs: - name: Setup Ruby env: BUNDLE_WITHOUT: "coverage development pcap" + # Nokogiri doesn't release pre-compiled binaries for preview versions of Ruby; So force compilation with BUNDLE_FORCE_RUBY_PLATFORM + BUNDLE_FORCE_RUBY_PLATFORM: "${{ contains(matrix.ruby, 'preview') && 'true' || 'false' }}" uses: ruby/setup-ruby@v1 with: ruby-version: '${{ matrix.ruby }}' diff --git a/Gemfile.lock b/Gemfile.lock index 8f80ebc89d96b..8ee9e239523f0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -298,8 +298,8 @@ GEM openssl-ccm (1.2.3) openssl-cmac (2.0.2) openvas-omp (0.0.4) - packetfu (1.1.13) - pcaprub + packetfu (2.0.0) + pcaprub (~> 0.13.1) parallel (1.23.0) parser (3.2.2.3) ast (~> 2.4.1) diff --git a/lib/msf/util/windows_crypto_helpers.rb b/lib/msf/util/windows_crypto_helpers.rb index 472b39a55ec0d..ca3d6ee6a2ac5 100644 --- a/lib/msf/util/windows_crypto_helpers.rb +++ b/lib/msf/util/windows_crypto_helpers.rb @@ -79,7 +79,7 @@ def decrypt_secret_data(secret, key) j = key[j..j+7].length end end - dec_data_len = decrypted_data[0,4].unpack(' p.encoded }) @@ -252,7 +252,7 @@ def process_options(cli, request) end def convert_to_char_code(str) - return str.unpack('H*')[0].gsub(Regexp.new(".{#{2}}", nil, 'n')) { |s| s.hex.to_s + "," }.chop + return str.unpack('H*')[0].gsub(Regexp.new(".{#{2}}", Regexp::NOENCODING)) { |s| s.hex.to_s + "," }.chop end # # PROPFIND requests sent by the WebDav Mini-Redirector @@ -262,7 +262,7 @@ def process_propfind(cli, request) print_status("Received WebDAV PROPFIND request") body = '' - if (Regexp.new(Regexp.escape(@payload)+'$', true).match(path)) + if Regexp.new(Regexp.escape(@payload)+'$', Regexp::IGNORECASE).match(path) # Response for the EXE print_status("Sending EXE multistatus for #{path} ...") #45056 diff --git a/modules/exploits/windows/http/httpdx_tolog_format.rb b/modules/exploits/windows/http/httpdx_tolog_format.rb index baf8e407697f8..7b2ae3f8cf775 100644 --- a/modules/exploits/windows/http/httpdx_tolog_format.rb +++ b/modules/exploits/windows/http/httpdx_tolog_format.rb @@ -161,7 +161,7 @@ def exploit fail_with(Failure::Unknown, "The server doesn't appear to be running a vulnerable version of HTTPDX") end - re = Regexp.new(Regexp.escape(version)+' - ', true) + re = Regexp.new(Regexp.escape(version)+' - ', Regexp::IGNORECASE) self.targets.each do |t| if (re.match(t.name)) mytarget = t diff --git a/spec/api/json_rpc_spec.rb b/spec/api/json_rpc_spec.rb index c2f1c13740c47..26b5d66ae2935 100644 --- a/spec/api/json_rpc_spec.rb +++ b/spec/api/json_rpc_spec.rb @@ -294,8 +294,7 @@ def mock_rack_env(mock_rack_env_value) before(:each) do allow_any_instance_of(::Msf::Auxiliary::Scanner).to receive(:check) do - res = nil - res.body + raise 'Unexpected module error' end end @@ -316,7 +315,7 @@ def mock_rack_env(mock_rack_env_value) expected_error_response = { result: { status: 'errored', - error: "undefined method `body' for nil:NilClass" + error: "Unexpected module error" } } expect(last_json_response).to include(expected_error_response)