@@ -115,6 +115,20 @@ def myworkspace
115
115
116
116
it 'with password type 5' do
117
117
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
+ )
118
132
aux_cisco . cisco_ios_config_eater ( '127.0.0.1' , 1337 , 'enable password 5 1511021F0725' )
119
133
end
120
134
@@ -157,9 +171,10 @@ def myworkspace
157
171
protocol : "tcp" ,
158
172
workspace_id : workspace . id ,
159
173
origin_type : :service ,
174
+ service_name : '' ,
160
175
module_fullname : "auxiliary/scanner/snmp/cisco_dummy" ,
161
176
private_data : "1511021F0725" ,
162
- private_type : :password ,
177
+ private_type : :nonreplayable_hash ,
163
178
status : Metasploit ::Model ::Login ::Status ::UNTRIED
164
179
}
165
180
)
@@ -177,6 +192,7 @@ def myworkspace
177
192
protocol : "udp" ,
178
193
workspace_id : workspace . id ,
179
194
origin_type : :service ,
195
+ service_name : '' ,
180
196
module_fullname : "auxiliary/scanner/snmp/cisco_dummy" ,
181
197
private_data : "1511021F0725" ,
182
198
private_type : :password ,
@@ -196,6 +212,7 @@ def myworkspace
196
212
protocol : "udp" ,
197
213
workspace_id : workspace . id ,
198
214
origin_type : :service ,
215
+ service_name : '' ,
199
216
module_fullname : "auxiliary/scanner/snmp/cisco_dummy" ,
200
217
private_data : "1511021F0725" ,
201
218
private_type : :password ,
@@ -213,24 +230,14 @@ def myworkspace
213
230
expect ( aux_cisco ) . to receive ( :store_loot ) . with (
214
231
"cisco.ios.config" , "text/plain" , "127.0.0.1" , "password 7 1511021F0725" , "config.txt" , "Cisco IOS Configuration"
215
232
)
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
- # )
227
233
expect ( aux_cisco ) . to receive ( :create_credential_and_login ) . with (
228
234
{
229
235
address : "127.0.0.1" ,
230
236
port : 1337 ,
231
237
protocol : "tcp" ,
232
238
workspace_id : workspace . id ,
233
239
origin_type : :service ,
240
+ service_name : '' ,
234
241
module_fullname : "auxiliary/scanner/snmp/cisco_dummy" ,
235
242
private_data : "1511021F0725" ,
236
243
private_type : :password ,
0 commit comments