@@ -15,7 +15,6 @@ def initialize(info={})
15
15
'Description' => %q{ This module will test meterpreter API methods } ,
16
16
'License' => MSF_LICENSE ,
17
17
'Author' => [ 'egypt' ] ,
18
- 'Version' => '$Revision$' ,
19
18
'Platform' => [ 'windows' , 'linux' , 'java' ] ,
20
19
'SessionTypes' => [ 'meterpreter' ]
21
20
) )
@@ -241,6 +240,30 @@ def test_fs
241
240
session . fs . file . rm ( remote )
242
241
res
243
242
end
243
+ if session . commands . include? ( "stdapi_fs_file_move" )
244
+ it "should move files" do
245
+ res = true
246
+
247
+ # Make sure we don't have leftovers from a previous run
248
+ session . fs . file . rm ( "meterpreter-test" ) rescue nil
249
+ session . fs . file . rm ( "meterpreter-test-moved" ) rescue nil
250
+
251
+ # touch a new file
252
+ fd = session . fs . file . open ( "meterpreter-test" , "wb" )
253
+ fd . close
254
+
255
+ session . fs . file . mv ( "meterpreter-test" , "meterpreter-test-moved" )
256
+ entries = session . fs . dir . entries
257
+ res &&= entries . include? ( "meterpreter-test-moved" )
258
+ res &&= !entries . include? ( "meterpreter-test" )
259
+
260
+ # clean up
261
+ session . fs . file . rm ( "meterpreter-test" ) rescue nil
262
+ session . fs . file . rm ( "meterpreter-test-moved" ) rescue nil
263
+
264
+ res
265
+ end
266
+ end
244
267
245
268
it "should do md5 and sha1 of files" do
246
269
res = true
@@ -270,6 +293,12 @@ def test_fs
270
293
271
294
end
272
295
296
+ =begin
297
+ # Sniffer currently crashes on any OS that requires driver signing,
298
+ # i.e. everything vista and newer
299
+ #
300
+ # Disable loading it for now to make it through the rest of the tests.
301
+ #
273
302
def test_sniffer
274
303
begin
275
304
session.core.use "sniffer"
@@ -285,6 +314,7 @@ def test_sniffer
285
314
286
315
# XXX: how do we test this more thoroughly in a generic way?
287
316
end
317
+ =end
288
318
289
319
def cleanup
290
320
vprint_status ( "Cleanup: changing working directory back to #{ @old_pwd } " )
0 commit comments