File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
spec/lib/metasploit/framework/login_scanner Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 31
31
32
32
it 'returns a failed result when authentication fails' do
33
33
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
35
36
result = login_scanner . attempt_login ( test_cred )
36
37
expect ( result . status ) . to eq Metasploit ::Model ::Login ::Status ::INCORRECT
37
38
end
You can’t perform that action at this time.
0 commit comments