diff --git a/.travis.yml b/.travis.yml index 167b76f254..a5f8535c51 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ language: ruby rvm: - '2.5.8' - '2.6.6' + - '2.7.2' env: - CMD='bundle exec rake rspec-rerun:spec SPEC_OPTS="--tag content"' @@ -43,7 +44,7 @@ before_install: - ls -la ./.git/hooks - ./.git/hooks/post-merge # Update the bundler - - gem update --system 3.0.6 + - gem update --system - gem install bundler before_script: - cp config/database.yml.travis config/database.yml diff --git a/Gemfile.lock b/Gemfile.lock index d914c5f476..b55037a20b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -462,4 +462,4 @@ DEPENDENCIES yard BUNDLED WITH - 1.17.3 + 2.1.4 diff --git a/spec/lib/msf/core/exploit/smb/server/share/command/close_spec.rb b/spec/lib/msf/core/exploit/smb/server/share/command/close_spec.rb index f8a451fef8..b614f047f5 100644 --- a/spec/lib/msf/core/exploit/smb/server/share/command/close_spec.rb +++ b/spec/lib/msf/core/exploit/smb/server/share/command/close_spec.rb @@ -19,11 +19,13 @@ RSpec.describe Msf::Exploit::Remote::SMB::Server::Share do let(:response_length) { 39 } let(:valid_response) do - "\x00\x00\x00\x23\xff\x53\x4d\x42" + - "\x04\x00\x00\x00\x00\x88\x01\xc8" + - "\x00\x00\x00\x00\x00\x00\x00\x00" + - "\x00\x00\x00\x00\x00\x00\x48\x47" + - "\x00\x00\x44\x43\x00\x00\x00" + value = + "\x00\x00\x00\x23\xff\x53\x4d\x42" + + "\x04\x00\x00\x00\x00\x88\x01\xc8" + + "\x00\x00\x00\x00\x00\x00\x00\x00" + + "\x00\x00\x00\x00\x00\x00\x48\x47" + + "\x00\x00\x44\x43\x00\x00\x00" + value.b end before(:example) do diff --git a/spec/lib/msf/core/exploit/smb/server/share/command/negotiate_spec.rb b/spec/lib/msf/core/exploit/smb/server/share/command/negotiate_spec.rb index a1315a7853..1e54545dfb 100644 --- a/spec/lib/msf/core/exploit/smb/server/share/command/negotiate_spec.rb +++ b/spec/lib/msf/core/exploit/smb/server/share/command/negotiate_spec.rb @@ -20,27 +20,31 @@ RSpec.describe Msf::Exploit::Remote::SMB::Server::Share do let(:default_response_length) { 73 } let(:default_response) do - "\x00\x00\x00\x45\xff\x53\x4d\x42" + - "\x72\x00\x00\x00\x00\x88\x01\xc8" + - "\x00\x00\x00\x00\x00\x00\x00\x00" + - "\x00\x00\x00\x00\x00\x00\x48\x47" + - "\x00\x00\x44\x43\x11\x00\x00\x00" + - "\x00\x00\x00\x00\x00\x00\x00\x00" + - "\x00\x00\x00\x00\x00\x00\x00\x00" + - "\x00\x00\x00\x00\x00\x00\x00\x00" + - "\x00\x00\x00\x00\x00\x00\x00\x00" + - "\x00" + value = + "\x00\x00\x00\x45\xff\x53\x4d\x42" + + "\x72\x00\x00\x00\x00\x88\x01\xc8" + + "\x00\x00\x00\x00\x00\x00\x00\x00" + + "\x00\x00\x00\x00\x00\x00\x48\x47" + + "\x00\x00\x44\x43\x11\x00\x00\x00" + + "\x00\x00\x00\x00\x00\x00\x00\x00" + + "\x00\x00\x00\x00\x00\x00\x00\x00" + + "\x00\x00\x00\x00\x00\x00\x00\x00" + + "\x00\x00\x00\x00\x00\x00\x00\x00" + + "\x00" + value.b end let(:valid_request) do - "\x00\x00\x00\x85\xff\x53\x4d\x42\x72\x00\x00\x00\x00\x18\x43\xc8" + - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xfe" + - "\x00\x00\x00\x00\x00\x62\x00\x02\x50\x43\x20\x4e\x45\x54\x57\x4f" + - "\x52\x4b\x20\x50\x52\x4f\x47\x52\x41\x4d\x20\x31\x2e\x30\x00\x02" + - "\x4c\x41\x4e\x4d\x41\x4e\x31\x2e\x30\x00\x02\x57\x69\x6e\x64\x6f" + - "\x77\x73\x20\x66\x6f\x72\x20\x57\x6f\x72\x6b\x67\x72\x6f\x75\x70" + - "\x73\x20\x33\x2e\x31\x61\x00\x02\x4c\x4d\x31\x2e\x32\x58\x30\x30" + - "\x32\x00\x02\x4c\x41\x4e\x4d\x41\x4e\x32\x2e\x31\x00\x02\x4e\x54" + - "\x20\x4c\x4d\x20\x30\x2e\x31\x32\x00" + value = + "\x00\x00\x00\x85\xff\x53\x4d\x42\x72\x00\x00\x00\x00\x18\x43\xc8" + + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xfe" + + "\x00\x00\x00\x00\x00\x62\x00\x02\x50\x43\x20\x4e\x45\x54\x57\x4f" + + "\x52\x4b\x20\x50\x52\x4f\x47\x52\x41\x4d\x20\x31\x2e\x30\x00\x02" + + "\x4c\x41\x4e\x4d\x41\x4e\x31\x2e\x30\x00\x02\x57\x69\x6e\x64\x6f" + + "\x77\x73\x20\x66\x6f\x72\x20\x57\x6f\x72\x6b\x67\x72\x6f\x75\x70" + + "\x73\x20\x33\x2e\x31\x61\x00\x02\x4c\x4d\x31\x2e\x32\x58\x30\x30" + + "\x32\x00\x02\x4c\x41\x4e\x4d\x41\x4e\x32\x2e\x31\x00\x02\x4e\x54" + + "\x20\x4c\x4d\x20\x30\x2e\x31\x32\x00" + value.b end let(:valid_response_length) { 81 } let(:challenge_length) { 8 } diff --git a/spec/support/shared/contexts/msf/string_io.rb b/spec/support/shared/contexts/msf/string_io.rb index 880f6eeb36..25eedbe909 100644 --- a/spec/support/shared/contexts/msf/string_io.rb +++ b/spec/support/shared/contexts/msf/string_io.rb @@ -13,6 +13,7 @@ RSpec.shared_context 'Msf::StringIO' do end s.msf_data = '' + s.binmode s end