Sha256: de026a826187c2c6c7b0f1339437ffd83b1b0ad008514a32251932ddedc26915

Contents?: true

Size: 989 Bytes

Versions: 16

Compression:

Stored size: 989 Bytes

Contents

require 'rex/logging'

module Rex
module Post
module Meterpreter
module Ui

###
#
# Base class for all command dispatchers within the meterpreter console user
# interface.
#
###
module Console::CommandDispatcher

	include Rex::Ui::Text::DispatcherShell::CommandDispatcher

	#
	# The hash of file names to class names after a module has already been
	# loaded once on the client side.
	#
	@@file_hash = {}

	#
	# Checks the file name to hash association to see if the module being
	# requested has already been loaded once.
	#
	def self.check_hash(name)
		@@file_hash[name]
	end

	#
	# Sets the file path to class name association for future reference.
	#
	def self.set_hash(name, klass)
		@@file_hash[name] = klass
	end

	#
	# Returns the meterpreter client context.
	#
	def client
		shell.client
	end

	#
	# Log that an error occurred.
	#
	def log_error(msg)
		print_error(msg)

		elog(msg, 'meterpreter')

		dlog("Call stack:\n#{$@.join("\n")}", 'meterpreter')
	end

end

end
end
end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
librex-0.0.28 lib/rex/post/meterpreter/ui/console/command_dispatcher.rb
librex-0.0.27 lib/rex/post/meterpreter/ui/console/command_dispatcher.rb
librex-0.0.26 lib/rex/post/meterpreter/ui/console/command_dispatcher.rb
librex-0.0.25 lib/rex/post/meterpreter/ui/console/command_dispatcher.rb
librex-0.0.23 lib/rex/post/meterpreter/ui/console/command_dispatcher.rb
librex-0.0.21 lib/rex/post/meterpreter/ui/console/command_dispatcher.rb
librex-0.0.19 lib/rex/post/meterpreter/ui/console/command_dispatcher.rb
librex-0.0.17 lib/rex/post/meterpreter/ui/console/command_dispatcher.rb
librex-0.0.13 lib/rex/post/meterpreter/ui/console/command_dispatcher.rb
librex-0.0.12 lib/rex/post/meterpreter/ui/console/command_dispatcher.rb
librex-0.0.7 lib/rex/post/meterpreter/ui/console/command_dispatcher.rb
librex-0.0.6 lib/rex/post/meterpreter/ui/console/command_dispatcher.rb
librex-0.0.5 lib/rex/post/meterpreter/ui/console/command_dispatcher.rb
librex-0.0.4 lib/rex/post/meterpreter/ui/console/command_dispatcher.rb
librex-0.0.3 lib/rex/post/meterpreter/ui/console/command_dispatcher.rb
librex-0.0.1 lib/rex/post/meterpreter/ui/console/command_dispatcher.rb