Sha256: baa4ee697de41961781d76c9b2741a252a080275f2c06993ad876e16c1ba82cd

Contents?: true

Size: 881 Bytes

Versions: 2

Compression:

Stored size: 881 Bytes

Contents

#!/usr/bin/env ruby
# -*- coding: binary -*-

require 'rex/post/meterpreter/client'
require 'rex/post/meterpreter/extensions/stdapi/constants'

module Rex
module Post
module Meterpreter
module Extensions
module Stdapi
module Sys
module ProcessSubsystem

###
#
# This class provides an input/output interface to an executed
# process' standard input and output.
#
###
class IO

	##
	#
	# Constructor
	#
	##

	#
	# Initializes the IO instance.
	#
	def initialize(process)
		self.process = process
	end

	#
	# Writes the supplied buffer to the standard input handle of the
	# executed process.
	#
	def write(buf)
		return process.channel.write(buf)
	end

	#
	# Reads data from the standard output handle of the executed process.
	#
	def read(length = nil)
		return process.channel.read(length)
	end

protected
	attr_accessor :process # :nodoc:

end

end; end; end; end; end; end; end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
librex-0.0.68 lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/io.rb
librex-0.0.66 lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/io.rb