Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/test/functional/meterpreter/meterpreter_specs.rb
Views: 11780
module MsfTest1module MeterpreterSpecs2def self.included(base)3base.class_eval do4it "should not error when running each command" do5commands = [6"?",7"background",8"bgkill",9"bglist",10"bgrun",11"channel",12"close",13"exit",14"help",15"interact",16# "irb",17"migrate",18# "quit",19"read",20"run",21"use",22"write",23"cat",24"lcat",25"cd",26"del",27"download",28# "edit",29"getlwd",30"getwd",31"lcd",32"lpwd",33"ls",34"mkdir",35"pwd",36"rm",37"rmdir",38"search",39"upload",40"ipconfig",41"portfwd",42"route",43"clearev",44"drop_token",45"execute",46"getpid",47"getprivs",48"getuid",49"kill",50"ps",51# "reboot",52"reg",53"rev2self",54# "shell",55# "shutdown",56"steal_token",57"sysinfo",58"enumdesktops",59"getdesktop",60"idletime",61"keyscan_dump",62"keyscan_start",63"keyscan_stop",64"screenshot",65"setdesktop",66"uictl",67"getsystem",68"hashdump",69"timestomp"70]7172## Run each command, check for execeptions73commands.each do |command|74hlp_run_command_check_output("basic_#{command}", command)75end76end7778it "should not error when running help" do79success_strings = [80'Core Commands',81'Stdapi: File system Commands',82'Stdapi: Networking Commands',83'Stdapi: System Commands',84'Stdapi: User interface Commands'85]8687hlp_run_command_check_output("help", "help", success_strings)88end8990it "should not error when running the help shortcut" do91success_strings = [92'Core Commands',93'Stdapi: File system Commands',94'Stdapi: Networking Commands',95'Stdapi: System Commands',96'Stdapi: User interface Commands'97]9899hlp_run_command_check_output("help_shortcut", "?", success_strings)100end101102it "should not error when checking for background channels" do103success_strings = [ 'No active channels.' ]104hlp_run_command_check_output("channel_list_empty", "channel -l", success_strings)105end106end107end108end109end110111112