Sha256: 788b84f3c7b9d7725b020aea20c8a4e4c0a5644d6d99c9a25fce9bcdbd7c7a9f

Contents?: true

Size: 898 Bytes

Versions: 15

Compression:

Stored size: 898 Bytes

Contents

# -*- coding: binary -*-

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

15 entries across 15 versions & 3 rubygems

Version Path
rex-2.0.13 lib/rex/post/meterpreter/channel_container.rb
rex-2.0.12 lib/rex/post/meterpreter/channel_container.rb
rex-2.0.11 lib/rex/post/meterpreter/channel_container.rb
rex-2.0.10 lib/rex/post/meterpreter/channel_container.rb
rex-2.0.9 lib/rex/post/meterpreter/channel_container.rb
rex-2.0.8 lib/rex/post/meterpreter/channel_container.rb
rex-2.0.7 lib/rex/post/meterpreter/channel_container.rb
rex-2.0.5 lib/rex/post/meterpreter/channel_container.rb
rex-2.0.4 lib/rex/post/meterpreter/channel_container.rb
dstruct-0.0.1 lib/rex/post/meterpreter/channel_container.rb
rex-2.0.3 lib/rex/post/meterpreter/channel_container.rb
librex-0.0.999 lib/rex/post/meterpreter/channel_container.rb
rex-2.0.2 lib/rex/post/meterpreter/channel_container.rb
librex-0.0.71 lib/rex/post/meterpreter/channel_container.rb
librex-0.0.70 lib/rex/post/meterpreter/channel_container.rb