Mock :password

bug/bundler_fix
wchen-r7 2017-01-23 13:42:30 -06:00
parent 5de09d3455
commit d9ead4484e
9 changed files with 11 additions and 0 deletions

View File

@ -16,6 +16,7 @@ RSpec.describe Metasploit::Framework::LoginScanner::Base do
creds = double('Metasploit::Framework::CredentialCollection')
allow(creds).to receive(:pass_file)
allow(creds).to receive(:username).and_return('user')
allow(creds).to receive(:password).and_return('pass')
allow(creds).to receive(:user_file)
allow(creds).to receive(:userpass_file)
allow(creds).to receive(:prepended_creds).and_return([])

View File

@ -54,6 +54,7 @@ RSpec.describe Metasploit::Framework::LoginScanner::FTP do
allow(creds).to receive(:pass_file)
allow(creds).to receive(:username)
allow(creds).to receive(:user_file)
allow(creds).to receive(:password)
allow(creds).to receive(:userpass_file)
allow(creds).to receive(:prepended_creds).and_return([])
allow(creds).to receive(:additional_privates).and_return([])

View File

@ -43,6 +43,7 @@ RSpec.describe Metasploit::Framework::LoginScanner::MSSQL do
creds = double('Metasploit::Framework::CredentialCollection')
allow(creds).to receive(:pass_file)
allow(creds).to receive(:username)
allow(creds).to receive(:password)
allow(creds).to receive(:user_file)
allow(creds).to receive(:userpass_file)
allow(creds).to receive(:prepended_creds).and_return([])

View File

@ -51,6 +51,7 @@ RSpec.describe Metasploit::Framework::LoginScanner::SMB do
creds = double('Metasploit::Framework::CredentialCollection')
allow(creds).to receive(:pass_file)
allow(creds).to receive(:username)
allow(creds).to receive(:password)
allow(creds).to receive(:user_file)
allow(creds).to receive(:userpass_file)
allow(creds).to receive(:prepended_creds).and_return([])

View File

@ -64,6 +64,7 @@ RSpec.describe Metasploit::Framework::LoginScanner::SSH do
creds = double('Metasploit::Framework::CredentialCollection')
allow(creds).to receive(:pass_file)
allow(creds).to receive(:username)
allow(creds).to receive(:password)
allow(creds).to receive(:user_file)
allow(creds).to receive(:userpass_file)
allow(creds).to receive(:prepended_creds).and_return([])

View File

@ -16,6 +16,7 @@ RSpec.describe Metasploit::Framework::LoginScanner::Telnet do
creds = double('Metasploit::Framework::CredentialCollection')
allow(creds).to receive(:pass_file)
allow(creds).to receive(:username)
allow(creds).to receive(:password)
allow(creds).to receive(:user_file)
allow(creds).to receive(:userpass_file)
allow(creds).to receive(:prepended_creds).and_return([])

View File

@ -69,6 +69,7 @@ RSpec.shared_examples_for 'Metasploit::Framework::LoginScanner::Base' do | opts
creds = double('Metasploit::Framework::CredentialCollection')
allow(creds).to receive(:pass_file)
allow(creds).to receive(:username)
allow(creds).to receive(:password)
allow(creds).to receive(:user_file)
allow(creds).to receive(:userpass_file)
allow(creds).to receive(:prepended_creds).and_return([])
@ -175,6 +176,7 @@ RSpec.shared_examples_for 'Metasploit::Framework::LoginScanner::Base' do | opts
creds = double('Metasploit::Framework::CredentialCollection')
allow(creds).to receive(:pass_file)
allow(creds).to receive(:username)
allow(creds).to receive(:password)
allow(creds).to receive(:user_file)
allow(creds).to receive(:userpass_file)
allow(creds).to receive(:prepended_creds).and_return([])
@ -190,6 +192,7 @@ RSpec.shared_examples_for 'Metasploit::Framework::LoginScanner::Base' do | opts
allow(creds).to receive(:pass_file)
allow(creds).to receive(:pass_file)
allow(creds).to receive(:username)
allow(creds).to receive(:password)
allow(creds).to receive(:user_file)
allow(creds).to receive(:userpass_file)
allow(creds).to receive(:prepended_creds).and_return([])

View File

@ -15,6 +15,7 @@ RSpec.shared_examples_for 'Metasploit::Framework::LoginScanner::NTLM' do
creds = double('Metasploit::Framework::CredentialCollection')
allow(creds).to receive(:pass_file)
allow(creds).to receive(:username)
allow(creds).to receive(:password)
allow(creds).to receive(:user_file)
allow(creds).to receive(:userpass_file)
allow(creds).to receive(:prepended_creds).and_return([])

View File

@ -9,6 +9,7 @@ RSpec.shared_examples_for 'Metasploit::Framework::Tcp::Client' do
creds = double('Metasploit::Framework::CredentialCollection')
allow(creds).to receive(:pass_file)
allow(creds).to receive(:username)
allow(creds).to receive(:password)
allow(creds).to receive(:user_file)
allow(creds).to receive(:userpass_file)
allow(creds).to receive(:prepended_creds).and_return([])