Module: Rex::Post::Meterpreter::Extensions::Stdapi::Net::SocketSubsystem::TcpClientChannel::DirectChannelWrite

Defined in:
lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/tcp_client_channel.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.



78
79
80
# File 'lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/tcp_client_channel.rb', line 78

def channel
  @channel
end

Instance Method Details

#syswrite(buf) ⇒ Object



74
75
76
# File 'lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/tcp_client_channel.rb', line 74

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