Base class for all command dispatchers within the meterpreter console user interface.
Checks the file name to hash association to see if the module being requested has already been loaded once.
# File lib/rex/post/meterpreter/ui/console/command_dispatcher.rb, line 28 def self.check_hash(name) @@file_hash[name] end
Returns the meterpreter client context.
# File lib/rex/post/meterpreter/ui/console/command_dispatcher.rb, line 47 def client shell.client end
Log that an error occurred.
# File lib/rex/post/meterpreter/ui/console/command_dispatcher.rb, line 72 def log_error(msg) print_error(msg) elog(msg, 'meterpreter') dlog("Call stack:\n#{$@.join("\n")}", 'meterpreter') end
Returns true if the client has a framework object.
Used for firing framework session events
# File lib/rex/post/meterpreter/ui/console/command_dispatcher.rb, line 56 def msf_loaded? return @msf_loaded unless @msf_loaded.nil? # if we get here we must not have initialized yet if client.framework # We have a framework instance so the msf libraries should be # available. Load up the ones we're going to use require 'msf/base/serializer/readable_text' end @msf_loaded = !!(client.framework) @msf_loaded end
Generated with the Darkfish Rdoc Generator 2.