Module: Rex::Post::Meterpreter::SocketAbstraction::DirectChannelWrite

Defined in:
lib/rex/post/meterpreter/channels/socket_abstraction.rb

Overview

Simple mixin for lsock in order to help avoid a ruby interpreter issue with ::Socket.pair Instead of writing to the lsock, reading from the rsock and then writing to the channel, we use this mixin to directly write to the channel.

Note: This does not work with OpenSSL as OpenSSL is implemented natively and requires a real socket to write to and we cant intercept the sockets syswrite at a native level.

Note: The deadlock only seems to effect the Ruby build for cygwin.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#channelObject

Returns the value of attribute channel


77
78
79
# File 'lib/rex/post/meterpreter/channels/socket_abstraction.rb', line 77

def channel
  @channel
end

Instance Method Details

#syswrite(buf) ⇒ Object


73
74
75
# File 'lib/rex/post/meterpreter/channels/socket_abstraction.rb', line 73

def syswrite(buf)
  channel._write(buf)
end