2012-06-29 00:18:28 -05:00
|
|
|
# -*- coding: binary -*-
|
2005-07-16 07:32:11 +00:00
|
|
|
module Msf
|
|
|
|
|
module Session
|
|
|
|
|
|
|
|
|
|
###
|
|
|
|
|
#
|
|
|
|
|
# This class implements an interactive session using raw input/output in
|
|
|
|
|
# only the most basic fashion.
|
|
|
|
|
#
|
|
|
|
|
###
|
|
|
|
|
module Basic
|
|
|
|
|
|
2023-11-14 18:20:14 +00:00
|
|
|
include Msf::Session
|
|
|
|
|
include Msf::Session::Interactive
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-16 08:12:58 +00:00
|
|
|
#
|
2005-11-15 15:11:43 +00:00
|
|
|
# Description of the session.
|
2005-07-16 08:12:58 +00:00
|
|
|
#
|
|
|
|
|
def desc
|
2005-07-16 16:06:44 +00:00
|
|
|
"Basic I/O"
|
2005-07-16 08:12:58 +00:00
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-16 08:12:58 +00:00
|
|
|
#
|
2005-11-15 15:11:43 +00:00
|
|
|
# Basic session.
|
2005-07-16 08:12:58 +00:00
|
|
|
#
|
|
|
|
|
def type
|
|
|
|
|
"basic"
|
|
|
|
|
end
|
2011-11-20 12:32:06 +11:00
|
|
|
|
2005-07-16 07:32:11 +00:00
|
|
|
protected
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Performs the actual raw interaction with the remote side. This can be
|
2024-01-06 15:54:49 -05:00
|
|
|
# overridden by derived classes if they wish to do this another way.
|
2005-07-16 07:32:11 +00:00
|
|
|
#
|
|
|
|
|
def _interact
|
2009-12-22 18:52:48 +00:00
|
|
|
framework.events.on_session_interact(self)
|
2017-12-29 18:07:25 -06:00
|
|
|
interact_stream(rstream)
|
2005-07-16 07:32:11 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|
2009-12-22 18:52:48 +00:00
|
|
|
end
|