# -*- coding: binary -*- # # Rex # # # Project # require 'msf/core/opt_condition' require 'optparse' module Msf module Ui module Console module CommandDispatcher ### # # Command dispatcher for core framework commands, such as module loading, # session interaction, and other general things. # ### class Core include Msf::Ui::Console::CommandDispatcher include Msf::Ui::Console::CommandDispatcher::Common include Msf::Ui::Console::ModuleOptionTabCompletion # Session command options @@sessions_opts = Rex::Parser::Arguments.new( ["-c", "--command"] => [ true, "Run a command on the session given with -i, or all", "" ], ["-C", "--meterpreter-command"] => [ true, "Run a Meterpreter Command on the session given with -i, or all", "" ], ["-h", "--help"] => [ false, "Help banner" ], ["-i", "--interact"] => [ true, "Interact with the supplied session ID", "" ], ["-l", "--list"] => [ false, "List all active sessions" ], ["-v", "--list-verbose"] => [ false, "List all active sessions in verbose mode" ], ["-d", "--list-inactive"] => [ false, "List all inactive sessions" ], ["-q", "--quiet"] => [ false, "Quiet mode" ], ["-k", "--kill"] => [ true, "Terminate sessions by session ID and/or range", "" ], ["-K", "--kill-all"] => [ false, "Terminate all sessions" ], ["-s", "--script"] => [ true, "Run a script or module on the session given with -i, or all", "