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
|
|
|
|
|
|
|
|
include Session
|
|
|
|
include Interactive
|
|
|
|
|
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
|
|
|
|
|
|
|
|
#
|
2005-11-15 15:11:43 +00:00
|
|
|
# Basic session.
|
2005-07-16 08:12:58 +00:00
|
|
|
#
|
|
|
|
def type
|
|
|
|
"basic"
|
|
|
|
end
|
|
|
|
|
2005-07-16 07:32:11 +00:00
|
|
|
protected
|
|
|
|
|
|
|
|
#
|
|
|
|
# Performs the actual raw interaction with the remote side. This can be
|
|
|
|
# overriden by derived classes if they wish to do this another way.
|
|
|
|
#
|
|
|
|
def _interact
|
2009-12-22 18:52:48 +00:00
|
|
|
framework.events.on_session_interact(self)
|
2005-07-19 04:21:15 +00:00
|
|
|
interact_stream(rstream)
|
2005-07-16 07:32:11 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
2009-12-22 18:52:48 +00:00
|
|
|
end
|