2012-06-29 05:18:28 +00: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
|
|
|
|
|
2013-08-30 21:28:33 +00:00
|
|
|
include Session
|
|
|
|
include Interactive
|
|
|
|
|
|
|
|
#
|
|
|
|
# Description of the session.
|
|
|
|
#
|
|
|
|
def desc
|
|
|
|
"Basic I/O"
|
|
|
|
end
|
|
|
|
|
|
|
|
#
|
|
|
|
# Basic session.
|
|
|
|
#
|
|
|
|
def type
|
|
|
|
"basic"
|
|
|
|
end
|
2011-11-20 01:32:06 +00:00
|
|
|
|
2005-07-16 07:32:11 +00:00
|
|
|
protected
|
|
|
|
|
2013-08-30 21:28:33 +00:00
|
|
|
#
|
|
|
|
# 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
|
|
|
|
framework.events.on_session_interact(self)
|
|
|
|
if self.respond_to?(:ring)
|
|
|
|
interact_ring(ring)
|
|
|
|
else
|
|
|
|
interact_stream(rstream)
|
|
|
|
end
|
|
|
|
end
|
2005-07-16 07:32:11 +00:00
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
2009-12-22 18:52:48 +00:00
|
|
|
end
|