Path: blob/master/test/functional/meterpreter/windows_meterpreter_specs.rb
19567 views
module MsfTest1module WindowsMeterpreterSpecs2## This file is intended to be used in conjunction with a harness,3## such as meterpreter_win32_spec.rb45def self.included(base)6base.class_eval do7it "should not error when uploading a file to a windows box" do8upload_success_strings = [9'uploading',10'uploaded'11]1213## create a file to upload14filename = "/tmp/whatever"15if File.exist?(filename)16FileUtils.rm(filename)17end18hlp_string_to_file("owned!", filename)1920## run the upload / quit commands21hlp_run_command_check_output("upload", "upload #{filename} C:\\", upload_success_strings)22# hlp_run_command_check_output("quit","quit")2324## clean up25FileUtils.rm(filename)26end2728it "should show the priv commands when running help" do29success_strings = [30'Priv: Elevate Commands',31'Priv: Password database Commands',32'Priv: Timestomp Commands'33]3435hlp_run_command_check_output("help_shortcut", "help", success_strings)36end3738it "should not error when taking a screenshot" do39success_strings = [ 'Screenshot saved to' ]40hlp_run_command_check_output("screenshot", "screenshot", success_strings)41end42end43end44end45end464748