Included Modules

Class/Module Index [+]

Quicksearch

Rex::Post::Meterpreter::Channels::Pools::StreamPool

StreamPool


This class represents a channel that is associated with a streaming pool that has no definite end-point. While this may seem a paradox given the stream class of channels, it's in fact dinstinct because streams automatically forward traffic between the two ends of the channel whereas stream pools are always requested data in a single direction.

Public Class Methods

new(client, cid, type, flags) click to toggle source

Initializes the file channel instance

# File lib/rex/post/meterpreter/channels/pools/stream_pool.rb, line 35
def initialize(client, cid, type, flags)
        super(client, cid, type, flags)

        initialize_abstraction
end

Public Instance Methods

cleanup() click to toggle source

Cleans up resources used by the channel.

# File lib/rex/post/meterpreter/channels/pools/stream_pool.rb, line 93
def cleanup
        super

        cleanup_abstraction
end
dio_close_handler(packet) click to toggle source

Closes the local half of the pool stream.

# File lib/rex/post/meterpreter/channels/pools/stream_pool.rb, line 84
def dio_close_handler(packet)
        rsock.close

        return super(packet)
end
dio_write_handler(packet, data) click to toggle source

Transfers data to the local half of the pool for reading.

# File lib/rex/post/meterpreter/channels/pools/stream_pool.rb, line 71
def dio_write_handler(packet, data)
        rv = Rex::ThreadSafe.select(nil, [rsock], nil, 0.01)
        if(rv)
                rsock.write(data)
                return true
        else
                return false
        end
end
eof() click to toggle source

This method returns whether or not eof has been returned.

# File lib/rex/post/meterpreter/channels/pools/stream_pool.rb, line 64
def eof
        return false
end
seek() click to toggle source

This method seeks to an offset in the pool.

# File lib/rex/post/meterpreter/channels/pools/stream_pool.rb, line 57
def seek
        raise NotImplementedError
end
tell() click to toggle source

This method returns the current offset into the pool.

# File lib/rex/post/meterpreter/channels/pools/stream_pool.rb, line 50
def tell
        raise NotImplementedError
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.