Skip to content

Commit 09772cb

Browse files
committed
Add negotiate_auth step to login_scanner test
1 parent 563cb6f commit 09772cb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spec/lib/metasploit/framework/login_scanner/vnc_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131

3232
it 'returns a failed result when authentication fails' do
3333
expect_any_instance_of(Rex::Proto::RFB::Client).to receive(:handshake).and_return true
34-
expect_any_instance_of(Rex::Proto::RFB::Client).to receive(:authenticate_with_type).with(nil,nil,private).and_return false
34+
expect_any_instance_of(Rex::Proto::RFB::Client).to receive(:negotiate_authentication).and_return Rex::Proto::RFB::AuthType::VNC
35+
expect_any_instance_of(Rex::Proto::RFB::Client).to receive(:authenticate_with_type).with(Rex::Proto::RFB::AuthType::VNC,nil,private).and_return false
3536
result = login_scanner.attempt_login(test_cred)
3637
expect(result.status).to eq Metasploit::Model::Login::Status::INCORRECT
3738
end

0 commit comments

Comments
 (0)