2005-07-18 05:59:27 +00:00
|
|
|
module Rex
|
|
|
|
module Post
|
|
|
|
module Meterpreter
|
|
|
|
module Ui
|
|
|
|
|
|
|
|
###
|
|
|
|
#
|
|
|
|
# CommandDispatcher
|
|
|
|
# -----------------
|
|
|
|
#
|
|
|
|
# Base class for all command dispatchers within the meterpreter console user
|
|
|
|
# interface.
|
|
|
|
#
|
|
|
|
###
|
|
|
|
module Console::CommandDispatcher
|
|
|
|
|
|
|
|
include Rex::Ui::Text::DispatcherShell::CommandDispatcher
|
|
|
|
|
|
|
|
#
|
|
|
|
# Returns the meterpreter client context
|
|
|
|
#
|
|
|
|
def client
|
|
|
|
shell.client
|
|
|
|
end
|
|
|
|
|
|
|
|
#
|
|
|
|
# Log that an error occurred
|
|
|
|
#
|
|
|
|
def log_error(msg)
|
|
|
|
print_error(msg)
|
2005-07-18 23:32:34 +00:00
|
|
|
|
|
|
|
elog(msg, 'meterpreter')
|
|
|
|
|
|
|
|
dlog("Call stack:\n#{$@.join("\n")}", 'meterpreter')
|
2005-07-18 05:59:27 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|