Skip to content

Commit d807a83

Browse files
committed
fixing some more specs
1 parent b66621a commit d807a83

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

spec/lib/msf/core/auxiliary/cisco_spec.rb

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,20 @@ def myworkspace
115115

116116
it 'with password type 5' do
117117
expect(aux_cisco).to receive(:print_good).with('127.0.0.1:1337 MD5 Encrypted Enable Password: 1511021F0725')
118+
expect(aux_cisco).to receive(:create_credential_and_login).with(
119+
{
120+
address: "127.0.0.1",
121+
port: 1337,
122+
protocol: "tcp",
123+
workspace_id: workspace.id,
124+
origin_type: :service,
125+
service_name: '',
126+
module_fullname: "auxiliary/scanner/snmp/cisco_dummy",
127+
private_data: "1511021F0725",
128+
private_type: :nonreplayable_hash,
129+
status: Metasploit::Model::Login::Status::UNTRIED
130+
}
131+
)
118132
aux_cisco.cisco_ios_config_eater('127.0.0.1',1337,'enable password 5 1511021F0725')
119133
end
120134

@@ -157,9 +171,10 @@ def myworkspace
157171
protocol: "tcp",
158172
workspace_id: workspace.id,
159173
origin_type: :service,
174+
service_name: '',
160175
module_fullname: "auxiliary/scanner/snmp/cisco_dummy",
161176
private_data: "1511021F0725",
162-
private_type: :password,
177+
private_type: :nonreplayable_hash,
163178
status: Metasploit::Model::Login::Status::UNTRIED
164179
}
165180
)
@@ -177,6 +192,7 @@ def myworkspace
177192
protocol: "udp",
178193
workspace_id: workspace.id,
179194
origin_type: :service,
195+
service_name: '',
180196
module_fullname: "auxiliary/scanner/snmp/cisco_dummy",
181197
private_data: "1511021F0725",
182198
private_type: :password,
@@ -196,6 +212,7 @@ def myworkspace
196212
protocol: "udp",
197213
workspace_id: workspace.id,
198214
origin_type: :service,
215+
service_name: '',
199216
module_fullname: "auxiliary/scanner/snmp/cisco_dummy",
200217
private_data: "1511021F0725",
201218
private_type: :password,
@@ -213,24 +230,14 @@ def myworkspace
213230
expect(aux_cisco).to receive(:store_loot).with(
214231
"cisco.ios.config", "text/plain", "127.0.0.1", "password 7 1511021F0725", "config.txt", "Cisco IOS Configuration"
215232
)
216-
# expect(aux_cisco).to receive(:store_cred).with(
217-
# {
218-
# host: "127.0.0.1",
219-
# port: 1337,
220-
# user: "",
221-
# pass: "cisco",
222-
# type: "password",
223-
# collect_type: "password",
224-
# active: true
225-
# }
226-
# )
227233
expect(aux_cisco).to receive(:create_credential_and_login).with(
228234
{
229235
address: "127.0.0.1",
230236
port: 1337,
231237
protocol: "tcp",
232238
workspace_id: workspace.id,
233239
origin_type: :service,
240+
service_name: '',
234241
module_fullname: "auxiliary/scanner/snmp/cisco_dummy",
235242
private_data: "1511021F0725",
236243
private_type: :password,

0 commit comments

Comments
 (0)