Skip to content

Commit d9ead44

Browse files
committed
Mock :password
1 parent 5de09d3 commit d9ead44

File tree

9 files changed

+11
-0
lines changed

9 files changed

+11
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ def self.model_name
1616
creds = double('Metasploit::Framework::CredentialCollection')
1717
allow(creds).to receive(:pass_file)
1818
allow(creds).to receive(:username).and_return('user')
19+
allow(creds).to receive(:password).and_return('pass')
1920
allow(creds).to receive(:user_file)
2021
allow(creds).to receive(:userpass_file)
2122
allow(creds).to receive(:prepended_creds).and_return([])

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
allow(creds).to receive(:pass_file)
5555
allow(creds).to receive(:username)
5656
allow(creds).to receive(:user_file)
57+
allow(creds).to receive(:password)
5758
allow(creds).to receive(:userpass_file)
5859
allow(creds).to receive(:prepended_creds).and_return([])
5960
allow(creds).to receive(:additional_privates).and_return([])

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
creds = double('Metasploit::Framework::CredentialCollection')
4444
allow(creds).to receive(:pass_file)
4545
allow(creds).to receive(:username)
46+
allow(creds).to receive(:password)
4647
allow(creds).to receive(:user_file)
4748
allow(creds).to receive(:userpass_file)
4849
allow(creds).to receive(:prepended_creds).and_return([])

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
creds = double('Metasploit::Framework::CredentialCollection')
5252
allow(creds).to receive(:pass_file)
5353
allow(creds).to receive(:username)
54+
allow(creds).to receive(:password)
5455
allow(creds).to receive(:user_file)
5556
allow(creds).to receive(:userpass_file)
5657
allow(creds).to receive(:prepended_creds).and_return([])

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
creds = double('Metasploit::Framework::CredentialCollection')
6565
allow(creds).to receive(:pass_file)
6666
allow(creds).to receive(:username)
67+
allow(creds).to receive(:password)
6768
allow(creds).to receive(:user_file)
6869
allow(creds).to receive(:userpass_file)
6970
allow(creds).to receive(:prepended_creds).and_return([])

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
creds = double('Metasploit::Framework::CredentialCollection')
1717
allow(creds).to receive(:pass_file)
1818
allow(creds).to receive(:username)
19+
allow(creds).to receive(:password)
1920
allow(creds).to receive(:user_file)
2021
allow(creds).to receive(:userpass_file)
2122
allow(creds).to receive(:prepended_creds).and_return([])

spec/support/shared/examples/metasploit/framework/login_scanner/login_scanner_base.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
creds = double('Metasploit::Framework::CredentialCollection')
7070
allow(creds).to receive(:pass_file)
7171
allow(creds).to receive(:username)
72+
allow(creds).to receive(:password)
7273
allow(creds).to receive(:user_file)
7374
allow(creds).to receive(:userpass_file)
7475
allow(creds).to receive(:prepended_creds).and_return([])
@@ -175,6 +176,7 @@
175176
creds = double('Metasploit::Framework::CredentialCollection')
176177
allow(creds).to receive(:pass_file)
177178
allow(creds).to receive(:username)
179+
allow(creds).to receive(:password)
178180
allow(creds).to receive(:user_file)
179181
allow(creds).to receive(:userpass_file)
180182
allow(creds).to receive(:prepended_creds).and_return([])
@@ -190,6 +192,7 @@
190192
allow(creds).to receive(:pass_file)
191193
allow(creds).to receive(:pass_file)
192194
allow(creds).to receive(:username)
195+
allow(creds).to receive(:password)
193196
allow(creds).to receive(:user_file)
194197
allow(creds).to receive(:userpass_file)
195198
allow(creds).to receive(:prepended_creds).and_return([])

spec/support/shared/examples/metasploit/framework/login_scanner/ntlm.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
creds = double('Metasploit::Framework::CredentialCollection')
1616
allow(creds).to receive(:pass_file)
1717
allow(creds).to receive(:username)
18+
allow(creds).to receive(:password)
1819
allow(creds).to receive(:user_file)
1920
allow(creds).to receive(:userpass_file)
2021
allow(creds).to receive(:prepended_creds).and_return([])

spec/support/shared/examples/metasploit/framework/tcp/client.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
creds = double('Metasploit::Framework::CredentialCollection')
1010
allow(creds).to receive(:pass_file)
1111
allow(creds).to receive(:username)
12+
allow(creds).to receive(:password)
1213
allow(creds).to receive(:user_file)
1314
allow(creds).to receive(:userpass_file)
1415
allow(creds).to receive(:prepended_creds).and_return([])

0 commit comments

Comments
 (0)