Sha256: bc668137d4de29581f2b452e3c42772402d03254d79f9b931bc6ace72e173a33

Contents?: true

Size: 859 Bytes

Versions: 43

Compression:

Stored size: 859 Bytes

Contents

#!/usr/bin/env ruby

module Rex
module Post
module Meterpreter

###
#
# This interface is meant to be included by things that are meant to contain
# zero or more channel instances in the form of a hash.
#
###
module ChannelContainer

	#
	# Initializes the channel association hash
	#
	def initialize_channels
		self.channels = {}
	end

	#
	# Adds a channel to the container that is indexed by its channel identifier
	#
	def add_channel(channel)
		self.channels[channel.cid] = channel
	end

	#
	# Looks up a channel instance based on its channel identifier
	#
	def find_channel(cid)
		return self.channels[cid]
	end

	#
	# Removes a channel based on its channel identifier
	#
	def remove_channel(cid)
		return self.channels.delete(cid)
	end

	#
	# The hash of channels.
	#
	attr_reader :channels

protected

	attr_writer :channels # :nodoc:

end

end; end; end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
librex-0.0.65 lib/rex/post/meterpreter/channel_container.rb
librex-0.0.63 lib/rex/post/meterpreter/channel_container.rb
librex-0.0.54 lib/rex/post/meterpreter/channel_container.rb
librex-0.0.53 lib/rex/post/meterpreter/channel_container.rb
librex-0.0.52 lib/rex/post/meterpreter/channel_container.rb
librex-0.0.51 lib/rex/post/meterpreter/channel_container.rb
librex-0.0.50 lib/rex/post/meterpreter/channel_container.rb
librex-0.0.49 lib/rex/post/meterpreter/channel_container.rb
librex-0.0.48 lib/rex/post/meterpreter/channel_container.rb
librex-0.0.47 lib/rex/post/meterpreter/channel_container.rb
librex-0.0.46 lib/rex/post/meterpreter/channel_container.rb
librex-0.0.44 lib/rex/post/meterpreter/channel_container.rb
librex-0.0.43 lib/rex/post/meterpreter/channel_container.rb
librex-0.0.42 lib/rex/post/meterpreter/channel_container.rb
librex-0.0.41 lib/rex/post/meterpreter/channel_container.rb
librex-0.0.40 lib/rex/post/meterpreter/channel_container.rb
librex-0.0.39 lib/rex/post/meterpreter/channel_container.rb
librex-0.0.38 lib/rex/post/meterpreter/channel_container.rb
librex-0.0.37 lib/rex/post/meterpreter/channel_container.rb
librex-0.0.36 lib/rex/post/meterpreter/channel_container.rb